WordPress.org

Ready to get started?Download WordPress

Forums

page titles (4 posts)

  1. VirtualityStudio
    Member
    Posted 3 years ago #

    is there a way to create a custom title for the pages, so that it differs from the link and also so that it doesn't put the site name into it? so it would become "title" rather than "title | name"

  2. pkenjora
    Member
    Posted 3 years ago #

    Edit your theme. The title | name piece is written in your header: Appearance->Editor->Header.

    If you publish an article the permalink becomes fixed. You can then change the title to be different than the permalink. I'm also pretty sure the permalink is editable when you are writing the page or post.

  3. pkenjora
    Member
    Posted 3 years ago #

    I would add an is_single check to the template where you make the change so that the full title is shown on index and category pages. Try this:

    ` <?php if( is_front_page() ) : ?>
    <title><?php bloginfo('name'); ?></title>
    <?php elseif( is_404() ) : ?>
    <title><?php _e('Page Not Found |', 'titan') ?> | <?php bloginfo('name'); ?></title>
    <?php elseif( is_search() ) : ?>
    <title><?php printf(__ ("Search results for '%s'", "titan"), attribute_escape(get_search_query())); ?> | <?php bloginfo('name'); ?></title>
    <?php else : ?>
    <title><?php wp_title($sep = ''); ?> | <?php bloginfo('name');?></title>
    <?php endif; ?>`

    That should give you what you are looking for.

  4. VirtualityStudio
    Member
    Posted 3 years ago #

    thank you so much!!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.