-
I noticed on my finished website the title order
It says Home – Piotr Tekien Portfolio
in google as well.I want to change all my pages to:
Piotr Tekien Portfolio – (page name) – (page category) – (page post name)
reversing the order in Header is quite tricky, could you give me a proper order of this code to do that?<title><?php
// Page or Single Post
if (is_page() or is_single()) {
the_title();
// Category Archive
} elseif (is_category()) {
echo single_cat_title(”, false);
// Tag Archive
} elseif (function_exists(‘is_tag’) and function_exists(‘single_tag_title’) and is_tag()) {
printf(__(‘Tag: %s’, ‘Savia’), single_tag_title(”, false));
// General Archive
} elseif (is_archive()) {
// If WooCommerce Shop
if ($woocommerce && is_shop() || $woocommerce && is_product_category() || $woocommerce && is_product_tag()) {
printf(__(‘Shop’, ‘Savia’));
} else {
printf(__(‘Archive: %s’, ‘Savia’), wp_title(”, false));
}
// Search Results
} elseif (is_search()) {
printf(__(‘Search: %s’, ‘Savia’), get_query_var(‘s’));
}
// Insert separator for the titles above
if (!is_home() and !is_404() and !is_front_page()) {
echo ” – “;
}
if (is_home()) {
wp_title(”);
}
// If no home page set and default posts listing
if (is_home() && is_front_page()) {
echo “”;
} elseif (!is_home() && is_front_page()) {
echo ” – “;
}
// Finally the blog name
bloginfo(‘name’);
?></title>
- Theme support is offered to verified customers only. To post a topic go to your Theme Category and add your question at the page bottom.
Theme Categories
Recent Topics
- Alea updates
- Why "Fortune" theme is no longer available?
- PHP 8.1 Error
- Issue with WPB editor icons
- Issue with Icons and Text Alignment for Arabic Content
- Installing and Activating Plugin Fortuna Portfolio CPT (1/8)
- Testimonials page is blank
- warning boc_framework line 905
- Transparent header issue without changes
- Slider Revolution error