WordPress.org

Support

Support » Themes and Templates » Custom Links in menu modification

Custom Links in menu modification

  • Hello,

    In my custom theme, I have the option to add Custom Links into my navigation.

    I’d like to know how I can modify the “href” of each with a prefix, in my theme (without modifying the core wordpress).

    So for example if I create a custom link with the url as “John”

    It would output as this
    href=”wordpress.org/john”

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins
    Forum moderator

    @anevins

    Go to Appearances > Menus in the dashboard and create a custom menu there. You should then be able to specify the URLs.

    Hello,

    Thank you for your response, I think you have misunderstood me.

    When I create a menu through my dashboard I want each to link have a prefix.

    So If I create a custom menu and specify “John” as the URL.

    On my navigation it will be displayed as:

    a href=”wordpress.org/john”>JOHN</a

    Instead of:

    a href=”john”>JOHN</a

    Andrew Nevins
    Forum moderator

    @anevins

    The confusing part is using ‘wordpress.org’ as an example.
    What specifically do you want to have prefixed?

    Hi,

    I thought that example would make it easier.

    Essentially, I would like the url to be href=”#filter=.John”

    Andrew Nevins
    Forum moderator

    @anevins

    What happens if you use the Custom Link URL as;

    /#filter=.John

    ?

    just use #john in href instead of john because if you specify url=john it will take the root url of your blog (example.com) and add the john after a trailing slash (example.com/john)

    Peace,
    LastForOne

    Hello,

    This is for a custom jQuery script.

    Thanks

    Anyone know?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom Links in menu modification’ is closed to new replies.