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.

Dynamic Data

  • now I have the correct format (H2 and p and background and text color) but the content is back to dummy content.

    What I did is just exchange the code, put in the correct field name and give the blocks the css classes org-name and org-description respectively.

    Did I miss something?

  • The 2 headline blocks must contain some text.
    The one for displaying the Name field should have this text: org-name
    The one for displaying the Description should have this text: org-description

    So the text in the headline is the same as its class name.

  • ok… The field for the name now has the correct content and the correct format. The field for the description still shows the content of the block itself (org-description) and has the correct format.

    In the post itself I put into the block for the name ‘org-name’ and gave the block the css classes organisation-field org-name

    In the post itself I put into the block for the description org-description and gave the block the css classes organisation-field org-description

  • David for the description I found a solution. I thought if your code would work with the name (which is a ACF-generated field) it would work with a second field from ACF as well.

    So I made another ACF field called beschreibung_lang and dumped the organization description into this field and replaced the code line

    $description = term_description( $term );

    by

    $description = get_field( 'beschreibung_lang', $term );

    Now I can show the organization name and the description with the correct text and the correct format.

    If this solution is ok for you, I would appreciate it a lot if you could help me with the button link.

    Many thanks in advance.

    Klaus

  • Glad to hear that is working, and yes that is a good solution

    For the button. Starting over:

    1. Add the PHP Snippet
    2. Add a Button, give it some label text.
    3. In Advanced > Additional CSS Classes add: org-home
    4. Then enable the GB dynamic data and set the Link Source to the Current Post.

    Let me know,

  • Hi David,

    good to hear from you.

    Did the above. Few comments:
    1. ‘Current Post’ doesn’t exist as Link Source. I did choose ‘Single Post’ instead.
    2. Link is now filled but with the wrong content. Basically the link links now to the same page we are on already.
    3. Link should link to the homepage which is in ACF-field ‘homepage’, which is the homepage of the organization.
    4. See results here: https://gleich-teilhaben.de/ausstellungseroeffnung-selbsthilfe-und-migration-duesseldorf/

  • Sorry… correction: it works. Somehow the button class got lost. Now that I have doublechecked that it seems to work.

    Many thanks for you patience.

    Great support.

    Klaus

  • Awesome – glad to be of help!

Viewing 8 posts - 17 through 24 (of 24 total)
  • You must be logged in to reply to this topic.