• j.dominionated

    (@quickbeforeitmelts)


    Site: http://www.quickbeforeitmelts.ca

    Question: I want to have the assigned child-category show up on the browser title for individual post pages, but don’t want to screw up the <title> tag messing around on my own.

    Currently, a post page’s browser title on my site looks like this: POST TITLE | Blog Title

    I Would Like it to look like this: Post Title >> Child Category >> Blog Title

    Any suggestions?

    I’m currently using Graph Paper Press’ Berlin theme, with a child-theme installed for changes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael

    (@alchymyth)

    – check the code of the meta title in your theme (possibly in header.php?);
    – check whether your theme might be using a filter on ‘wp_title()’ to influence the meta title;
    – add your own filter function for ‘wp_title()’ to add the child-category name into the meta title;
    – probably make sure not to use a seo plugin (which often use their own filter);

    please contact the developer of your theme for help if you have problems with any of those steps.

    https://codex.ww.wp.xz.cn/Function_Reference/wp_title
    https://codex.ww.wp.xz.cn/Plugin_API/Filter_Reference/wp_title

    Thread Starter j.dominionated

    (@quickbeforeitmelts)

    Thanks for the prompt information, Alchymyth.

    I’m not very skilled in coding, so while I understand what you’re suggesting I do, I don’t have the knowledge or expertise to execute the suggestions.

    This is what the <title> tag looks like right now:

    <title><?php
    /*
    * Print the <title> tag based on what is being viewed.
    */
    global $page, $paged, $theme_options;

    wp_title( ‘|’, true, ‘right’ );

    // Add the blog name.
    bloginfo( ‘name’ );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( ‘description’, ‘display’ );
    if ( $site_description && ( is_home() || is_front_page() ) )
    echo ” | $site_description”;

    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
    echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘berlin’ ), max( $paged, $page ) );

    ?></title>

    Thread Starter j.dominionated

    (@quickbeforeitmelts)

    Still hoping someone out there can help me with this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding Category to browser title settings in’ is closed to new replies.