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
- Split Content and Gallery
- Solution to render Shortcodes in Admin Editor
- Use AJAX in shortcode
- How to redirect to post if search results only returns one post
- Include PHP file in Content using [shortcode]
- How to override admin-bar style
- Difference between the_content() and get_post()?
- Shortcode producing headers already sent error
- How to add attributes to a shortcode
- Show modified time if post is actually modified
- How to display random users with avatars
- wp_get_attachment_image returns different image size
- AJAX handler throws 400 (Bad request) – why?
- Insert Ad Code in the Middle of a Post
- Enabling shortcodes for custom fields
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- How to customize search result page title?
- How to use get_media_embedded_in_content function
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Shortcode with parameters inside parameters
- Creating a table from shortcode avoiding wpautop for each row
- 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
- Stripping shortcode from custom excerpt function
- WordPress Change Post Templates,but not drop down, but Image selection
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Only seems to be displaying one child when there are supposed to be multiple
- Custom shortcode with do_shortcode and substr
- Javascript and Stylesheet in child page
- Newest comments first not working
- Retrieve a custom form field modified by a filter
- us states dropdown function and echo in theme template files
- Can I use a function to return HTML and the result of another function?
- How to pass a variable from a template page to the child theme functions.php
- Integrate WP Tiles into existing loop (index.php) and theme
- Problem in outputting shortcode
- Problem in shortcode outputting content
- Expanding a function to call a plugin or show a link
- Check if excerpt is empty at loop-portfolio
- Function to get the name in database table from the comma separated string
- Allow the access over wp-login.php
- Trying to the deduce shortcode from a function
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Pull random comment from specific post, display on homepage with shortcode
- Set thumbnail from URL, by grabbing image in functions.php
- Have multiple loops on a page appear after/between page content
- restrict access to specific urls on a specific period of time
- How accomplish modification the_content if home/start page?
- using enqueue_script in a shortcode isn’t working
- Run function from parent on child site
- Way of getting queried loop before the query with a filter hook?
- Gallery Shortcode Function Help
- Add title & subtitle to shortcodes
- Post variables not displaying correctly in custom function
- Echo custom field value in shortcode function
- Shortcode Variations?
- Shortcodes not outputting in correct divs
- Why don’t some template tags work when querying information on single.php?
- shortcode inside post called by ID does not render as expected
- Custom shortcode not being included in content paragraph [duplicate]
- trouble with passing class method data to outside function
- How can i hide content if not friend in Buddypress? [closed]
- Get term count on a category page
- how to handle multiple forloop?
- How to write a query-function as a query-shortcode?
- Parse error: syntax error, unexpected ‘endforeach’ (T_ENDFOREACH) in [closed]
- Display function from functions.php in tag.php
- Which template file to edit to edit homepage in Mystile [closed]
- Loop on a wordpress Page instead of content coming from the WP text editor
- Make a PHP file with a function
- PHP error in shortcode [closed]
- Create a shortcode to display the “the_content ()” in my post [closed]
- How I can show short content with short tag
- Get full slug for a WordPress Post
- My website is generating weired url parameters of paginated pages
- multible shortcodes (for differnt values) with one function
- Update post meta with wp cron
- How to store page-{id}.php templates in custom folder
- post_content return zero!
- How to make my logged-in user-role shortcode displaying name instead of slug?