Page 1 of 1
How can I add an external link in navigation bar?
Posted: Tue Sep 05, 2023 3:08 pm
by ashrafakader
Hello,
Is there anyway to add an external link to the navigation bar?
I expect an entry to enter page title and page link (external link).
Thank you.
Re: How can I add an external link in navigation bar?
Posted: Tue Sep 05, 2023 4:47 pm
by Edi
There are the following possibilities:
1) You can use the plugin Redirects:
https://plugins.bludit.com/plugin/redirects
2) You can use a JavaScript like the following:
Code: Select all
<script>
location.replace("https://www.google.com")
</script>
3) You can redirect with .htaccess.
Re: How can I add an external link in navigation bar?
Posted: Tue Sep 05, 2023 6:01 pm
by ashrafakader
Thank you for your reply, but I`m talking about adding a navigation bar item with an external link.
Mentioned solutions are for forwarding the whole site.
Other alternatives allow us adding custom navigation bar items (a title "page name" and a value "external url".
Re: How can I add an external link in navigation bar?
Posted: Tue Sep 05, 2023 6:10 pm
by ashrafakader
Well, I created a page and added the above-mentioned code (solution #2) inside it.
Clicking the page name inside the navigation bar redirects to the destination. (after a quick showing of the same "empty" page).
It works, but I have a tip for who use this way.
You must decide page type (static).
When I left it undecided, the whole website was redirecting to the destination without clicking anything. I set it to "static" and it became OK.