[Resolved] Add custom field to block

Home Forums Support [Resolved] Add custom field to block

Home Forums Support Add custom field to block

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1679800
    Frank

    Hi all,

    Currently I’m trying to retrieve and display some custom fields in GeneratePress, which I have added through an own Plugin. With a Header element, I have the option to use {{custom_field.fieldname}}

    And when I add {{custom_field.pinterest_description}} to this header block, this works perfectly!

    Now however, I would also like to use the same field in another element (type: block) which I would like to include for example “after_content”. But when I do this I just get the text: {{custom_field.pinterest_description}} displayed on the fontend and not the content, like it does in the header.

    I know I could extend my plugin with a shortcode to display these fields, but I would like to know if there is a standard way to do this (just like in the header)?

    I’m preferably not looking for a solution to use ACF or another kind of plugin.

    Thanks in advance!

    #1679937
    David
    Staff
    Customer Support

    Hi there,

    GPP 2.0 has dynamic content in the Block Element – its currently in alpha – read more here:

    https://generatepress.com/introducing-the-gp-theme-builder/

    #1679989
    Frank

    Ah found it, let me try πŸ™‚

    #1680140
    David
    Staff
    Customer Support

    Feedback is always appreciated πŸ™‚

    #1788240
    Rishabh

    Hi, can GPP 2.0 extract dynamic content from “Advanced Custom Fields” ?

    [Edit] Okay, So I can extract dynamic text using the method mentioned here: https://generatepress.com/forums/topic/gp-premium-beta/#post-1652445

    But, is there a way to extract dynamic image from ACF fields?

    Cloud Tutorials: https://quickserp.com/

    #1788298
    Ying
    Staff
    Customer Support

    Hi Rishabh,

    Yes, dynamic blocks should work with ACF πŸ™‚

    #1788333
    Rishabh

    But there is no option to extract content from ACF fields.

    Edit: SOLVED

    Cloud Tutorials: https://quickserp.com/

    #1788491
    Ying
    Staff
    Customer Support

    Glad you figured it out πŸ™‚

    #1799874
    Sergio

    Hi Rishach!
    How did you solved?
    I would like to create a custom archive page with fields from ACF with the new feature of GP 2.0 but I am not able…
    Thanks in advance

    Doc, you don't just walk into a store, and buy plutonium! Did you rip that off?

    #1800021
    David
    Staff
    Customer Support

    Hi there,

    in the Dynamic text type – select Post Meta – and then in the Meta Field Name provide – add your ACF field name. This will work with simple fields.

    #2163037
    Gaurav Tiwari

    Is it possible to use Custom Fields, if I am not using GPP theme?

    #2163066
    Fernando
    Customer Support

    Hi Gaurav,

    Yes, this would be possible, but custom code would be needed. This would be out of our scope.

    Here is an article you may refer to with regards to what GeneratePress Premium Support includes: https://generatepress.com/what-support-includes/

    Hope this clarifies. πŸ™‚

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