Insert content into specific page
-
I’ve seen many posts that share this title but I want something different than them.
I am currently writing a plugin so that only logged-in users can see specific pages. I tried to achieve this by adding a simple if-block with a check to these pages if the current user is logged-in.
On my menu page, all pages are listed with a checkbox beside them. Now comes the part where I need help. I read about using add_filter or enqueue_script to insert content into a page. But it seems I can’t specify on what page to use these functions without writing them directly into the pages.
So is there a way I can alter the content of a page dynamically, maybe based on the id or something?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Insert content into specific page’ is closed to new replies.