Website Title order

  • swiftfreeze
    Member
    swiftfreeze
    May 13, 2014 at 8:15 am #19775

    I noticed on my finished website the title order

    http://www.swiftfreeze.com/

    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>

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.