Site logo

[Resolved] How to replace main content using element block ?

Home Forums Support [Resolved] How to replace main content using element block ?

Home Forums Support How to replace main content using element block ?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2607402
    bruno

    Hi

    I created a custom post type for which I want the main content to have a specific design and text placement (ACF).
    I created a block element, but I don’t see any option to replace main_content with it ?

    Thanks

    #2607406
    David
    Staff
    Customer Support

    Hi there,

    use a Block Element, with the Display Rules set to your single post and set the element type to Content Template:

    https://docs.generatepress.com/article/block-element-content-template/

    #2607632
    bruno

    That works perfectly thanks !

    Is there a way to integrate custom fields in the loop query ?

    #2607655
    Ying
    Staff
    Customer Support
    #2607745
    bruno

    @Ying, I found that section, but there’s no ACF or similar in it. I want to show only elements with a specific custom field value from a CPT.

    #2607910
    Ying
    Staff
    Customer Support

    ACF or other same kinds of plugins create custom fields for certain post types, and store data as the post meta.

    You can set the source content to post meta, then enter the ACF field name.

    #2607926
    bruno

    I’m sorry, I don’t see that option, can you make a screenshot please ?

    #2607933
    Fernando
    Customer Support
    #2609066
    bruno

    Thank you Fernando

    #2609085
    Fernando
    Customer Support

    You’re welcome, Bruno!

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