How you do this could be more or less hard depending on where the content is supposed to be included in the page, and you don’t explain that, but assuming you are including it in the post body…
add_filter(
'the_content',
function($content) {
global $post;
$db_showmap_options = get_option( 'db_showmap_options' );
if (!empty($db_showmap_options['page_id']) && $post->ID == $db_showmap_options['page_id']) {
$content = "whatever you need to do".$content;
}
return $content;
}
);
Untested but I am fairly sure that will work.
You may need output buffering, depending on how your showmap.php
is written.
Related Posts:
- Redesigning Custom Post Type “Add New” page
- Notify Admins about Plugin Merge
- Is there any record of installed plugins in the database?
- Adding Featured Image in Post List
- Why does including a file in theme’s functions.php not work?
- WooCommerce – Call to undefined function is_woocommerce()
- Custom headers for the WordPress plugin directory
- OEmbed from Pinterest
- How can I add a custom header to a custom template in a plugin without using the theme folders
- Trying to avoid including wp-load.php
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom values are not translated
- Make the plugin directory recognize new version numbers
- Should I use RIPS tool to test my themes and plugins?
- Add Top-Level Menu that opens URL
- Change the name of an installed plugin
- Issue with post request to admin-post.php
- action-scheduler vs wp-background-processing
- Do you clean up your self-written plugins’ at deactivation?
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- How to make first_name and last_name required fields in user profile?
- like to keep reading plugin
- Check if email address exists front end with AJAX in a plugin
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- Global matrix for shortcodes/content for every page
- How to add class in plugin only for network site?
- Plugin Development sqlite or WordPress’ database
- How to write a plugin to add users to a mail list
- WordPress plugin for activating other plugins
- Can we use a webservice with WordPress?
- WooCommerce get_price returning wrong price when used via ajax
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- New User Form – Custom Menu Page
- Checking instances of scripts in wp_head
- AJAX search posts and pages
- Combine scripts from all extensions of the plugin when an extension is activated
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- How can I prevent my plugin go development trunk [closed]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Checkbox conflict in my custom plugin admin page
- how to do login using woocommerce rest api From android
- How to create a code editor for my plugin .?
- How to create a custom shortcode based on the layout?
- Manually set a custom admin sub-menu selected?
- Can a Plugin Override New User Default Role Type
- How to test ‘upgrader_process_complete’ hook in plugin development?
- How to let user store a file in plugin directory but not have it get deleted on update?
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- Plugins ignored a line breaks or tag in the WordPress comment functions
- How to get path or root of plugin folder, not file or dir?
- How to make custom plugin run on demand?
- Change letters for day name
- (WordPress 5.8.3) Function.php or a plugin for better performance? [duplicate]
- What is the easiest way to rename a plugin (and also avoid plugin updates)
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- Using WordPress to build membership Page
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Elementor Custom Control: How to get input value?
- Correct Plugin File Path
- strange shortcode error: does shortcodes requires any dependency?
- WordPress API functions not working at AJAX functions.php call
- How to check homepage contain blog post?
- How to edit link for comment count
- Integrating Custom Database with WordPress
- How to get the custom field value using SQL query
- specific rows style for in custom list table using WP_List_Table
- How to add the search page link to the anchor tag?
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- Creating one user access account for all the multiple sites
- Using id to show item
- return bbp_get_topic_author_id as integer
- I am Getting Sorry, no posts matched your criteria on form submit only for certain page [duplicate]
- wpdb update method is updating but not refreshing the current page data
- Shortcode and WP query using category attributes
- Securing a plugin pop-up window
- Dynamic input fields in WordPress Plugin
- Custom role not listed
- Is admin section completely customizable in terms of styling?
- Better way to run heavy scripts using WordPress database
- how to check plugin name unique or not?
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Change default url to plugin custom post type
- Creating a user ‘add custom field’ section
- WordPress ajax not working in registration
- How to show post attachment image
- Can a developer adopt a plugin marked as “not updated in over 2 years”?
- Making a Custom Post Type Publish Loop
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- Someone Comment 1000 times in a Day in My WordPress Site, What Can i Do
- get_option returning a different value from what’s saved
- Plugin: Custom menu item problem
- Getting warning of Missing argument 2 for wpdb::prepare()
- Jquery post responses 500 error after some time and lastly an 503 error
- WP Elementor Pro causing crtical failure on website
- Function not being called on form submit, only blank admin-post.php page
- How to give specific class name to category in wordpress with code snippets
- Display Any Field fromAdmin Panel in Frontend via Shortcode?