navigation - How can I click the parent menu then redirect to a special URL?

admin2025-01-07  5

You see I have a Navigation bar items, in the parent item Products & Services with two sub menus.

I have a requirement, when I click the menu item Products & Services it redirect to its sub-menu Dedicated Servers.

How can I do with this?


EDIT-01

I only want the Products & Services parent have this redirect, the other parent do not need, such as Home, Advantage they all have their own page.

You see I have a Navigation bar items, in the parent item Products & Services with two sub menus.

I have a requirement, when I click the menu item Products & Services it redirect to its sub-menu Dedicated Servers.

How can I do with this?


EDIT-01

I only want the Products & Services parent have this redirect, the other parent do not need, such as Home, Advantage they all have their own page.

Share Improve this question edited Nov 26, 2019 at 10:07 244boy asked Nov 26, 2019 at 9:16 244boy244boy 1013 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Source

In the wp-admin under menus you just have to replace the ‘#’ with the url for the parent item.

My solution is let the window location redirect redirect to your special URL:

<script>
    jQuery(document).ready(function(){
        window.location.href="http://path/to/dedicated-servers/";
    })
</script>
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736253879a159.html

最新回复(0)