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
- Get plugin directory from a theme
- Custom admin column disappearing when using Quick Edit [duplicate]
- How can I translate the name of my Plugin for other languages?
- Getting User email on logout. wp_logout
- Logs to check when the plugin was first installed for the first time
- Can a plugin add to header/footer/body content?
- Pass info from functions.php to plugin
- add_query_arg not working
- How do I add a custom sub menu menu under Woo-commerce marketing?
- User Session and Stored Cookies not get removed
- Plugin Development Form Self Submission
- Activate my plugins via FTP
- How to add apply_filter for a class property in plugin
- update_option_{$option} not showing old value
- creating a plug in that would tap into save/update action of posts [closed]
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- plugin enqueue style on all pages
- What is necessary to secure a WP plugin against direct file access attempts?
- Add a Custom Field in Comment Box next to the Text area
- How do you create a re-useable HTML fragment in wordpress
- Displaying page content from plugin, inside exising empty WP page
- How to put a maximum real-time users limit
- Custom admin plugin read CSV
- plugin installing error
- How can I use wp_ajax_response for front-end error reporting?
- Creating a page that does not show up in the frontend navigation bar
- Is it possible to run javascript on plugin deactivated?
- How to fix ‘Call to undefined function do_settings()’ error?
- add_filter adds output in the head