Need help with custom variables

Ticket for: Post Grid
0
Need help with custom variables 1
1TehYwrvhgz6n
Dec 24, 2021 08:28 AM 1 Answers
Member Since Dec 2021
Subscribed Subscribe Not subscribe
Flag(0)

I have Post Grids Pro and Advance Custom Fields on my site. I have created a custom field on my posts called flipbook_id. I am trying to create a post of my recent flipbooks on a page where if someone clicks on them it will open the flipbook in a whitebox.

I need to attach a CSS call to the feature image on the blog post with the flipbook ID number in it. Something like “open_flipbook_[flipbook_id]”. However I don’t know how to get the Wrapper custom class to include the flipbook_id.

In Post Grid I am adding a general media source. The first option is the Wrapper custom class field. I can hard code the flipbook code in there and it works, but I need it to be dynamic based on the custom field I set up in the post.

My question comes down to this, how can I append a custom variable from a post inside of a Post Grid ‘Wrapper custom class’? I tried adding a short code in the field but it won’t let me do that either. I saw your post on the regular support page for the plugin but I couldn\'t find reference to including an ACF field in a \"general\" container anywhere on the web. I am assuming there is just a formatting issue to add the custom field data to the general form but I don\'t know what that is, or if I do need to include custom PHP coding to do that.

0 Subscribers
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Need help with custom variables 2
PickPlugins
Dec 24, 2021
Flag(0)
Welcome to our forum. There is a filter hook available for grid item wrappers. https://pickplugins.com/documentation/post-grid/filter-hooks/post_grid_grid_items_class/ There is also a class field under layout builder for media and thumbnail elements, but these are hard text classes, I can update the plugin to add shortcode support. https://imgur.com/j6XpjNk https://imgur.com/ruJoarF let me update the plugin for adding shortcode support these class parameters
Sign in to Reply
Replying as Submit