Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Archive Cards on part to Homepage

  • Hi

    I have a site that includes a blog.

    The blog page (below) uses a Content Template with Archive Cards.

    I want to create something similar (card layout) on the homepage. You can see my initial attempt towards the bottom of the page using a GP Query Loop.

    In addition to visually looking the same as the cards on the blog page, I want this section of the homepage to select and sort posts:
    – Posts marked “featured” (e.g. as a tag, category, or other) are always first
    – Other posts are shown in reverse chronological order

    Can you please give me some advice on how to achieve this?

    Cheers
    Shaun

  • Hi there,

    I would suggest setting the featured posts as sticky posts, so they always stick on the front.

    The WP query is ordered by published date by default (latest on the front), so you don’t have to specifically set for that.

  • Thanks Ying
    How would you suggest formatting the cards so they look the same as on the blog page?
    Cheers
    Shaun

  • See 30 sec video link below

  • Hi there,

    Inside the Query Loop Post Template container, you should be able to collapse it and edit the individual elements inside to match the layout you want to achieve.

    Regarding the posts-per-page issue, try editing the Query Loop and adding a new Sticky Parameter, then set it to Ignore.

  • Thanks Alvind

    That all worked.

    My last question: If you look at the Helpful Advice section at the bottom of the homepage, you will see that the archive cards are not the same height as each other. How can I fix this?
    Cheers
    Shaun

  • That section seems to adjust accordingly due to the excerpt length. Could you try setting the excerpt length to a shorter value?

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