• Resolved kreativito

    (@kreativito)


    I would like to have an URL which has the # sign included.

    for example: domain-name.com/#thisarticle

    is this doable ?
    if so, how ?
    How can I change my permlink ?
    WordPress doesn’t seem to allow me doing that !

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can add it using jQuery

    substr function

    Thread Starter kreativito

    (@kreativito)

    Hmm.. ok.. Unfortunately, I am not a coder and I don’t know how to do that !

    Sooo.. how can I possible do that in a practical way with WP ?
    If I create a new post ?
    Or in the general settings of WP I have to change something ?

    Thank you soooo much for any little help,
    appreciate it !

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The basic answer to your question is that you can’t do that with normal approaches, because the hash mark is a special character in URLs. You will need custom code, probably a custom made theme, to do that sort of thing. WordPress has no way to do it by itself because the web does not work that way.

    Thread Starter kreativito

    (@kreativito)

    I do have a theme, that allows me to use a custom code for each page.
    So if someone would tell me what code I have to use, or what code I would need to write inside this one page or post.

    I think that would do it !
    Or am I wrong ?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    No, it’s not that simple. The hash mark is a fundamental difference there. It can’t be in urls, at all. It’s an identifier for in page elements. To use it in that way requires JavaScript coding.

    Thread Starter kreativito

    (@kreativito)

    hmm.. I have seen #hashtags in links to jump within page sections… right ?

    not sure how that works… like an anchor ?
    however.. I would like to have the #hashtag in front of my permalink.

    like this: https://domain.com/#article

    this is not possible ?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Hashtags in URLs cannot be used for navigation in the way you’re describing, because their content is not sent to the server.

    In other words, hashtags like this are used to jump to sections of a page, they’re not used to determine which page to show you.

    https://domain.com/article#section would jump to #section in /article, but you could not use it to give you an entirely different article.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to add # sign to my URL ?’ is closed to new replies.