This file contains hidden or 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 | |
/** | |
* Post Title | |
*/ | |
add_action('genesis_post_title', 'genesis_do_post_title'); | |
function genesis_do_post_title() { | |
if ( is_singular() ) { | |
$title = sprintf( '<h1 class="entry-title">%s</h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
} |
This file contains hidden or 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 | |
// Action conditionnelle sur des Contenus personnalisés | |
add_action('genesis_before_loop', 'gn_temoignages_filter'); | |
function gn_temoignages_filter() { | |
if ( 'gnpost_temoignage' == get_post_type() || is_post_type_archive('gnpost_temoignage') ) : | |
remove_action('genesis_before_post_content', 'genesis_post_info'); | |
remove_action('genesis_after_post_content', 'genesis_post_meta'); | |
endif; | |
} |
This file contains hidden or 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 | |
add_filter( 'genesis_post_meta', 'ddw_custom_post_meta_filter' ); | |
/** | |
* Modify the comment link text | |
* | |
* @author David Decker - DECKERWEB | |
* @link http://twitter.com/deckerweb | |
*/ | |
function ddw_custom_post_meta_filter( $post_meta ) { |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Disable the superfish script | |
add_action( 'wp_enqueue_scripts', 'sp_disable_superfish' ); | |
function sp_disable_superfish() { | |
wp_deregister_script( 'superfish' ); | |
wp_deregister_script( 'superfish-args' ); | |
} |
This file contains hidden or 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 | |
//Two functions below to set the read more text conditionally - the 2nd function forces the read more as sometimes it does not appear. | |
//Read More Text For Excerpt - Set conditionally based on Category slug | |
add_filter( 'excerpt_more', 'genesischild_read_more_link' ); | |
function genesischild_read_more_link( $more ) { | |
if( in_category('video') ) {//add in category | |
return '... <a href="' . get_permalink() . '" class="more-link" title="View More">View More</a>';//change read more text |
This file contains hidden or 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 | |
//Know the code https://hub.wpdevelopersclub.com/podcast/post-column-grid-patterns-part-2-episode-3/ | |
add_filter( 'post_class', 'add_to_post_classes_for_grid_pattern' ); | |
/** | |
* Add to the Post Classes | |
* | |
* @since 1.0.0 | |
* | |
* @param array $classes | |
* @return array |
This file contains hidden or 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 | |
// Add specific CSS class by filter | |
add_filter( 'body_class', 'my_class_names' ); | |
function my_class_names( $classes ) { | |
// add 'class-name' to the $classes array | |
if( is_page(8)) : //set conditionals | |
$classes[] = 'beaverbuilder'; | |
// return the $classes array | |
return $classes; //returns the extra CSS with the regular classes to the conditional pages |