Where do you want it to appear?
this function will put something before, or after, the content of each page.
function rt_before_after($content) {
$beforecontent="This goes before the content.";
$aftercontent="And this will come after.";
$fullcontent = $beforecontent . $content . $aftercontent;
return $fullcontent;
}
add_filter('the_content', 'rt_before_after');
If you want it somewhere in particular let me know where you want and I’ll provide other options.
Related Posts:
- How to create an input field, and base the output on spreadsheet data? [closed]
- WordPress metaboxes – textfield suggestion automatically populated
- Redirect to another page using contact form 7? [closed]
- Adding class to last list item? Not WP generated
- grab or load text on demand
- Create a pdf from the entries in DB
- Best collection of code for your 'functions.php' file [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- if plugin is active? check if plugin is enabled or not?
- Common functionality between my own plugins
- How can i force Display names to be the same as Usernames?
- How to override a theme function (within a class) using a plugin
- Seeking clarification on page request life-cycle
- How to assign user a role if none is present when logging in
- Edit Imported advanced Custom Fields from wordpress Dashboard
- How to remove action from plugin?
- Custom options page checkbox will not save, despite working with text
- Upload files programmatically to users
- How to find out what blocks are added by a plugin
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Plugin not saving values when placed in a folder within /wp-content/plugins
- Security checking in meta_box save is reluctant?
- plugin development: problem with functions
- AJAX button run function
- Dropdown menu on custom page with product to choose number of products per page
- UnWanted Custom field added in the wp page edit area
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Bootstrap Drop Down menu is not working
- How to query the custom fields by language?
- Custom random quote widget breaks when used in multiple sidebars
- How to change constants in WordPress wp-config.php programmatically?
- Override Plugin Script Fucnction in WordPress
- How to call WordPress function other files
- Conditional attributes and logic per product category
- How to create an option page for this simple plugin
- What is @Action in WordPress?
- Improving the perfomance of a plugin action
- the_tags : can we insert a class
- How do I enforce users to fill a determined custom field using WyPiekacz?
- WordPress checkbox and Illegal string offset
- Undefined index: action plugin problem
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- I changed .live() to .on() but change is not reflected on the server
- wp_enqueue_scripts
- How can I fetch data from another website to my wordpress website with mysql database
- Where Should i write the code for wordpress ajax voting?
- How do I convert my WordPress website to be domain agnostic?
- Add the_post_thumbnail_url to a shortcode in function.php
- Add action to custom Function
- Show media-uploads to all users
- Help with a function in a widget
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- how can authors to define custom pages?
- Adding a Tag Parameter / Filter to My Shortcode
- How do I create pages within a WordPress post?
- Best approach to make all tags searchable by the wordpress search function
- How to upload large media file in chunks, without any plugin?
- Preset custom fields
- WP Function does not trigger on Webhook API Call
- Why do I need to reload the page for WordPress to see the new custom field added with jQuery
- Cookie value changes back to previous value after changing
- RSS Feed on WordPress showing code (hypertext) in articles titles
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- Post source link plugin – small modification
- WordPress hide post from custom post-type on a single page
- How to add specific script to WordPress webpage that will working with user input and databases
- Hide Plugin Custom Post Type Menu Link
- How to create algorithm for ordering posts in WordPress?
- Why Custom fields description is not working WordPress Version 5.4.2?
- Add external javascript to post template
- After updating theme & plugin I am getting an error message
- Problem Advanced Custom Fields PRO
- Block plugin update possibilities (but not by hiding notifications)
- Execute function activate/deactivate plugin in specific pages
- Plugin function in child theme
- Custom product page’s style for printing
- Soflyy WP All Import Custom File Download Issue
- Update (a function) post’s featured image as soon as $image_url changes
- Create Biographies
- WordPress doesn’t save a post revision when changing CMB2 custom fields
- How to add wordpress plugins in along with my standalone theme
- How to Save settings of custom tab product page in admin side in a database?
- Changing the body of mail sent to new user registration
- Why isn’t my plugin seeing other classes?
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Contact Form 7: custom validation [closed]
- functions.php conditional output for a single plugin
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Single dash converted to double dash
- How use Dynamic hyperlink on each wordpress post?
- Woocommerce custom fields
- How to declare this function correctly?
- Can’t modify plugin function
- PHP if url extension action=discussion condition use [closed]
- Text Wrapping in WPDataTables
- Make plugin admin page visible to other roles
- wp_enqueue_script doesn’t load JS in plugin
- Order custom post type by posts with most likes first