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_action( 'pre_get_posts', 'ae_change_listing_posts_per_page' ); | |
/** | |
* Change Posts Per Page for Listing Archive | |
*/ | |
function ae_change_listing_posts_per_page( $query ) { | |
if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'listing' ) ) { | |
$query->set( 'posts_per_page', '18' ); | |
} | |
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
/* The 3 numbers correspond to the content width of the default, small and large layouts. | |
* The default layout refers to 2-column layouts; small refers to 3-column layouts | |
* and large refers to the full-width content layout. | |
*/ | |
$content_width = apply_filters( 'content_width', 580, 480, 900 ); |
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_action( 'genesis_after_post', 'aeprofiles_show_connected_agent' ); // XHTML | |
add_action( 'genesis_after_entry', 'aeprofiles_show_connected_agent' ); // HTML5 | |
function aeprofiles_show_connected_agent() { | |
if (function_exists('_p2p_init') && function_exists('agentpress_listings_init') || function_exists('_p2p_init') && function_exists('wp_listings_init')) { | |
echo' | |
<div class="connected-agents">'; | |
aeprofiles_connected_agents_markup(); | |
echo '</div>'; | |
} |
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
function add_video_wmode_transparent($html, $url, $attr) { | |
if ( strpos( $html, "<embed src=" ) !== false ) | |
{ return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); } | |
elseif ( strpos ( $html, 'feature=oembed' ) !== false ) | |
{ return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque', $html ); } | |
else | |
{ return $html; } | |
} | |
add_filter( 'embed_oembed_html', 'add_video_wmode_transparent', 10, 3); |
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
//Filter the Taxonomy Meta on a CPT | |
function themeprefix_genesis_post_meta_filter( $post_meta ) { | |
if ( 'coaching_technique' == get_post_type() ) {//swap in CPT name | |
$post_meta='[post_terms taxonomy="difficulty-level" before="Difficulty Level: "]';//swap in taxonomy and label name | |
return $post_meta; | |
} | |
} | |
add_filter( 'genesis_post_meta','themeprefix_genesis_post_meta_filter', 11 ); |
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 | |
/** | |
* This file adds a Landing template to any Agent Evolution Genesis Child Theme. | |
* | |
* @author Agent Evolution | |
* REPLACE themename WITH THE NAME OF YOUR THEME | |
*/ | |
/* | |
Template Name: Landing |
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 | |
/** | |
* This file adds the AgentPress Listing single template to any Agent Evolution theme | |
*/ | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single' ); | |
// Uncomment the following line enable comments on listings | |
// remove_action( 'genesis_after_entry', 'genesis_get_comments_template' ); |
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 | |
/** | |
* This file adds the AgentPress Listing archive template to any Agent Evolution Theme. | |
* | |
* @author Agent Evolution | |
* @package Move-in Ready | |
* @subpackage AgentPress Listings | |
*/ | |
/** |
OlderNewer