The end of the_content()
is a </p>
tag.
It sounds like you want to include your end mark before that last </p>
tag.
If so, you need a function that filters the_content()
.
Something like:
function yang_end_mark( $content ) {
$content = substr_replace($content, '<span>🔚</span></p>', strrpos($content, '</p>'), strlen('</p>'));
return $content;
}
add_filter( 'the_content', 'yang_end_mark', 25 )
;
Related Posts:
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Error when adding excerpt to the content through functions.php
- Is it possible to display a DIV to not logged in users and then change it for users who are logged in?
- Before & After Content – After Content directly below Before Content when using require_once
- Overwriting a Shortcode
- How to set and use global variables? Or why not to use them at all
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- Is it possible to disable a function of a parent theme?
- Hide old attachments from wp media library
- PHP – redirect https to http and www to non-www
- Enqueue Javascript Correctly for 3.5
- How to add active class to custom menu using while loop and wp_list_pages
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- Add footer.php to WordPress child theme
- Need to get specific data from array
- WooCommerce – Display variation custom field value [closed]
- Restrict WordPress File Type Uploads by User Type
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to slow down server response
- Click loads template via ajax
- Sort registered users by post count? (inside admin dashboard)
- How to change a public function inside a class of a plugin?
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Function set default image when image not present
- WooCommerce – Reset quantity input field when variation changes
- Query all posts of a custom taxonomy term
- Use menu link or onClick to set a variable
- Automatically remove a canceled order in Woocommerce
- Trying to establish connection to External Database
- WordPress add post format support not working
- How to remove the cufon script from Dzonia Lite theme [closed]
- Login/logout in header
- How to put “Read more” link in Custom Excerpt inside p tag?
- Get users that likes the post
- How to abort saving data in save_extra_profile_fields function WordPress?
- Create highly customized submenu (possibly using wp_list_pages)
- Get the date of the className or classID
- $wpdb->wp_users returning empty value for
- WordPress Custom field Colors
- php syntax : [ && ] between commands [closed]
- My custom get_the_excerpt() can’t get excerpt by ID
- Which PHP page is the Default Posts Page
- meaning of (array)function()
- WordPress Options Page Theory Question
- Need to put a script above tag in header.php – WP 5.7.1
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- Sending a custom form data in email through WP Mail Function
- deactivating an active plugin using if page
- How to use array in function to get only value I want
- How to add PHP code in functions.php wordpress
- add_filter function concatenate string and locate_template function
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- How to use the checked() function to check for a non-empty var
- get_page_templates only return templates with “home” in the filename
- Show different website layout if no sidebar added
- Pagination Not Working (pages duplicating content)
- Custom functions for string data calculations
- How are these PHP functions applied to a specific page in WordPress?
- Let current user know pending posts counts using wp_query
- How to check post meta isset or not empty during publish/save post?
- how to changes mobile menu toggle breakpoint in WordPress
- Get page permalink in contact form
- How to display already created menus via php?
- Grabbing Image name From Product Image Gallery
- “pre_get_posts” orderby custom date field in different format?
- Reliable way to add nonce to HTTP Header in WordPress?
- Trying to update Woocommerce meta values
- Gutenberg block don’t save rich text content
- remove_action from parent theme using child theme functions.php
- Cant get blog name with get_option
- php code for outputting a custom page in my account
- ssl redirect function is not working
- Hide specific shipping methode depending on day and time of day
- Extra editor on top of default in Custom Post Type
- How do I fix Undefined variable using $_POST in function?
- Pagination 404 error(I have refreshed the permalinks and tried several previous options)
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Add element after navigation element title don’t works like I expect
- Get Billing Email from WooCommece Checkout and Pass to Fullstory JS
- How to delete specific element when it is not homepage?
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- How can I include tags in wordpress search without a plugin
- How can I display a query in a page?
- Using catch_that_image() for galleries?
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- site_url() returns with additional backslashes
- How to get category pages to look like a certain archive page?
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- How to call a specific value within the functions.php file?
- A next page function with shortcode?
- What is the wrong with this function to enqueue the scripts and styles to the theme? [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Warning: filemtime(): stat failed for wp_
- Keep users logged in Without Remember Me
- How to use js variable to php in wordpress functions.php
- Why a class property becomes empty?
- Hide category by tag
- How do I stylize selected comments?
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico