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
// Add custom post class to posts in the "Featured" category | |
add_filter('post_class', 'eo_custom_post_class'); | |
function eo_custom_post_class($classes) | |
{ | |
$new_class = 'featured-post'; | |
if (in_category('Featured')) | |
$classes[] = esc_attr(sanitize_html_class($new_class)); | |
return $classes; | |
} |
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
jQuery(document).ready(function($){$('.gist-meta').find('a').attr('target', '_blank'); }); |
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 //* Mind this opening php tag | |
/** | |
* Display Last Updated date if a post has been updated (Genesis Framework) | |
* Includes estimated read time via the Estimated Post Reading Time plugin | |
* | |
* @author Ren Ventura <EngageWP.com> | |
* @link http://www.engagewp.com/display-updated-date-instead-of-published-date-in-genesis/ | |
*/ | |
add_filter( 'genesis_post_info', 'rv_post_info_filter_with_est_read_time' ); |
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 | |
require_once(TEMPLATEPATH.'/lib/init.php'); | |
include_once 'metaboxes/setup.php'; | |
// META BOXEX WP ALCHEMY | |
// wpalchemy metadonnees | |
$gn_metadonnees_mb = new WPAlchemy_MetaBox(array | |
( | |
'id' => '_custom_metadonnees', // = références |
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 |
NewerOlder