Update change my archive item

This topic contains 3 replies, has 3 voices, and was last updated by  Naveen Giri 4 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #528735

    Henrique Takeguma
    Full Member
    Post count: 10

    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

    #528754

    Kor
    Moderator
    Post count: 16516

    Hi Henrique,

    Thanks for your post. Custom PHP code from GDv1 might not work correctly on GDv2. Kindly share your Website WP admin access here and we’ll check this out for you asap!

    #528757

    Henrique Takeguma
    Full Member
    Post count: 10
    This reply has been marked as private.
    #529927

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Henrique,

    This issue is already fixed in another ticket.
    https://wpgeodirectory.com/support/topic/archive-item-vs-package/

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket