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 childtheme_override_postfooter() { | |
$post_type = get_post_type(); | |
$post_type_obj = get_post_type_object($post_type); | |
// Check for "Page" post-type and logged in user to show edit link | |
if ( $post_type == 'page' && current_user_can('edit_posts') ) { | |
$postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink(); | |
$postfooter .= "</div><!-- .entry-utility -->\n"; | |
// Display nothing for logged out users on a "Page" post-type | |
} elseif ( $post_type == 'page' ) { |
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 childtheme_override_postfooter_postconnect() { | |
if ((comments_open()) && (pings_open())) { /* Comments are open */ | |
$postconnect = ' <a class="comment-link" href="#respond" title ="' . __('Post a comment', 'thematic') . '">' . __('Post a comment', 'thematic') . '</a>'; | |
$postconnect .= __(' or leave a trackback: ', 'thematic'); | |
$postconnect .= '<a class="trackback-link" href="' . get_trackback_url() . '" title ="' . __('Trackback URL for your post', 'thematic') . '" rel="trackback">' . __('Trackback URL', 'thematic') . '</a>.'; | |
} elseif (!(comments_open()) && (pings_open())) { /* Only trackbacks are open */ | |
$postconnect = __(' Comments are closed, but you can leave a trackback: ', 'thematic'); | |
$postconnect .= '<a class="trackback-link" href="' . get_trackback_url() . '" title ="' . __('Trackback URL for your post', 'thematic') . '" rel="trackback">' . __('Trackback URL', 'thematic') . '</a>.'; | |
} elseif ((comments_open()) && !(pings_open())) { /* Only |
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
// scottnix.com | |
// add facebook comment count to Thematic, really we are just removing the lines that thematic customizes and adding back in the WP defaults | |
function childtheme_override_postfooter() { | |
$post_type = get_post_type(); | |
$post_type_obj = get_post_type_object($post_type); | |
// Check for "Page" post-type and logged in user to show edit link | |
if ( $post_type == 'page' && current_user_can('edit_posts') ) { | |
$postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink(); | |
$postfooter .= "</div><!-- .entry-utility -->\n"; |
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 snix_childtheme_gallery() { ?> | |
<div class="custom-gallery"> | |
<?php | |
if ( is_front_page() ) { | |
echo do_shortcode("[shortcode 1]"); | |
} elseif ( is_page( 42 ) ) { | |
echo do_shortcode("[shortcode 2]"); | |
} elseif ( is_page( 43 ) ) { | |
echo do_shortcode("[shortcode 3]"); | |
} else { |
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
// facebook connect functionality.... | |
function childtheme_override_postfooter() { | |
$post_type = get_post_type(); | |
$post_type_obj = get_post_type_object($post_type); | |
// Check for "Page" post-type and logged in user to show edit link | |
if ( $post_type == 'page' && current_user_can('edit_posts') ) { | |
$postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink(); | |
$postfooter .= "</div><!-- .entry-utility -->\n"; | |
// Display nothing for logged out users on a "Page" post-type |
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 4th subsidiary aside widget, currently set up to be a footer widget underneath the 3 subs | |
function childtheme_add_subsidiary($content) { | |
$content['Footer Widget Aside'] = array( | |
'admin_menu_order' => 250, | |
'args' => array ( | |
'name' => 'Banner Aside', | |
'id' => '4th-subsidiary-aside', | |
'description' => __('The 4th bottom widget area in the footer.', 'thematic'), | |
'before_widget' => thematic_before_widget(), | |
'after_widget' => thematic_after_widget(), |
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 snix_childtheme_gallery() { | |
global $post; | |
// display this only on pages | |
if (is_page()) { | |
// get the correct custom field data | |
$custom_gallery = get_post_meta($post->ID, 'custom-gallery', true); | |
// if custom field is available, do this | |
if ($custom_gallery) { | |
// do_shortcode is needed |
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
// register two additional custom menu slots | |
function childtheme_register_menus() { | |
if ( function_exists('register_nav_menu')) { | |
register_nav_menu('secondary-menu', 'Secondary Menu'); | |
register_nav_menu('tertiary-menu', 'Tertiary Menu'); | |
} | |
} | |
add_action('init', 'childtheme_register_menus'); | |
///Top Menu (optional) |
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
// there are 2 seperate examples here, one is for the home/blog posts, the other is for archives | |
// change order of posts in the blog/home section or front page | |
// http://codex.wordpress.org/Function_Reference/query_posts | |
function childtheme_home_post_order() { | |
if ( is_home() || is_front_page() ) { | |
global $query_string; | |
query_posts($query_string . '&orderby=date&order=asc'); // example of order by date, starting oldest first | |
// query_posts($query_string . '&orderby=title&order=asc'); // example of order by title, starting a-z | |
} |
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 childtheme_override_postheader() { | |
global $post; | |
if ( is_404() || $post->post_type == 'page') { | |
$postheader = thematic_postheader_posttitle(); | |
} else { | |
$postheader = thematic_postheader_postmeta() . thematic_postheader_posttitle(); | |
} | |
echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header |