[Resolved] Can I use Content Template Block Element in a section of my front page?

Home Forums Support [Resolved] Can I use Content Template Block Element in a section of my front page?

Home Forums Support Can I use Content Template Block Element in a section of my front page?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2035203
    Rachel

    Hi!
    I created a Block Element for displaying my custom post type that I am using on the archive pages. I would like to include on my front page a few of the custom post type posts, using the formatting of my Block Element.

    I tried using the WordPress provided Query Loop block in the page editor, and adding my Block Element as a Reusable Block, but it does not allow me to use the dynamic content that is included in the Content Template. I also tried adding the Front Page as a Location in the Element settings, but it replaces all the content with just one “Home” block, which is obviously not what I want.

    Is there a way that I can do this? Would I have to use a custom page template? How would I add my Block Element to the custom PHP template?

    #2035246
    Elvin
    Staff
    Customer Support

    Hi Rachel,

    Block Element – Content template only works on query post loops generated for default archive pages and the index blog page. It can’t be applied to query loops that are added in by a widget or third-party plugin, unfortunately.

    In the future, Tom plans to merge WP Show Posts with GenerateBlocks so you don’t have to get another plugin for this. But for now, the workaround will be a post grid plugin that allows you to customize it’s styling and layout so you can replicate the styling/appearance of the one you did on Block Element – Content template.

    A wise man once said:
    "Have you cleared your cache?"

    #2036371
    Rachel

    Thank you for your response Elvin! I’m glad this will be an included feature in the future.

    However, I’ve looked at a bunch of post grid plugins, and none of them really give the options I need without paying for their Pro version (which I really don’t want to do on top of paying for GP and GB…)

    Would it work if I used the built in posts instead of my custom post type (I’ve found online tutorials where you can change the labels on the default posts). Then if I set it so that the index blog page is my front page, could I add other Hook Elements to that page (before and after the posts) to complete my home page?

    I want to ask if this will work before I go to all the trouble 😉

    #2036378
    Ying
    Staff
    Customer Support

    Would it work if I used the built in posts instead of my custom post type (I’ve found online tutorials where you can change the labels on the default posts). Then if I set it so that the index blog page is my front page, could I add other Hook Elements to that page (before and after the posts) to complete my home page?

    Yes, you can use block element – hook or hook element to insert content you want to add to the blog/home page.

    #2036426
    Rachel

    Thank you so much Ying!

    #2036444
    Ying
    Staff
    Customer Support

    You are welcome 🙂

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