You use the document_title_separator filter.
So in your case:
<?php
function theme_prefix_filter_document_title_separator() {
return '|';
}
add_filter( 'document_title_separator', 'theme_prefix_filter_document_title_separator' );
?>
Related Posts:
- Automated Footer information
- When trying to set title, not sure how to edit it for different pages
- double page title [duplicate]
- How to add CSS class to custom logo?
- Editing the custom background CSS
- How to add default images for custom backgrounds?
- Add colors to existing color palette without replacing it
- REQUIRED: The theme must not used the tags. | REQUIRED: The theme must not call to wp_title()
- What flex-width/height does?
- Change Genesis Tag from Page Template [closed]
- add_theme_support(‘my-custom-feature’)
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- Displaying Page Title on index.php
- Removing title tags from each page
- Cannot update WordPress General Settings Site Title and Tagline
- why adds ‘»’ symbol?
- “add_theme_support” for custom footer color?
- Show video as part of the post?
- How to add theme support?
- Limitations when modifying wp_title with a filter
- Edit footer via customizer
- Theme Development: Starter Content after hook
- Can I add multiple arrays within add_theme_support( ‘colors’ )?
- How to use add_theme_support(‘html5’)?
- post_exists returning 0 if title contain special characters
- WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
- add_theme_support( ‘admin-bar’ ) causes fatal error
- How to place POST TITLE any location inside the posts page
- What is difference between add_theme_support and Theme Customization API?
- Display tab title as ‘blog tagline | blog title’
- Replaceing _custom_background_cb
- Include title and content of one page in another page
- How can I change the title of the Home link in the navigation bar?
- Problem dynamically generating an all purpose title tag
- Theme’s featured image option is not showing up
- TItle In Latest Post is not using H1 Tag [closed]
- What is the preferred way to add custom javascript files to the site?
- Should I use set_transient or update_option?
- Custom Taxonomy Tree view
- Best practice way to implement custom sections into a WordPress theme
- How to customize wordpress login/register pages?
- Add a preview to a WordPress Control Panel
- Change text of twentyseventeen_edit_link()
- How do I remove RSS feeds from themes?
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Prevent update check for specific theme
- De-registering parent style sheet css recommended?
- inserting custom li class to wp_list_pages
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Free starter theme to make mobile websites? [closed]
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- Hide header texts (Title & Tagline) in custom-header.php
- Why an arugment is missing in wp_get_attachment_image_attributes?
- Archive page doesn’t work
- How to add “Template” option in page attributes panel?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- How to enable thumbnails in RSS dashboard widget
- How to check if a WordPress core block is active in sidebar
- How can i attach the attachment-ID to the user profile image?
- How can I fetch the WordPress cart errors normally displayed in woocommerce-error?
- wp_remote_get times out on api request but jquery GET and postman work?
- Folder name for a pro version of a WordPress.org theme?
- Using WordPress’ Theme Customizer to select page templates that update layout in the preview
- what is the difference between uri and path?
- How to change footer or for different kinds of users in wordpress?
- How to create first post, fifth post full width, rest in three columns and so on
- How to Create custom xml file for demo content for custom theme?
- Theme not showing up
- Issue on Getting Custom post type Thumbnail’s URL
- How do I provide for multiple crops of the same image in a theme?
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- Adding a new setting using Kirki or WP customizer with an if statement
- Twenty Seventeen Pages Loop
- Pagination: Keep prev and next link even on the first/ last page
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- Why my theme option not working?
- How to use multiple check-box values to work in a function and insert values in database
- How to make a function occurs for one time?
- Catch the moment when theme is deleted
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- create loop for the_content()
- how to change footer content for certain pages only
- function ‘theme_settings_page’ not found
- Should I use template files or just use conditional tags in index.php?
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- How to load mediaelement.js in theme template?
- How can I include the js and css file of my custom theme dynamically in header.php
- WordPress Blog Page displaying nothing
- Full width thumbnail
- Suppress the_content filter in a nested loop
- Set start page depending on screen width [closed]
- Add option for administrator to submit link
- Display recent posts on front page
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Theme template file for a specific custom taxonomy
- How do I work with responsive images in WordPress? (img srcset/sizes)