Filters should return
their content, and not echo
it. That is why you see the output in your head as well
EDIT
I really have no idea why you would want to use require
or include
in your filter.
Here is an example of your filter should be coded
add_filter( 'the_content', myFunction );
function myFunction( $content )
{
$options = get_option('myPlugin_settings');
if ( is_page( $options['myPlugin_list'] ) ) {
return "--------------------------------------------------------";
}
return $content;
}
Related Posts:
- Is it possible to remove next-post / previous-post with out creating a custom template?
- How to filter the_content() & include content from template
- Can / should a widget plugin define its own Widget Area?
- Custom signature appears twice on page
- append code after the_content not working
- Difference Between Filter and Action Hooks?
- How to create an API for my plugin?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- How can I load a page template from a plugin?
- Using query_vars filter
- How to get Post ID with the Add Filter Function
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- How do you use the plugin boilerplate loader class to hook actions and filters?
- the_content after all shortcodes are parsed
- How Can I Add a Filter to Class Instance Only?
- How do I Make a Theme “plugin-ready”?
- Proper way to use apply_filters() with class functions?
- add_filter and remove_filter added before and after wp_query
- How to modify post content before writing to database?
- Actions or filters fired when data is saved in a custom table
- Determine which theme location a wp_get_nav_menu_items is for
- Display only certain posts based on visitor’s country?
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Conditional add_filter?
- Is it possible to create an action hook using do_action() within add_action()?
- Dynamically Override Fancy Title
- Calling apply_filters on non-documented hooks
- How to allow Unfiltered HTML in a wordpress multisite install
- Changing bloginfo description from a plugin
- Is there a way to verified if an add_filter is already applied?
- Define a function outside a class and call the function using action or filter hook
- Does add_filter work outside functions.php
- Synchronize Custom post type tags to WordPress default posts tags
- multiple functions with same filter
- Woocommerce – Hide a Column in Cart Table
- Finding the paragraphs in content
- add_filter : Passing an array instead of the callback function?
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- How to call function at the bottom of post using plugin?
- Namespaced action and filter tags
- Two functions utilizing registration_errors filter
- Is there a Filter that I can use to filter the tags before they are inserted in to the database?
- WordPress is automatically linking plain text email addresses
- get_current_screen() return null
- Problems with: manage_${post_type}_posts_columns
- Add code inside specific wordpress standard function
- Why doesn’t my simple the_title filter get applied?
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Can’t get woocommerce_get_price_html to work [closed]
- Search and Filter
- Caching the_content calls
- Run Shortcode of post’s custom field in functions.php / Plugin
- WordPress custom taxonomy check box to dropdown
- Using ob_get_content to get_search_form puts into infinite loop
- How to get all queries’s results after they have executed?
- Remove an action by extending class and replacing it
- ECHO Executing 4 Times In Head
- Bind a function with its own argument to show something dynamically after every content
- Inserted double quote when prepending to the_content
- Hook add_attachment error
- Call to undefined function is_home() or any conditional tags
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- Add function after the_content
- Update variable value via add_filter
- Shortcode conflicts
- Make wordpress join default user metas with a column from another table while displaying the wp_users table on the users screen
- Gravity Forms Anchor only on Front Page?
- How to find list of all functions bind to a particular hook from my plugin?
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- WP_NAV_MENU filter targets all menus
- How do i remove the title from a specific page
- Is there an action_filter hook to add content before the post title?
- Adding tables to dashboard pages programmatically?
- Add hook after content without formatting
- How to Create custom block for displaying information in content section which act like shortcode
- add_filter postbox_classes multiple post types
- Override category archive page title (not the head title)
- Limit get_next_post to posts from the same author
- Override woocommerce loop-start.php from theme using plugin?
- Any way, hook to add content right before the “read more” link?
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Redirect theme directory to plugin theme directory
- WordPress Reset password Strength set to medium
- Change Front page displays settings conditionally when user is online
- Add_action not calling callback function
- I have a plugin where in I have to change the title of the page dynamically by sending parameter to the_title filter
- Modify search form with plugin
- Single_template for a custom post type created from a plugin is returning an empty page
- WordPress Add advertising ads befor and after content with periority [closed]
- Caption Shortcode: what filter to change the image size?
- Confusing $tag specification for apply_filters call, in core options.php code
- Hook for plugin to show content for certain urls
- Filter the_content() to add custom figure tags
- WordPress permalink setting
- Apply Filters Causing a 500 Internal Server Error
- wp_mail_from not changing from address
- echo statement repeats
- Apply function on all action hooks?
- Do Not Back Up? Is there any accepted way to tell backup and clone plugins to skip a certain file? [closed]