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 //* Mind this opening php tag | |
//* Remove Post Info, Post Meta from CPT | |
add_action ( 'get_header', 'rv_cpt_remove_post_info_genesis' ); | |
function rv_cpt_remove_post_info_genesis() { | |
if ( 'post' !== get_post_type() ) { | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
} | |
} |
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 //* mind this opening php tag | |
//* Exclude categories from blog page | |
add_filter('pre_get_posts', 'rv_exclude_blog_categories'); | |
function rv_exclude_blog_categories($query) { | |
if ($query->is_home) { | |
$query->set('cat', '-1,-2,-3'); //Replace with your category numbers (keep negative signs) | |
} | |
return $query; | |
} |
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 //* Mind this opening PHP tag | |
//* Reposition Page Title | |
add_action( 'genesis_before', 'centric_post_title' ); | |
function centric_post_title() { | |
if ( is_page() and !is_page_template() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ); | |
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 ); |
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 //* Mind this opening PHP tag | |
//* Reposition Page Title | |
add_action( 'genesis_before', 'centric_post_title' ); | |
function centric_post_title() { | |
if ( is_page() && !is_page_template() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ); | |
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 ); |
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 //* Mind this opening PHP tag | |
function centric_open_post_title() { | |
echo '<div class="page-title"><div class="wrap">'; | |
} | |
function centric_close_post_title() { | |
echo '</div></div>'; | |
} |
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 //Mind this opening PHP tag | |
/**************************************************************** | |
Project Shortcode | |
****************************************************************/ | |
// Add Project Details Shortcode | |
add_shortcode( 'project_info', 'project_info' ); | |
function project_info( $atts ) { |
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 //* Mind the opening PHP tag | |
/* | |
* Changes the main query on the home page (blog posts index) to one or more custom post types | |
*/ | |
add_filter( 'pre_get_posts', 'my_custom_query' ); | |
function my_custom_query( $query ) { | |
if ( $query->is_main_query() && $query->is_home() ) { |
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 //* Mind this opening PHP tag | |
/* | |
* Removes the standard WordPress profile settings for Twitter, Google+ and Facebook | |
* Adds custom fields for Twitter, Facebook, LinkedIn and Google+ | |
* Removing and adding Twitter, Google+ and Facebook is not completely necessay | |
* I did this so I knew exactly what these fields were doing | |
*/ | |
//* Add custom meta fields |
OlderNewer