How you are applying a filter is wrong. You need to bind a function to the filter, but you are providing a variable.
function my_filter( $content ) {
return $content . 'My added code';
}
add_filter( 'the_content', 'my_filter' );
You should add the code like this, this should work.
Related Posts:
- Admin Ajax is returning 0
- How does admin-ajax.php work?
- is_admin() returns true when using admin-ajax.php from front end script
- How to save dismissable notice state in WP 4.2?
- Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
- WP List Table custom quick edit box – post meta data missing and columns change on submit
- Styling Shortcodes in Visual Editor
- Conditional check for front-end which includes ajax
- Possible to create placeholder images in WordPress editor that are clickable (should bring up uploader)?
- Gallery Settings Change available Columns
- Is it possible to hook AJAX to UPDATE-button?
- Calling a shortcode in the backend
- Is it safe to post form data via Ajax to the settings api? Am I missing something?
- Restrict function call to page load but not ajax call
- Determining whether it’s a AJAX call from front-end or from back-end
- Wp ajax not working from “current_screen” admin hook
- Parsing post->ID in included plugin file
- How to fix: Clicking ‘Quick Edit’ link in Admin (edit.php) makes posts disappear?
- Where in WP can I check history or log of updates of plugins etc?
- Hide other users’ posts in admin panel
- Editor Styles and Typekit
- WordPress admin stylesheet
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- Can an admin check passwords of registered users?
- Prevent author from changing their posts if admin has modified
- Set Featured Image programmatically (in admin) with JavaScript?
- Can I set a default dashboard layout for all users?
- Taxonomy/category hierarchy lost when editing posts [closed]
- Making the thumbnails in the backend Media section bigger
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Customize the upload screen
- How to print the output of the get_num_queries function from frontend to backend?
- Javascript not working in admin
- Setting Login with User Name and Password default option for Jetpack Admin Login
- Downloading entire site locally with httrack
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- Adding markup to column text in “Edit Pages” admin page
- Why are my styles being applied to the admin area?
- Disable WP Editor for specific page templates
- Hide Updates from Admins that don’t equal a set Username
- Associating custom submenu item with post type of top level menu item
- Two admins in Users and one in the database?
- Editing the Backend Uploader
- Hide Pages on Edit Pages based on Capability (edit_others_pages)?
- Hide one admin from another admin
- Using shared SSL for login/admin
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- AJAX and Shortcode with Parameters
- How to add custom classes to admin list table default rows or columns?
- How to hide a specific part of dashboard for non-admin roles?
- Get a listing of portfolio items and categories
- WordPress Remove Submenus
- Continuous Login Sessions For Super Admins Across Multi-Site Network of Sites
- using rewrites to secure login page
- Redirect from the dashboard to edit.php if wp_is_mobile() is true
- Seems that admin_post_{action} does not executing
- If statement for admin page
- Customizing WordPress Admin – How to Change the Avatar size
- Create a WordPress administrator without access to back-end
- WordPress Brute Force Prevention
- How To Make Iris Color Picker Showed Up Over Form and Text?
- admin_enqueue_scripts not rending JS file correctly
- my checkbox is not saving it’s value
- Can’t login to my admin area
- How To Render Shortcode In AJAX Response?
- Private post hidden from Admin too
- Send admin to a different login than users?
- How much traffic is real traffic?
- How to change the descriptive text on the menus admin page?
- Getting rid of menu items on a custom taxonomy
- Having problem creating local instance of wordpress site
- WordPress Plugin Admin Tab
- Ajax request sends url rather than data
- grab or load text on demand
- admin-ajax.php returns 0 even when the post status code is 200 OK
- Gutenberg UI has changed
- Call require_once form admin page with checkbox
- How To Remove Import/Export Option From Tools?
- Highlight active Admin Menu when added though add_menu_page
- Get shortcode attribute for AJAX call
- Create WordPress Menu Item Without Linking to a Custom Page
- Search Only Works when Logged into Admin
- Missing content on website. Admins cant sign in
- Different role for free and pro users in wordpress without using bbpress
- Is Post-Form Resubmission somehow prevented in WordPress 4.2.2?
- Enqueue script throws error in console
- How to sort post_meta in edit.php?
- Scripts are not called until I login from wordpress backend
- Link to all posts page?
- WP Logs me out after updating anything on dashboard
- Adding additional text fields and image upload to a Page?
- Calculate and save an average in a meta
- plugin to upload to youtube via wordpress [closed]
- WordPress admin panel is blank
- Use the wordpress admin table
- deploying a standard build of wordpress in WHM/cPanel
- Why is my ajax live search not working when i use a shortcode to call it?
- How to enforce authentication for all resources?