• Resolved hma66

    (@hma66)


    Hello there,

    Could anyone advise on how to write URLs of various pages in a website?

    Thsnkd

Viewing 10 replies - 1 through 10 (of 10 total)
  • You need to explain what you want to do in more detail…

    The question is far too vague to give any kind of reasonable answer.

    Please elaborate… ??

    Thread Starter hma66

    (@hma66)

    Thanks for the quick response.

    As a matter of fact, I want to write custom title tags for our pages (posts are already taken care of). However, am not sure how to do so. Currently, it is just showing https://www.domain.com/about as the URL and the title tag as about/ the company name.

    I hope now it clarifies what I want to do.

    Thanks in advance.

    So you’re talking about what appears inside..
    <title></title>
    Correct?

    Title and URL are two different things…

    Can you clarify which you mean.

    Thread Starter hma66

    (@hma66)

    Sorry for creating the confusion. I am talking about title tags only <title></title>. However, there is another related question I may have about is the meta tags and meta description.

    thanks again

    Ok, so what behaviour do you want from the title?

    It changes dynamically right now, based on what you view, where do you want to make exceptions? Or what do you want it to do specifically?

    In any case the modification needs to be made in.. wp-content/themes/YOUR_THEME/header.php

    Thread Starter hma66

    (@hma66)

    Thank you for the quick reply. Actually, I want to be able to write title tags for SEO purposes as and when the need may arise.

    There isn’t any easy way to do that unfortunately, i’ve had a quick fiddle around…

    The problem here is that the title is in the header, and the header is loaded > before < the post loop…

    This means you can’t do any IF/ELSE post statements around that title area…

    Perhaps i’m looking at this from the wrong angle but i can’t see any easy way to do it… if anyone else can chime in and suggest an easy approach i’ll happily write the code, but right now i don’t see how to tackle it..

    Likely possible by unhooking the current wp_title filter and creating a new one, but that’s possibly hours of work and testing, and i’m sorry but i’m not prepared to spend hours on this for you…

    For reference.. for anyone wanting to look or help..
    wp_title() function in general-template.php
    Line 468:
    $title = apply_filters('wp_title', $title, $sep, $seplocation);

    Thread Starter hma66

    (@hma66)

    Thank you once again. I guess, in the current scenario, the pages of a website should be designed separately. Posts should be OK as they take the title which you write as the header of the post in question.

    has anyone found a solution to this issue yet
    I also want to do a different header tag for each of my pages

    I work 4 an SEO agency and I utilise the Headspace plugin to achieve what your after. https://www.ads-software.com/extend/plugins/headspace2/

    Its not perfect and has it limitations, but should be fine for a small to medium sized relatively uncomplex site. It will probably solve your meta issues as well.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Writing custom URLs for wordpress pages’ is closed to new replies.