Post Grid – Post IDs?

Ticket for: Combo Blocks
0
Post Grid - Post IDs? 1
Jerry Chan
Jun 06, 2020 03:41 AM 1 Answers
Member Since May 2020
Subscribed Subscribe Not subscribe
Flag(0)

In Post Grid Pro, is there a way to access the post ID of a specific item for use in the Layout Editor? I'm trying to insert a shortcode in the Layout Editor, but the shortcode doesn't know what post to access, so I need to feed it a post ID.

Also, your forum's search feature doesn't work. Any term I type into the search field yields 0 results! Makes the forum really hard to navigate.

2 Subscribers
Post Grid - Post IDs? 1
Post Grid - Post IDs? 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Post Grid - Post IDs? 4
PickPlugins
Jun 06, 2020
Flag(0)

Welcome to our forum.

Did you tried on admin layout editor?

you can simple access to global $post variable

global $post;

$post_id = $post->ID

Regards

Post Grid - Post IDs? 7
Jerry Chan
- Jun 11, 2020 05:44 AM
Flag (0)
0

Where in the layout editor would I enter this? If I use a CUSTOM TEXT element to use a shortcode, I can't insert PHP code in the custom text field to get post ID.

Sign in to Reply
Replying as Submit