I suggest to just append the other things to the content without editing the templates
add_filter('the_content','hang_my_specific_things_on_the_content');
function hang_my_specific_things_on_the_content($content)
{
// shortcode0 is appended before content
$content = do_shortcode('[shortcode0]').$content;
// these are appended after the content
$content .= do_shortcode('[shortcode1]');
$content .= '<img src="https://wordpress.stackexchange.com/questions/312880/someimage.png" />';
$content .= do_shortcode('[shortcode2]');
return $content;
}
Related Posts:
- Function to show only first instance of shortcode
- Using locate-template & shortcodes doesn’t appear to work
- Automatically insert php function into post $the_content
- Custom Shortcode, functions PHP WP_Query loop
- How to extract the variables out from “add_shortcode” function?
- Add Element as a Filter to the_content
- How do I pull excerpts from pages?
- Output loop to function return?
- How to include any template using Shortcode fuction?
- Using functions.php to include code that’s processed inline
- Simplest Way to Build Custom Archives Page?
- the_date() and the_time() functions display actual date an time instead of published date and time
- Load templates, pass arguments, and render output from functions.php
- Shortcode to eliminate and replace with
- Function the_content
- Shortcode to output get_header not working
- How do grab the main loop, with conditions, and output via shortcodes
- How to redirect to post if search results only returns one post
- Show modified time if post is actually modified
- How to fix a theme with page.php Default Template that accidentally deleted?
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- how to create shortcode in wordpress
- Formatting post content to exclude gallery
- WordPress – thumbnail image from youtube (function and loop)
- Problem with extract() with custom shortcode
- get_the_excerpt() not returning anything when post has no excerpt
- Displaying a random user with a shortcode
- How to set global variables in template page?
- Why isn’t is_page_template() adding a body class?
- A snippet after every image
- Query children and parent title
- Creating loop within functions.php
- How to use max and min values of custom fields
- creating shortcode to pull json array
- Filtering posts by category name based on page’s slug
- Pass Shortcode Attribute to footer Script
- Searching for content post
- 2 Loops, Only Displaying 1 Loop in Both Loops
- Display gallery on top before content
- List child pages of specific page using shortcode
- How to include local menu based on page id?
- How to create function from code?
- Default Gallery Edit/Template Editable?
- Adding HTML to the end of every post with the Block Editor
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Showing content from one page on another
- Having a Function Inside of the Loop
- Getting different functions data while using while loop in wordpress
- Create a new query in function.php to filter blog posts
- Custom shortcodes not inserting into visual composer columns
- Functions For Calling Specific Elements
- Setting youtube size in functions.php
- Adding a colorbutton in tinymce dialog with current api
- Excerpts are not displayed by a shortcode on category pages
- Why doesn’t is_page(id) work in functions.php?
- shortcode help require
- Optimizing a WordPress site
- Insert template-part inside the content
- I have problems with loading javascripts
- wp_nonce_field is breaking form for reasons unknown
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- While loop with an exception after a count is reached
- Using multiple line variable inside a function?
- Best way to handle lack of titles in microblogging
- Echoing function into WordPress NextGen gallery
- How to echo the value of an array element using a function via a shortcode
- Wp-query Order By problem
- does wp function the_content(); accept another tag inside
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- Image loading function not working on archive.php template
- Need to convert image url to a Base_64 data url with wordpress function..
- Get term slug by term id and then explode it
- Shortcode question
- Shortcode to get featured image of specific id post
- Modify shortcode to work with custom post types
- shorthand syntax for custom fields
- Show admin page, only if function is being used
- show all the posts thumbnails
- Display a list of random terms from custom taxonomy with shortcode
- Probleme shortcode with list author
- How set a while with a function
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- How to use `foreach()` in ajax call
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Custom shortcode with do_shortcode and substr
- us states dropdown function and echo in theme template files
- How to pass a variable from a template page to the child theme functions.php
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- Pull random comment from specific post, display on homepage with shortcode
- How accomplish modification the_content if home/start page?
- Run function from parent on child site
- Post variables not displaying correctly in custom function
- How can i hide content if not friend in Buddypress? [closed]
- how to handle multiple forloop?
- Make a PHP file with a function
- PHP error in shortcode [closed]