This should output the text at the bottom of each ‘single’ post
add_filter( 'the_content', 'my_the_content_filter', 0 );
function my_the_content_filter( $content ) {
if ( is_single() )
{
global $post;
$content .= "<p>here will be some data retrieved from the database, it will be beneath every post. I like it!</p>";
}
return $content;
}
you could use is_front_page() or is_home() if you wanted the content on the home page.
Related Posts:
- to get a little more content after ‘read more’ inside loop
- Get excerpt using get_the_excerpt outside a loop
- How can i display the content in plaintext
- remove tags from the_content
- How to force excerpts / teasers in the loop
- Get ID of a page containing secondary loop in content
- Exclude filter on front page
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Content/Excerpt length control for a specific loop?
- Can I use both a custom excerpt and a trimmed excerpt?
- Combining the_excerpt with the_content
- Display content of page template (get_page)
- the_excerpt not showing posts
- Using get_the_excerpt() Before The Loop
- How to load all pages into one page with their templates
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Unable to change the “Read more” text inside the_excerpt
- How to get the excerpt for is_home() outside of the loop isn’t working
- The_excerpt() doesn’t parse – how to change that?
- How is WordPress changing the content markup?
- Accessing the Posts page Content
- “the_excerpt” in loop just keeps repeating first post?
- Using jQuery .after inside loop
- Announces with different formatting dependently on a number
- Only Show Excerpt After First 3 Posts
- Excerpt isn’t working or am I missing something?
- Limit article to 100 characters. Can’t use the_excerpt…
- Making a specific page wordpress compatable that is not index
- Return only content in excerpt field in loop
- How to add excerpt in loop in Twenty Eleven theme?
- Single Loop With Dual Content Area
- the_content() “crashes” for single pages
- Retrieve each widget separately from a sidebar
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- Adding ‘current_post_item’ class to current post in the loop
- Where should I use post_class()?
- Landing Page – Redirect Loop?
- How to make multiple Column in archive Page?
- Sort Popular Posts by Views for the Last Week
- Filtering posts by multiple taxonomies
- Is it possible to display previous post revision?
- Fix inefficient loop breaks post.php on form submit
- Adding shortcode closing tag after a loop
- Get Pagination (WP-PageNavi) not to work
- Filtering The Loop For Single Page and Blog Page
- the_content() seems to block my ACF-code
- Pulling current post/page data into header.php
- Removing the_content() from the page
- Change front-page layout after x amount of posts ( while in the same loop)
- Filter the loop by categories using checkbox form
- Duplicated posts on category page
- WordPress loop: exclude if it is the latest post
- Apply an Incremental Counter in an Array Function
- query_posts() vs get_posts() multiple loops [duplicate]
- Page-loop is looping content from custom loops on the same site. How to avoid that?
- How do I make a variable available inside partials?
- WordPress: Loop Help
- Display Post Author Link above the loop
- Enabling users to control custom loop’s query
- Conditional: IF current user has NOT commented on current post (not including post author)
- Loop counter style
- Can I add generic numbering HTML classes to items as a loop runs?
- Change post order by meta key, per post basis
- Loop Problem: Displays same set of post for all categories
- Custom Post Type on Homepage – Studiopress Genesis Framework
- New loop vs widget
- the_content() returning null in one category only, even though there is content
- display post format text in loop
- Yoast taking over my WordPress title tag [closed]
- Pagination broken after using 2 loops to show content
- How do i find and restore a sidebar that i accidentally deleted? [closed]
- Posts not showing
- Use BuddyPress data in loop (mkdir)
- Wrap every four posts within a div [duplicate]
- Get most recent post for every term in a given taxonomy type
- Custom Blog Loop on Home Page
- Open Graph in Index Loop
- How to get post category and author name for cusmot API?
- How to add Default Level-0 parent and Level-1 class in WordPress Category in li element?
- How to add pagination in Terms
- WordPress posts in the loop not stacking side by side
- A code that I could not fully grasp related to foreach & count_user_posts()
- Reorder posts in a loop: have the posts by one particular author below the others
- How to execute a user loop with shortcode
- how to get author comment inside the loop?
- How to create loop in custom page, and get id from url into this loop?
- How to fix pagination for custom loops?
- Check to see if a field is within an array in twig
- Display single post inside accordion based on form submission results
- One page loop issue with posts
- Humanmade | Custom meta box class: How to display a repeatable meta box group?
- Building theme so user can change header image [closed]
- display only parent replies count in index.php
- using the loop on a page
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Problem with ms-thumb-frame-selected class in Master Slider
- Fix html inside a for loop [closed]
- Display all posts in a page code for template
- How to get files from loop for zip