WordPress.org

Ready to get started?Download WordPress

Forums

Help with <title> (10 posts)

  1. Moldarin
    Member
    Posted 8 years ago #

    Hi,

    I am trying to configure my WordPress blog to use the folowing schema for <title>s:

    If category: Blog_name Category_name (Daniel Personal)
    If post: Post_name at Blog_name Category_name (Welcome! at Daniel Technology)
    If archive year: Year in Blog_name Category_name (2006 in Daniel Gadgets)
    If archive month Year-month in Blog_name Category_name. (2006-08 in Daniel The Law)

    Could anyone help me with this? I just cannot figure out how to do it!

  2. tsguitar
    Member
    Posted 8 years ago #

    Did you even do a simple search for this? I searched for "change title of page" and came up with several pages right away that answered the question. Next time, search for your own answer first. It saves everyone lots of time. Here, this should get you going:
    http://wordpress.org/support/topic/79423?replies=3

  3. Moldarin
    Member
    Posted 8 years ago #

    I did search, but I did not find anything that did what I wanted.

  4. tsguitar
    Member
    Posted 8 years ago #

    And how did that link I provided help you out?

  5. Moldarin
    Member
    Posted 8 years ago #

    Well, as I am still unable to modify my headers as I want: not much.

    <title><?php bloginfo('name'); ?><?php if ( is_category() ) : ?> TEST<?php endif; ?><?php if ( in_category() ) : ?> TEST<?php endif; ?> <?php if ( is_single() ) : ?> Post name<?php endif; ?></title>

    But this does not work very well. :/

  6. tsguitar
    Member
    Posted 8 years ago #

    Why can't you modify your headers as you want?

    Look at this:
    http://wordpress.org/support/topic/83325?replies=6#post-427140

  7. Moldarin
    Member
    Posted 8 years ago #

    :P Because I cannot figure out how to do it properly? That is why I asked for help in the first place...

  8. Moldarin
    Member
    Posted 8 years ago #

    This is how far I have gotten this far. But I still do not understand how I can get hold of the post name, category name, etc...

    <?php if ( is_category() ) : ?><?php bloginfo('name'); ?> Category name<?php endif; ?>
    <?php if ( is_year() ) : ?>Year in <?php bloginfo('name'); ?> Category name<?php endif; ?>
    <?php if ( is_month() ) : ?>Year-month in <?php bloginfo('name'); ?> Category name<?php endif; ?>
    <?php if ( is_single() ) : ?>Post name at <?php bloginfo('name'); ?> Category name<?php endif; ?>

  9. Moldarin
    Member
    Posted 8 years ago #

    OK; how do I get the current category only? Without the list-thing...

  10. tsguitar
    Member
    Posted 8 years ago #

    Try the code I linked to and see what happens.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.