• Resolved nneon

    (@nneon)


    Hi there,

    I’m trying to get my page titles to display properly… just having a bit of trouble.

    I’m using K2 and Filosofo’s Home-Page Plugin.

    Everything works fine until you goto an archieve or catergory or search page.

    Here’s a link to my site: https://furydesigns.com.au

    And here’s the code I have so far.

    <title>
    <?php if (is_home()): ?><?php bloginfo('name'); ?>
    <?php else : ?>
    <?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?>Tag Archive for <?php echo $tag; } if (is_archive()) { ?> archive<?php } elseif (is_search()) { ?> Search for <?php echo $s; } if (!is_single() && !is_page() ) { ?>Blog at <?php } if ( !(is_404()) and (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo('name'); ?>
    <?php endif; ?>
    </title>

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter nneon

    (@nneon)

    .

    Thread Starter nneon

    (@nneon)

    Anyone?

    Howdy Nneon.

    Look closely at your spaces. For instance, you have
    if (is_archive()) { ?> archive<?php }
    and then some more if/then logic and eventually
    bloginfo('name');

    When php echos that out, there’s no space after the word “archive”.

    Similarly, when you echo the search string when it’s a search, php won’t put a space after the $s variable value unless you tell it to: “$s . ' '“.

    There may be other missing spaces; I just found those 2 examples. Does that help?

    Thread Starter nneon

    (@nneon)

    Not exactly… it’s not the spaces that are the problem… I don’t want it to say “Blog at” unless you’re on the main blog page.

    “2006 September archiveBlog at at Fury Web Designs” should be “2006 Septermber archive at Fury Web Designs”

    Same with the tags and categories. The Firefox category should read:
    “Firefox archive at Fury Web Designs” instead of “Firefox archiveBlog at at Fury Web Designs”

    If you know how to achieve this that would be great, if not… thanks for all your help anyways.

    OK. Well, I think the spaces are still going to be a problem. Let’s define this a little more.

    If on the home page you want “Blog at Fury…”
    If on a search page you want “Search for [search string] at Fury…”
    If on a category page you want “[Category name] archive at Fury…”
    If on an archive page you want “[archive month year] at Fury…”

    Is that about right?

    Thread Starter nneon

    (@nneon)

    Almost… if you check out my site I have a static Home page which i want to be: “Fury Web Designs”

    Then there’s the About page which should be: “About at Fury…”

    Now the Blog page was my real home page, im using Filosofo’s Home-Page plugin. And I want it to be: “Blog at Fury…”

    You’ve got the rest right ??

    Try this: https://cori.pastebin.com/791011

    I don’t use K2, so there may be some discrepancies, but it works on my dev blog.

    Thread Starter nneon

    (@nneon)

    Works great!

    Thanks a lot.

    The paste bin code has disappeared!

    Dang…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Page Title Help – K2 – Filosofo Home-Page Plugin’ is closed to new replies.