Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1376281

    So I have this new site I am working up, asiamluxe.com

    On the home page there are to be two sections, one showing 3 portfolio posts “Hot Topics” and another below it showing all the rest of the portfolio pages, All The Latest.

    The second portfolio grid has several subcategories as you can see, the top one will only ever have the three increments. My issue is when you go to page 2 of the portfolio posts on the bottom portfolio section, all the latest, it makes a new page but the top portfolio grid does not display but the color section and title for hot topics does.

    Hence is there a way to hide this hot topics section on page 2 and/or 3 etc, when you click to see more entires on the bottom all the latest section. Or hide just the title?

    Or conversely is there a way to have the hot topics posts still show up when you’re on subsequent pages of the bottom all the latest section?

    I suppose I could create the top three increments in hot topics another way so they are part of the page and then they would be there always, but ideally I want them to disappear when on page 2 and so on on the bottom grid section.

    If I have to I will combine the two sections but I’d rather not.

    Thanks for your kind attention.

    #1376486

    Hey tonyiatridis,
    Thanks for the link to your page, as I read your post I see that you say about the hot topics: ideally I want them to disappear when on page 2 and so on
    so the solution is to hide the Hot Topics section when pagination is used.
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function hide_section_when_paging() { ?>
      <script>
    (function($){
      	if (window.location.href.indexOf("avia-element-paging") > -1) {
        $("#top.home #topics").css({ 'display': 'none' });
      } else {}
    })(jQuery);
    </script>
      <?php
    }
    add_action('wp_footer', 'hide_section_when_paging');

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.