You can use in this way
<?php
$sTitle = "Your, Title";// From get_the_title(); or other sources
if(strpos($sTitle , ",")){
$sTitle = substr($sTitle , strpos($sTitle , ",") + 1);
}
echo $sTitle; // You can also trim($sTitle); to remove whitespaces left from substr()
?>
Related Posts:
- How does printf( __( ) ); work?
- Displaying Logged-In User Name in WordPress Menu
- How to set custom cookies before output
- Change the filename format of saved featured images
- How to use wp_insert_user on WordPress Multisite?
- On this day PHP code
- How do I add a php statement to a jQuery string
- Upload images and attachments from frontend form
- Config apple-app-site-association file with wordpress
- Woocommerce: How to override core functions in functions.php?
- Should I use wp_mail or PHP’s mail? [duplicate]
- Successful or Error Message after running mysql code in functions.php
- How can one utilize a variable as a callback function name for add_settings_field
- Link to file in plugin directory from wordpress template?
- Insert array data on plugin activation
- Auto crop images in WordPress
- Trying to make php run in a post
- $wpdb->flush(); breaks the loop
- Global variable $post returning incorrect object
- how to make separate field in wordpress user_data_
- Proper syntax or method for keeping url in modified isotope / category links
- Gutenberg block – Save PHP function’s output as HTML?
- Custom search results page not working with empty search
- Which hook/action will help me solve my problem?
- Tax query in pre_get_posts not working
- Programmatically inserting post through URL – when including wp-load.php, it’s redirecting to wp-admin/install.php
- curl_exec causes timeout on mod_fcgid
- Accessing WPDB Multidimensional JSON Array w/ Javascript
- Fatal error: Call to a member function query() on a non-object
- How to replace file_get_contents() with a WordPress Filesystem call
- Warning: Attempt to read property “ID” on null in D:\xampp\htdocs\yba\wp-content\themes\young-brand-child\functions.php on line 162 [closed]
- Which function crops images in wordpress?
- Remove dash from blog title wordpress
- Problem with AJAX in wordpress plugin
- Include text in echoed hyperlink
- set post limit at load more ajax wordpress
- Trouble inputting variable into WP query
- Why my loop isn’t working? [closed]
- How to use AJAX to call php page with parameter
- My website is not showing Footer section
- WordPress meta_query >= &
- Change header on pages displaying taxonomy items
- Listing titles and custom fields of entries within subcategories
- WordPress site with embedded menu – gives You don’t have permission to access /wp-content/themes/xxx/taxonomy-redirect.php on this server
- Must filter functions receive all arguments passed to them?
- Prevent Company Name From Translating
- Displaying Slider in Front Page (home) using Customizr Theme
- Usage of var keyword in the core
- How to add PHP pagination to wordpress
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- PHP displaying wrong custom taxonomy images
- Slow site initial load time
- MySQL Query Returns Array () In Shortcode
- array wordpress when get is null
- Custom search query on WordPress page not working
- PHP session not staying alive. headers already sent
- how can I call a function when time expire
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Get Child of Child Pages in custom Menu
- Latest posts feed with a specific post always first
- Filter by Post Type
- WordPress Post undefined error with Post Date (New to Wordpres Dev)
- Move Jquery.js to Footer
- Updating the database after parsing CSV document
- Need help to create WordPress page that decodes a text file and publishes it in JSON format
- My blog posts section seems to be rendering the other blog posts inside the first? :/
- From php web to wordpress conversion, href changes only in URL
- Attaching an upload to a user
- Change home_url in searchform.php to go to HTTPS instead of HTTP
- What’s the correct offset value for order ASC?
- can’t grab PHP $_POST variable
- How to solve 404 permalink errors on nginx server
- Ajax Load more CPT via shortcode
- Loop 1 user randomly
- Wp_mail doesnt work
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Sort by multiple options in custom field
- Is custom behaviour possible when asynchronously uploading?
- How can I show only if custom field has content [closed]
- Top menu disapears in Category Pages when filtering using ACF
- WPMU schedule doesn’t execute actions
- doubled content
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- Keeping the previous get value and add another value when submitted
- Pagination not displaying
- how to import contacts from php to wordpress
- How to add active class dynamically
- Setting WooCommerce currency programmatically
- Masking external links with internal link for member-only
- I’m not able to get access $wpdb in my php file in wordpress
- Submit cf7 form to cfdb as pdf/BLOB [closed]
- a problem in class in class-wp-hook.php
- How do I a custom search form by taxonomies?
- WordPress REST API – Custom field not added to pages
- Woocommerce – add tracking code to another email template
- How to add custom user role into wordpress
- change title of page dynamically