Hello,
I updated to the new version of Geodirectory, and my home page archive item changed to the default layout, i use the snippet below to show archive item accordly to package(in my case 2package). I use it in /home/ibentou/public_html/wp-content/themes/supreme-directory/functions.php.
BUT i don’t have 100% it occurred because update.
After this problem I installed Snippet plugin to manage even not showing like before
Is this update affected something about it?
–Snippet————————
function gd_snippet_010619_archive_item_page_id( $page_id, $post_type ) {
global $gd_post;
if ( ! empty( $gd_post ) && ! empty( $gd_post->package_id ) ) {
$package_id = $gd_post->package_id;
if ( $package_id == 167 ) { // MATCH PACKAGE ID
$page_id = 620; // ARCHIVE ITEM PAGE ID from PAGES
} elseif ( $package_id == 169 ) {
$page_id = 598;
}
}
return $page_id;
}
add_filter( ‘geodir_archive_item_page_id’, ‘gd_snippet_010619_archive_item_page_id’, 10, 2 );
Thank you