This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$args = array( 'posts_per_page' => 10, 'post_type'=> 'custom-post-type' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<?php | |
$job_link= get_post_meta($post->ID, 'job_instructions', true); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
$(".all-portfolios").isotope({ | |
itemSelector: '.single-portfolio', | |
layoutMode: 'fitRows', | |
}); | |
$('ul.filter li').click(function(){ | |
$("ul.filter li").removeClass("active"); | |
$(this).addClass("active"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$my_autop_content = get_the_content(); | |
'.wpautop( $my_autop_content ).' | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Provide an example of an "if – elseif - else" control structure that tests if $day is ‘Monday.’ If so, display ‘Today is Monday.’ Repeat the test of each weekday, displaying ‘Today is (name of the week day),’ otherwise display “It is the weekend.” | |
$dayname = 'Monday'; | |
if($dayname = 'Monday') : | |
echo 'Today is Monday.'; | |
elseif() : | |
echo 'Today is '; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( is_home() || is_front_page() ) : ?> | |
<!-- Homepage Only Code --> | |
<?php else : ?> | |
<!-- Other Page Code --> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
function jk_masonry() { | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
} | |
/* | |
How to use? | |
$('#container').masonry({ singleMode: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in functions.php | |
add_theme_support( 'post-thumbnails'); | |
/* | |
Wordpress crop an image = 5 size. Sizes are given below | |
thumbnail // Thumbnail (default 150px x 150px max) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function header_add_to_cart_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); | |
woocommerce_cart_link(); | |
$fragments['a.cart-button'] = ob_get_clean(); | |
return $fragments; |
OlderNewer