You can use the wp_title filter to modify the output of the wp_title function.
quick example based on the example from Codex:
add_filter( 'wp_title', 'wpa66574_title_filter', 10, 3 );
function wpa66574_title_filter( $title, $sep, $seplocation ) {
// account for $seplocation
$left_sep = ( $seplocation != 'right' ? ' ' . $sep . ' ' : '' );
$right_sep = ( $seplocation != 'right' ? '' : ' ' . $sep . ' ' );
$page_type="";
// get special page type (if any)
if( is_category( 'videos' ) ) $page_type = $left_sep . 'Archive' . $right_sep;
// get the page number
if( get_query_var( 'paged' ) ) $page_num = $left_sep. get_query_var( 'paged' ) . $right_sep; // on index
elseif( get_query_var( 'page' ) ) $page_num = $left_sep . get_query_var( 'page' ) . $right_sep; // on single
else $page_num = '';
// concoct and return title
return $page_type . $title . $page_num;
}
Related Posts:
- Disable plugin / plugin action via theme
- Shared functionality in plugins and themes
- Need to create a Theme demo site that features multiple themes
- Declare a function before plugin does on the theme functions.php file
- Override the core function locate_template
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- All sites themes functions.php have been changed
- Proper way to use plugin functions in functions.php
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Removing the custom_image_header from wp_head
- What is the most efficient way of adding additional functionaliy for admin only
- Hide Plugin Custom Post Type Menu Link
- Securing langugae folder
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to Call Function From Separate WordPress Install on Same Server?
- pluggable function in theme, to be overridden by plugin
- Can’t get custom user meta to show in header
- Best collection of code for your 'functions.php' file [closed]
- Tips for using WordPress as a CMS? [closed]
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- if plugin is active? check if plugin is enabled or not?
- Disable author pages for specific users
- Set active theme via URL
- Seeking clarification on page request life-cycle
- How to assign user a role if none is present when logging in
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- How to find out what blocks are added by a plugin
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Translating plugin inside the theme [closed]
- How to prevent users to download videos from lms website?
- Dropdown menu on custom page with product to choose number of products per page
- Different UI in WordPress
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Bootstrap Drop Down menu is not working
- How to change constants in WordPress wp-config.php programmatically?
- Override Plugin Script Fucnction in WordPress
- Child Pages Short Code plug-in and hover capabilities?
- How to call WordPress function other files
- Conditional attributes and logic per product category
- Redirect to another page using contact form 7? [closed]
- Display Custom Field Value on Admin Page Column
- List the authors that have written posts in a category
- Create custom pages with a plugin
- how remove font to increase site speed load
- Use $variable from file1.php in file2.php (different file paths)
- What is the purpose of WP_CONTENT_URL?
- All custom widgets are not showing in widget area at the same time
- How can I use my custom wordpress theme on two websites? [closed]
- Can I filter a function created by a theme or a plugin?
- How to check homepage contain blog post?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- plugin inside a wordpress theme
- Gantry Framework: new page loads homepage content instead of page content
- Upgrade not working & themes not supporting
- auto activate plugin when theme is active
- use EDD Content Restriction for restricting php in template
- Checkbox show / hide output result
- How to keep plugin (media-sync) running even the tab is closed?
- Load CSS before Theme CSS
- Custom Logo Link WordPress
- Where do I put the code snippets I found here or somewhere else on the web?
- How to convert Currency from USD to other IP Based currency in Php function
- Attempting to list all product categories and the price range of all products within them
- the_posts_pagination() not working if I add wp_head() to header.php
- Creating an array from form inputs before it is posted to the options database
- function post to trash problem
- adding dynamic/multiple slug values in ‘option_none_value’
- How to assign a specific service to a specific provider based on location
- Conditional Homepage for logged in user
- What plugin would make this happen? If is the theme
- WordPress site hamburger menu toggle not working
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- when i activate my WordPress plugin cannot see customizer options or preview
- Writing SEO for Homepage when homepage is set to display latest posts
- Getting unknown text in footer of email
- Description: Too much time has passed without sending any data for document
- Compare Ajax Data Results
- EventON – Dequeue Styles
- WordPress Add advertising ads befor and after content with periority [closed]
- Function in my plugin is called twice
- Every time I use wp_get_current_user() my plugin breaks
- AJAX login without a plugin does not work. when add a action to function.php
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- How to add a handler for a button in plugin?
- Disqus plugin outputs script as literal text
- Custom Function for SEO by Yoast plugin
- Call current post parameters inside a plugin
- How to list posts that appear in two categories
- Building custom pages with a video player
- How to get current template file used by WordPress?
- Move related products after product summary? [closed]
- Adminimize Plugin — Is there an alternative to limiting Editor to ‘Appearance > Widgets’ only?
- Terms id wordpress error
- Woocommerce disable checkout on specific day
- Run a function only once when logging into dashboard
- Newspaper theme, custom query vars, & custom rewrite rules