May 27, 2025 4:52 pm
I created a shortcode that must only be usable from within the first post (is_first_post = 1).
The plugin is already fully working, I just need to add the check if it's being called from within the first post.
How can I do that?
I already had a look at:
$WPF = WPF(); $WPF_posts = $WPF->current_object['posts'];
But that lists ALL the posts (so including replies) on the page/of the topic... but it doesn't tell me from within which post I called the information.
Anyone an idea how to get hold of just the details of the post from which the shortcode is triggered?