Hello I was using the following code to have portfolio items go to assigned pages. When I upgraded Pro it broke. Please advise as this runs much of the website: https://www.experiencepinpoint.com
Click any portfolio thumbnail and it goes to a blank portfolio page, not the page it’s been assigned to go to. Thanks for the help
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
// Additional Functions
// =============================================================================
add_filter( ‘post_type_link’, ‘x_remap_portfolio_permalink_to_project_link’, 10, 4);
function x_remap_portfolio_permalink_to_project_link($post_link, $post, $leavename, $sample) {
if ('x-portfolio' == $post->post_type) {
$custom = get_post_custom($post->id);
if (isset($custom['_x_portfolio_project_link']) && $custom['_x_portfolio_project_link'][0]!='')
return $custom['_x_portfolio_project_link'][0];
}
return $post_link;
}
function alnp_support() {
add_theme_support(‘auto-load-next-post’);
}
add_action( ‘after_setup_theme’, ‘alnp_support’ );
add_filter(‘essgrid_query_caching’, ‘eg_disable_chache’, 10, 2);
add_filter(‘essgrid_get_posts’, ‘eg_mod_posts’, 10, 2);
function eg_mod_posts($query, $grid_id){
if($grid_id == 21){
$exclude_id = get_queried_object_id();
$query[‘post__not_in’] = array( $exclude_id );
}
return $query;
}
function eg_disable_chache($do_cache, $grid_id) {
if( $grid_id == 21 ) {
return false;
}
}