Site logo

[Support request] How to align grids

Home Forums Support [Support request] How to align grids

Home Forums Support How to align grids

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #2499759
    Ajay

    i an using generatblocks pro where i can see the option of sticky post suppose i want to display 4-5 sticky post on homepage with all posts what should i do for example this website please check in private box

    #2499780
    Fernando
    Customer Support

    It’s possible but you’ll need to exclude the sticky posts for the homepage on your Current Query Loop.

    Then, create a new loop for the sticky posts. We’ll need custom code to make sure it grabs only 5.

    Alternatively, you can just opt to include the sticky posts manually in the parameters. This could work as well.

    #2499813
    Ajay

    alright but what if i want to stick search bar on the top while scrolling up the page posts

    #2499868
    Ajay

    code is not working in related posts please look in private box

    #2500553
    David
    Staff
    Customer Support

    If it works on one Query Loop, then copy that query loop block and use it on your other pages. Then the CSS will work.

    #2500991
    Ajay

    nope it is not working

    #2501026
    Fernando
    Customer Support

    The site seems to be currently under maintenance. We can’t view it. Can you disable that setting temporarily so we can see why it’s not working?

    #2501030
    Ajay

    oh sorry now please check

    #2501062
    Fernando
    Customer Support

    Add cu-query-loop to the class list of the Grid Block under the Query Loop Block.

    Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

    Then, add this CSS instead:

    .gb-grid-wrapper.gb-query-loop-wrapper.cu-query-loop .gb-query-loop-item > .gb-container .gb-inside-container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .gb-grid-wrapper.gb-query-loop-wrapper.cu-query-loop .gb-query-loop-item > .gb-container .gb-inside-container > *:nth-last-child(2) {
        margin-top: auto;
    }
    #2501070
    Ajay

    but what should i do with your before code?

    #2501072
    Fernando
    Customer Support

    You can remove it. Just make sure to add cu-query-loop to all Grids under a Query Loop with the same structure.

    The new code should work for all GB Query Loops with an identical structure provided that this class exists.

    #2501140
    Ajay

    thanku so much code is working. i have 2 questions-
    1st- how can I make search box sticky on the top as it is while scrolling up the page?
    2nd – how can I make menu bar navigation pages a s a button so I could control that in generateblocks pro?

    /

    #2501158
    Fernando
    Customer Support

    Can you open new topics for these two new inquiries? We’ll do our best to assist you afterward.

Viewing 13 posts - 16 through 28 (of 28 total)
  • You must be logged in to reply to this topic.