Hi Tabupl,
I’m not quite sure what you mean but I see the domain is different. From the page http://bqmanagement.pl/ the Oferta menu item links to http://www.temattabu.pl/#oferta.
Same for some of the other links, although the Blog and O NAS links use the http://bqmanagement.pl/ domain.
If you sort that out first, it might simplify your other problem.
hello,
Write JQuery like below
jQuery(document).ready(function( $ ) {
// $ Works! You can test it with next line if you like
// console.log($);
});
But @tabupl I think your way is not the proper way to change the menu link.
Just go to your menu tab from your WordPress Admin and Select the menu and change the menu link from your selected menu item.
Thanks.
-
This reply was modified 8 years, 9 months ago by
ThemesGrove. Reason: mention the correct person
Thanks for the help ThemesGrove but I’m pretty sure changing the link in the admin menu screen will not meet the OP’s need without further coding. They have skip links to portions of the front page and using a complete URL causes the page to reload when we’re already on the front page. Yet the full URL is needed from other pages to get to the front page, the skip link alone will not suffice.
There’s a few ways to handle this. JS or jQuery can work, but I prefer server side solutions when possible. Tabupl could add another menu area to a child theme that is only used on the front page, then setup that menu like ThemesGrove suggests. The header template can then conditionally load the appropriate menu based on is_front_page().
What I would do though is hook the “wp_nav_menu_items” filter and when is_front_page() returns true, step through the items and use str_replace() or preg_replace() to strip out the domain portion of the URLs as needed, leaving only the skip link.
Hello @tabupl,
You can follow what @bcworkz suggest.
I appreciate your help.
Thanks.