Hi,
I found this example for creating custom Archive Item Template which looks superuseful (the Archive item Per Price Package -example):
https://wpgeodirectory.com/docs-v2/templates/archive-item/#customizing
Could you please provide an additional example?
If possible I plan to use this for having different Archive Item Templates based on the page.
I tried this without luck (I want to use a different Archive Item Template for gd_place when on frontpage and I have created the extra page for this):
function gd_snippet_customgdplace_archive_item_page_id( $page_id, $post_type ) {
global $gd_post;
if ( ! empty( $gd_post ) && 'gd_place' == get_post_type() ) {
if ( is_front_page() ) { // MATCH PACKAGE ID
$page_id = 251; // ARCHIVE ITEM PAGE ID from PAGES
}
else {
$page_id = 253;
}
}
return $page_id;
}
add_filter('geodir_archive_item_page_id', 'gd_snippet_customgdplace_archive_item_page_id', 10, 2);
Thanks!