Dynamic content in modal

Hello there,

We are using a custom post for staff members and would like their post content to appear in a modal that is launched from a brief profile card. The profile grid is built with the Layout Builder.

What dynamic element should I use to pull in the main post content, tags, etc?

Kind Regards,

Spencer

Hello Spencer,

Thanks for writing to us.

Please be advised that the “The Content” dynamic element is available in a single layout while the “The Excerpt” dynamic element is available for the archive layout. If you are going to display full content for your archive layout, your only choice is to use a Raw Content element and insider this {{dc:post:the_content}} dynamic content code.

To display the Tag you need to follow these steps.

  1. Add the element Terms element
    Test-Page-Builder-Pro (33)
  2. Click on the List Items
    Test-Page-Builder-Pro (34)
  3. Set the Looper Provider as Current Posts Terms and Taxonomy as Tag

  1. Edit the styling as per your design.

Hope it helps
Thanks

Thanks for getting back to me, @prakash_s,

I have got the modal pulling in the content now.

Each bio will represent a staff member / user, but we had to create a custom post type for staff bios which are being displayed in this modal due to the layout we required. Do you know a better way of doing this?

Please click the More About… button beneath each profile here: https://leslieh7.sg-host.com/blog/

The correct content is displaying within each bio modal, but all tags and posts are also displaying. We would like to restrict these to the each relevant author - how do we link one of our custom bios to a Wordpress user so we can display the tags and articles related to them?

Kind Regards,

Spencer

Hello Spencer,

Please provide us your WP credentials first so that we can check how you were able to set up the bios. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi @ruenel,

Thanks for getting back. Please see the secure note.

Kind Regards,

Spencer

Hello Spencer,

You mean you want to have something like this?

The Terms underneath the Profile photo should have the Looper Provider Current Post Terms with Tags as the taxonomy.

Screen Shot 2022-03-19 at 10.11.46 AM

And the Posts element on the right side needs to have a Looper Provider Query String that uses post_type="post"&author_name="{{dc:post:title}}" wherein the {{dc:post:title}} is post title of the current bio.

Screen Shot 2022-03-19 at 10.12.21 AM

Hope this makes sense. Kindly let us know how it goes.

HI @ruenel,

Thanks for getting back to me.

Did you save this at all? My original modal layout and settings have gone…

Kind Regards,

Spencer

Hey Spencer,

I am another staff checking this thread. Would you mind explaining what is the previous modal layout? In that way, we can replicate it again.

Thank you.

Hi @marc_a,

Of course, please see the attached image used by @ruenal. The red arrows indicate the bio custom post type fields that were being displayed. The problem I was having was attaching the bio to an author/user, their tags and articles.

Kind Regards,

Spencer

Hello Spencer,

Please see the secure note below.

If you visit this page, https://leslieh7.sg-host.com/people/, and click the MORE ABOUT ANON TESTNAME modal toggle;

If you are wondering why SM and the rest of other Bios does not have any Post Items on the right, that is because we are using post_type="post"&author_name="{{dc:post:title}}" as your Looper provider which means that your Author nice name must be same as the Bio Title. take this for example:

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.