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_pre_get_option_site_layout', 'change_layout_woocommerce'); | |
function change_layout_woocommerce( $opt ) { | |
if ( ! class_exists( 'WooCommerce' ) ) | |
return; | |
if (is_shop() ) { | |
$opt = 'full-width-content'; | |
return $opt; | |
} |
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 | |
function ads_added_above_last_p($text) { | |
if( is_single() ) : | |
$ads_text = '<div class="a" style="text-align: center;">[PUT SHORTCODE HERE]</div>'; | |
if($pos1 = strpos($text, '<p>', strpos($text, '<p>') + 3)){ | |
$text1 = substr($text, 0, $pos1); | |
$text2 = substr($text, $pos1); | |
$text = $text1 . $ads_text . $text2; | |
} |
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 |
NewerOlder