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 | |
$cat = get_query_var('cat'); | |
$category = get_category ($cat); | |
echo do_shortcode('[ajax_load_more seo="true" category="'.$category->slug.'"]'); | |
?> |
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 | |
$author = get_the_author_meta('ID'); | |
echo do_shortcode('[ajax_load_more author="'.$author.'"]'); | |
?> |
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 | |
$tag = get_query_var('tag'); | |
echo do_shortcode('[ajax_load_more tag="'.$tag.'"]'); | |
?> |
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 echo do_shortcode('[ajax_load_more repeater="repeater2" posts_per_page="1" scroll="false" pause="true" transition="fade" button_label="Load Posts"]');?> |
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 echo do_shortcode(['[ajax_load_more post_type="ajax_more" posts_per_page="2" transition="fade" button_label="Load More Posts"]']) ?> |
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 | |
function get_page_id($page_name){ | |
global $wpdb; | |
$page_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$page_name."'"); | |
return $page_id; | |
} |
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 echo do_shortcode('[ajax_load_more post_type="ajax_more" posts_per_page="1" scroll="false" transition="fade" button_label="Load More Posts"]'); ?> | |
<hr/> | |
<?php echo do_shortcode('[ajax_load_more post_type="portfolio" posts_per_page="1" scroll="false" transition="fade" button_label="Load More Work"]'); ?> |
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 echo ('[ajax_load_more]'); ?> |
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
/********************************************** | |
* Update featured image size in editor | |
*********************************************/ | |
add_filter( 'admin_post_thumbnail_html', 'cnkt_add_featured_instructions'); | |
function cnkt_add_featured_instructions( $content ) { | |
$content .= '<p><em>The featured image should be at least 972px × 244px.</em></p>'; // Append to $content | |
$content = str_replace(__('Set featured image'), __('Add Header Image'), $content); | |
$content = str_replace('-70x70', '', $content); // Remove thumbnail image dimensions | |
$content = str_replace('width="70"', '', $content); // Remove width attr |
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 custom columns to milsstones post type | |
function my_milestone_columns($columns){ | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'title' => 'Title', | |
'year' => 'Year', | |
'month' => 'Month', | |
'date' => 'Date', | |
); | |
return $columns; |