You need to return the filtered content, try like this:
add_filter('the_content', 'emd_content');
function emd_content( $content ) {
if ( is_page('Member Directory') ) {
include dirname( __FILE__ ) . '/content-members.php';
}
elseif ( is_page('Contact Members') ) {
include dirname( __FILE__ ) . '/content-member-contact-form.php';
}
else {
return $content;
}
}
But the better way is to use custom page template for those pages.
Related Posts:
- Add hook after content without formatting
- Can I add content before post content without using the_content filter
- WordPress Add advertising ads befor and after content with periority [closed]
- Pass PHP variable to javascript
- Where is the best place to use add_filter
- Creating a WordPress admin page without a menu for a plugin
- Edit plugin without hooks in functions.php
- Create page when plugin is activated
- Using add_filter inside another class
- How can I show drafts in wp_dropdown_pages list?
- WordPress adding tags into plugin content
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Pass A Value From Outside To A Plugin Variable
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Custom preview_post_link not working for draft post
- Add Fields with Sub-Fields to WP Job Manager
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- How Can A Plugin Hook Itself To the End of Every Excerpt?
- add_filter the_content in functions.php not working
- How can plugins have their own pages?
- Create a custom page template inside my wordpress plugin
- Do action only on certain front end pages?
- Creating a plugin to sanitize comment and the url field before display only
- How to find the origin of a file upload from within wp_handle_upload?
- White page by using filter template_include
- How to check current user before all actions and filters?
- Create a navbar filter that filters by a custom field
- Passing an array from shortcode-function to filter-function
- Get Time Taken By Each Action Hook in WordPress
- php page not found for plugin options menu
- qTranslate remove default directory from link
- Output content to the_content before a plugin does
- How to change the name of the “edit my profile” link in the WordPress admin backend
- add_filter doesn’t work
- Redirect to another page using contact form 7? [closed]
- Check if variable is set in filter
- Check filter defined or not?
- Add a function call after content automatically?
- what is the point of telling add_filter how many parameters you want passed to the function?
- How to add filter for wordpress plugin?
- How to use add_action for multiple instances of the same class
- Filters on the_content with plugins, pages and shortcode
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Pass PHP variable to javascript
- Want to create custom design of progress indicator in wpforms
- Using OR Condition with facetwp facets
- Randomize post (and page) IDs on generation
- WordPress Frontend Page using Plugin
- 500 Internal server error wp_handle_upload_prefilter
- Nested Actions and Filters
- WordPress the_content Filter and GET Parameter
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- Get content and send to 3rd party
- Choose default template for a page with code
- How Can the_post Be Hooked Like the_content and the_excerpt?
- Update Plugin Without Overwriting Custom Settings
- trying to create simple plugin to filter categories from all authors
- shortcode which is introduced into entry the blog, and appears in side bar
- How do i get all author posts on custom post type list
- Retrive images from the_content()
- How to tell which Plugin is displaying?
- Redirect url in plugin to somewhere else?
- Which action/filter can i use for a Member Plugin [closed]
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- Meta box not displaying on the plugin page
- How to access the page without registering in wordpress
- Read page- or post-content across different builder-plugins
- How can we extent core/group or cover block?
- wp_head filter not executed inside custom class
- WordPress Social Login > Post to a users Facebook wall
- Best way to hook a custom url?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- Read text defined under __()
- How to change commenter links to /user/user_id?
- Is there a filter for get_post_custom()?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Execute a plugin only on post pages
- Plugin Using get_the_content Causing Issues With Tag
- What is the best way to mimic a search query within a plugin
- Next and/or previous post content
- Serialize data for wp options
- Remove rewrite rules generated by plugin during deactivation
- How to trigger $_GET request within admin plugin page?
- HTML in WooCommerce settings
- Can I hook into get_avatar to supply a hash instead of an email?
- Plugin Paths Issue
- Building an email signup form. Where should the information be saved in the DB?
- Can WordPress Plugin Directory Cache Delay the Upload of Images?
- Why my Plugin keeps deactivating automatically?
- Determine Registered Admin Menus
- How to generate video out of images via WordPress plugin
- How can I add an options page for my class based plugin?
- How to Create a Custom Plugin Permalink
- Sending WP posts to external API
- How to write a plugin to add users to a mail list
- What function can I use consistently to escape possible HTML for editing and display?