New Landing How can we help? Themeforest Theme Support Neighborhood Woocommerce archive description and pagination

Viewing 15 posts - 1 through 15 (of 44 total)
  • #82078
    lobbybros
    Member
    Post count: 52

    Hello

    I am working on my archive-product.php and would like for the woocommerce_archive_description to show up on all my shop pages (currently it is present on page one, but for pages 2 + it doesn’t show). How can I do this? Does it have to do with the theme or Woocommerce?

    Thks and kind regards
    Claudia

    #82509
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am not getting you exactly so please explain in detail.
    Thanks 🙂
    With Best Regards
    Swift Ideas

    #82732
    lobbybros
    Member
    Post count: 52

    Yes, basically on page 1 of my product archives, the description (I’m referring to <?php do_action( ‘woocommerce_archive_description’ ); ?> ) is showing just fine, but on page 2, page 3, page 4, etc the description isn’t showing.
    What I’m wondering is if it’s possible to make the description work with pagination so that it will appear on all pages in the product archives by adding some command or another.

    I have attached two screenshots of what I mean.

    Thks,
    Claudia

    #83023
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try to use this code :
    <?php echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>';?>
    INSTEAD OF

    <?php do_action( ‘woocommerce_archive_description’ ); ?>

    Thanks 🙂
    With Best Regards
    Swift Ideas

    #83104
    lobbybros
    Member
    Post count: 52

    Hi Mohammad, thks for yr reply.
    However, with the code you provided above now the page description is missing from all pages.
    Any ideas?

    Thks and kind regards
    Claudia

    #83371
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove that one code ans try to use this one:

    <?php 
    $shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
    echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>';
    ?>

    Thanks 🙂
    With Best Regards
    Swift Ideas

    #83413
    lobbybros
    Member
    Post count: 52

    Works perfectly! Thks!

    #83420
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Great! Thanks Mohammad 🙂

    – Kyle

    #83550
    lobbybros
    Member
    Post count: 52

    Wait…sorry but I just noticed an issue….

    The code makes the description show up perfectly on the Shop page, but unfortunately also substitutes the archive description on all my product categories (which were all personalized).
    What can I do?

    Thks and sorry again.

    #84037
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove that one code and use this one.

    <?php 
    if(!is_product_category()){
    $shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
    echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>';
    }
    ?>

    Thanks 🙂
    With Best Regards
    Swift Ideas

    #84108
    lobbybros
    Member
    Post count: 52

    Works fine on the shop page, but I am now missing the category description totally on the product categories! Any ideas?

    Thks!

    #84111
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am not sure that what do you want ? I am totally confused.
    Thanks

    #84198
    lobbybros
    Member
    Post count: 52

    Sorry for being confusing!

    Basically, our basic shop page has a description set up in the pages section, while all our specific product categories have a description set up in the product categories section. What we would like is for each category to show its specific description and for shop to show its specific description, but for this to also be compatible with pagination.
    Is this possible?

    Thks again!

    #84452
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove that code and use this code .

    <?php 
    if(!is_product_category()){
    $shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
    echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>';
    }else{ 
    do_action( 'woocommerce_archive_description' );
    }
    ?>

    Thanks 🙂
    With Best Regards
    Swift Ideas

    #84564
    lobbybros
    Member
    Post count: 52

    Thks! However, the Shop page works fine while the description is missing on product categories.
    Sorry for all this!

Viewing 15 posts - 1 through 15 (of 44 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register