You need to use ‘the_content‘ filter
function add_before_content($content) {
return 'Before content area '.$content;
}
add_filter('the_content', add_before_content);
It will still be inside the content div. If you want it outside the div you have to edit related template files i.e. single.php or templates/content-single.php. It all depends on which pages you want to apply it.
Related Posts:
- Capitalize All Titles and Headlines in Chicago Style
- Changing title of a page dynamically from within a plugin
- Content generator for development site [closed]
- Change page title from plugin
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- What is the proper filter to add html to a post / page title?
- How to add terms to a post depending on its title?
- Is there a way to share content amongst wordpress sites
- plugings request url is the old url
- How can I list recent posts excerpts?
- Next and/or previous post content
- Can we use a webservice with WordPress?
- Collapse content [closed]
- Can I use a plugin for a singular page on my website?
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Front end inline editing?
- Which filter affects the ‘entry-title’ post class
- how to add text to posts from tags
- Show Sitename on Yoast SEO Title tag [closed]
- How to customize a title by passing query string?
- Add Content to Content()
- Customizing Titles on the Fly with Code
- Timed content and flagging content as viewed by user?
- Why are my WordPress store items showing up in duplicates?
- plugin wraps the entire content
- Site shows URL instead of “meta title” after deleted few plugins (not any SEO plugin was deleted)
- Get post content from outside the loop with plugin shortcode usability
- If post exists in the database – each time goes on `else`
- Is there a way to keep youtube videos from displaying on home page, and display only on single posts?
- Filtered content appears in the excerpt
- Is there existing plugins to “Click-to-Launch” embedded Flash / SWF content?
- Plugin for visitors to edit content without logging in? [closed]
- Restrict posts to customers with complete WooCommerce orders only
- Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
- Displaying different content depending on variable
- How can I add a custom Javascript snippet to display my feedback in footer?
- Tool to highlight text in WordPress page and provide additional text on hover
- How can I change page content for good once a button is pressed?
- Content disappears when searching with Search & Filter plugin
- How is it possible to create Multi part sections where people can answer or comment or vote on various parts of a page’s content as given example?
- Copying content from my other websites
- How to make the first letter of a post title uppercase, in a plugin?
- Building a Article Library within WP?
- custom template only for content
- How to hook into search results template or query?
- How to create custom content on custom page from plugin?
- Carrying information from button click into form [closed]
- Contents are missing but shown when switching to another theme in wordpress
- Get content or excerpt of top rated votes @GD-Star Rating? [closed]
- is ther a plugin that will hide/show content for a scheduled period of time? [closed]
- Add a filter to a different custom plugin
- What is the correct method for updating post content from a plugin?
- Single dash converted to double dash
- Creating a custom page & output on a Plugin
- My page content doesn’t show up
- Distribute post content through several divs [closed]
- Shortcode returning specific content of a post
- Change page content based on dropdown selection
- Auto-scroll to beginning of accordion item
- Element works, but not on wordpress site [duplicate]
- Output plugin post like system count [closed]
- AdBlock blocks my non-advertising sidebar images [closed]
- Woocommerce quick checkout form [closed]
- plugin for different writers [closed]
- What is the source outline for a basic word press plugin?
- Notification When Post Approved
- How to develop an extension for a simple form post and post back? [closed]
- Meta Box plugin image_advanced not showing up on frontend
- WP Job Manger change jobs url (NOT slug)
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- WordPress Site in Multiple Languages
- Need plugins and themes from clients site [closed]
- Hide Pages WooCommerce [closed]
- Permissions question [closed]
- Creating Features List in WordPress Post
- Internet Explorer seperating lists differently in Twitter Widget Pro than all other browsers [closed]
- Fatal error with Ultimate Coupon plugin
- woocommerce product categories in menu [closed]
- Output dropdown results into Woocommerce Order details
- Can I install plugins manually on WP.com? [closed]
- Shortcode return is printing a 1 afterward
- How to use ‘Event Manager Shortcodes’ plugin via the php code? [closed]
- why i cannot see some plugins while they are enabled on network admin page?
- is there a way I can add or remove some plugin options?
- Book plugin to record books read and write my own reviews [closed]
- PHP $_session is not work in wordpress
- How to add homepage Widget?
- Customize Multi-Column Tag Map to fetch specific post-type
- wordpress Search function is not working
- How can I make a website with dynamic features with wordpress?
- Embedding BitBucket Code in Posting
- How to manually remove preload fonts settings in WordPress?
- Auto play audio using WP Maintenance Mode Plugin [closed]
- Submit posts in two different post types with the same form
- Multi-step, live updating search
- I would like to hear recommendation for a plugin to charge exams [closed]
- Plugin to allow for recurrent subscription + exclusive content
- How to automatically convert “normal” conditions to yoda conditions
- Static page with formatted post list
- Next and Previous Pagination button not displaying in WordPress