Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #895420
    cmeklir
    Participant

    Using Integrity. How would I filter the 4 most recent posts out of the blog page loop? (It is not the front page). I tried to do this with css but it looks like I need to go the function route. (It didn’t recover the space and the css removed the 1st 4 posts on page 2 and 3 also).

    #896330
    Christopher
    Moderator

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #896629
    cmeklir
    Participant
    This reply has been marked as private.
    #897341
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> CSS :

    .blog div#x-iso-container article:first-of-type, .blog div#x-iso-container article:nth-of-type(2), .blog div#x-iso-container article:nth-of-type(3), .blog div#x-iso-container article:nth-of-type(4) {
        display: none;
        height: 0;
    }

    Hope it helps.

    #897448
    cmeklir
    Participant

    Thanks, I had to add this to add the first 4 posts back on the other pages. When I tried css before I din’t use the height:0; part. I thought changing display to none would do that by itself. Now this does everything that a function filter would have done except replacing the 4 posts removed from the first page with others at the bottom of it. Nice.

    .paged div#x-iso-container article:first-of-type, .paged div#x-iso-container article:nth-of-type(2), .paged div#x-iso-container article:nth-of-type(3), .paged div#x-iso-container article:nth-of-type(4) {
        display: block !important;
        height: auto !important;
    }
    #897784
    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    Have a great day! 🙂

    #1012860
    cmeklir
    Participant

    That code stopped working. Now the 4 latest posts appear on the first page of the blog when they should be hidden (since they are on the home page already). I thought it was because I had made a css error after this code since I added a lot but I moved these two paragraphs to the end of the simple custom css plugin’s css and they still didn’t start working again.

    .blog div#x-iso-container article:first-of-type, .blog div#x-iso-container article:nth-of-type(2), .blog div#x-iso-container article:nth-of-type(3), .blog div#x-iso-container article:nth-of-type(4) {
        display: none;
        height: 0;
    }
    .paged div#x-iso-container article:first-of-type, .paged div#x-iso-container article:nth-of-type(2), .paged div#x-iso-container article:nth-of-type(3), .paged div#x-iso-container article:nth-of-type(4) {
        display: block !important;
        height: auto !important;
    }
    
    #1012890
    cmeklir
    Participant

    Oops I forgot to change the container code to x-main after switching the blog to single column. Fixed.

    #1013012
    Joao
    Moderator

    That is great to hear it.

    Let us know if you need help with anything else.

    Thanks

    Joao

  • <script> jQuery(function($){ $("#no-reply-895420 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>