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
- How I can get custom field’s current value?
- UnWanted Custom field added in the wp page edit area
- Executing my function once on a specific time
- Woocommerce – How to populate custom select field with stored values on checkout page?
- How to append to title via functions.php for auto-posting plugin [duplicate]
- How to stop or remove an action being called inside a function of an extended class
- Missing Argument
- load_plugin_textdomain error
- How to override a plugin function wrapped in a class?
- Bootstrap Drop Down menu is not working
- How to Display a Plugin function (content) on frontpage using index.php
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- How to query the custom fields by language?
- wordpress plugin is not activating from widget
- Theme my Login plugin, how to update fields
- Edit Yoast SEO breadcrumbs output [closed]
- Adding Shortcode to Text Widget
- Date calculations from 2 custom fields
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Custom random quote widget breaks when used in multiple sidebars
- Using a function to change favorites listing
- Display post lists in 2nd paragraph
- How to debug error message: Cannot modify header information
- Using a post-signup hook to get user details
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- How to enable specific plugin only based around shop manager role?
- How to change constants in WordPress wp-config.php programmatically?
- Restrict media upload size by format
- How to use a class from another plugin
- Override Plugin Script Fucnction in WordPress
- How to display custom sidebar in wordpress 5.5.2
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Calling plugin function inside custom plugin for onclick event
- Show function to super admin
- creating html reusable blocks via shortcodes
- get current date + 90 days and checking every day
- auto populate list of questions if user select a category xyz
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- How to toggle between two custom fields in WordPress woocommerce ‘WC Product Field Group’ plugin?
- Adding a new field to the address field type in gravity forms
- Replacing a plugin function with a custom renamed function doesn’t work
- Facebook Messager Plugin
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- How to call WordPress function other files
- How do I hide posts across all loops based on the value of a custom field?
- All sites themes functions.php have been changed
- Customize permalink wordpress category id
- Conditional attributes and logic per product category
- Disqus deleted comments are syncing with wordpress but active comments do not
- Admin style for just one plugin in dashboard
- Custom User meta field display
- WP Query. Is there a maximum size?
- How to remove custom post type and add category and post name
- Grab WordPress Salt Data From URL
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- Execute js files doesn’t seem to work
- WordPress get_avatar function not correct working
- bbPress plugin: forum lists not showing in correct order? [closed]
- Char limit on custom blog-post form? [closed]
- Which file of wordpress manage plugins functionalities?
- Unable to select image using custom image field type
- How to create an option page for this simple plugin
- Difference and examples of esc_attr__() and esc_attr_e()
- How to set Noindex to all wordpress pages in a catergory?
- What is @Action in WordPress?
- Every new post/draft has a custom field variable “yst_is_cornerstone” showing
- Improving the perfomance of a plugin action
- Display Custom Field Value on Admin Page Column
- List the authors that have written posts in a category
- Load Javascript from Plugin in One Page Only?
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- the_tags : can we insert a class
- Strange ASCII characters overlapping content
- Custom Post Type Fields
- How to over-ride a file in a plugin? [closed]
- How do I enforce users to fill a determined custom field using WyPiekacz?
- Overwrite category head title
- Sidebar widget: Randomly select text from a given set
- Plugin is a widget, but I want to call it in the head, can I?
- How to get plugin name from plugin file location
- Check if variable is set in filter
- Cannot get wpdb data (Error in a simple fuction) [closed]
- How to prevent additional code in functions.php to be removed once there is an update?
- Checking the count within a foreach loop
- execute function after one completed
- How to keep variable `$post` to using in another file
- WordPress checkbox and Illegal string offset
- Image change on hover
- ACF in wordpress
- Passing stored variables to add_filter
- Create a post builder skin in a plugin