Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #80610

    grantjenkins75
    Participant

    Thanks for your reply. I understand that is the default. Is there a way to turn that off so that page nav will work with the filterable index?

    #80692

    Mrinal
    Member

    Hi Grant,

    Well, at this moment it’s not possible but worth to try at least once.

    To do so, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

    Now, Follow the steps described below one by one:

    1) Copy this: x/framework/views/global/_index.php file, paste it into child theme’s path: x-child-ethos/framework/views/global/_index.php

    2) Now, open the child theme’s file using Text Editor & find the line </div> at line no. 43

    3) Add <?php pagenavi(); ?> right after it.

    4) Final Code (From line 25 to 44.):

    <?php if ( $condition ) : ?>
    
      <?php x_get_view( 'global', '_script', 'isotope-index' ); ?>
    
      <div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">
    
        <?php if ( have_posts() ) : ?>
          <?php while ( have_posts() ) : the_post(); ?>
            <?php if ( $stack != 'ethos' ) : ?>
              <?php x_get_view( $stack, 'content', get_post_format() ); ?>
            <?php else : ?>
              <?php x_ethos_entry_cover( 'main-content' ); ?>
            <?php endif; ?>
          <?php endwhile; ?>
        <?php else : ?>
          <?php x_get_view( 'global', '_content-none' ); ?>
        <?php endif; ?>
    
      </div>
    <?php pagenavi(); ?>

    Quick Tip: After your child theme is setup, you can review how we recommend making template changes in Customization Best Practices. X is quite extensible with child themes, so there are plenty of possibilities.

    Hope this helps, Cheers!

    #80855

    grantjenkins75
    Participant

    Thank you for your help. I followed the instructions and verified the updated _index.php file, but it is not working. Maybe I did something wrong? Or maybe it’s just not a possible fix?

    #80919

    Rad
    Moderator

    Hi Grant,

    It will not work. Paging is not possible in multiple WP_Query. And Filterable index uses WP_Query for each category.

    It’s like this.

    for each category {
        for each post with this category {
          show post
        }
        paging should be right under the post query, and should be here.
        but it will still not work, because it's inside category query and you will only see paging duplicates.
    }

    So turning off the category loop, will also turn off the post loop because it’s inside the category loop. The other thing is, filterable doesn’t utilize page/paged query_var that uses by standard post loops.

    Thank you.

    #80931

    grantjenkins75
    Participant

    Ok, thanks for your help. Maybe that’s a possible fix in a future version. The filterable index is a great feature, but I can’t use it without additional page nav options.

    #80978

    Rad
    Moderator

    You’re welcome! But yes, already added on my list for enhancement. We already tried it here in forum as user request too, and it didn’t work because it was intended to group post by category.

    Thanks!

    #108991

    Sarah K
    Participant

    I also vote for you guys to add the “all” category!

    #109005

    Christian
    Moderator

    Thanks for your feedback Sarah.

    #136532

    dscuba
    Participant

    I tried following this string until my eyes started to gloss over. 🙂

    I appreciate Sarah K’s ingenuity for us bloggers and followed her simple workaround and it works like a charm. Good thing All starts with an “A”. I hope Team X does decide to make this easier for new users as it makes logical sense that the Filter index should match the Nav bar order and show all post one time by default.

    When I created and added code to _index.php, it showed all my subcategories, which was a bit much.

    Thanks again All 🙂

    EspressoulCafe.com

    #136651

    Rad
    Moderator

    Hi dscuba,

    Thanks for posting in. Added your request too 🙂

    Though, with wordpress limitation, posts can have multiple categories which mean they can exist from each category group. Showing all will just display some duplicates. We’re still on it, but there is no ETA yet.

    Cheers!

    #141555

    asin
    Participant

    Guys
    A quick qn : I am able to get ‘All’ – but I prefer the blog page to now show latest articles from all selected categories.

    How does one go about this?

    #141677

    Paul R
    Moderator

    Hi Asin,

    Thanks for writing in!

    The blog page by default shows latest articles from all selected categories.
    Can you provide us your site url so we can take a closer look.

    Thanks

    #142328

    asin
    Participant

    @support : here is what is happpening.
    let’s say I have 3 categories : A, B and C.
    Currently, the filterable index is showing articles from category A first (even though I have latest articles in category B and C).

    That is, not yet sorted by date – but by category (alphabetically). Is there a way to fix this?

    #142549

    Zeshan
    Member

    Hi Asin,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you.

    Thanks!

    #150528

    dscuba
    Participant

    Hi Team X,

    From your reply in this thread dated June 11, 2014 at 3:42 pm #55220

    How can your code be changed to not display all of the category post as the default setting. The page load speed slows down with too many post. I’d like for the ALL category to display ONLY with the latest 10 post, but still maintain the Filter By Topic functionality as it is.

    Thank you for your support!