GetSimple Support Forum

Full Version: How can I achieve internal linking for pages not inside the main navigation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone! 

I've started out with GetSimple theme development and it's going great, so far. Except I'm still a bit puzzled on how to do internal linking.

For my page I have a main navigation. I can set those links up easily by creating a page in the editor. Then I call this menu, including its dropdown menus, via <?php get_i18n_navigation(return_page_slug(),0,1, I18N_SHOW_MENU); ?>.

But I have more menus, which are unrelated to the main menu. One would be the footer. But there are also menus on specific pages from which a user can select options. So it seems to me that the option to hide or show pages in the main menu is of little help to me here.

If I do <li><a href="/privacy-policy.php" >Privacy Policy</a></> , the page won't get found.
And <li><a href="<?php get_theme_url(); ?>/privacy-policy.php" >Privacy Policy</a></>  returns that direct access to the requested page is not possible, since I set if(!defined('IN_GS')){ die('you cannot load this page directly.'); }  in the header. 

My question: How do I link to an internal page that is not in the main navigation?

Help is much appreciated. Smile
use <?php get_site_url();?> no <?php get_theme_url();?>

<?php get_site_url();?>privacy-policy or <?php get_site_url();?>privacy-policy.php ( but second options is not idealSmile

And use friendly url ( check this on settings)
(2020-03-07, 03:44:13)multicolor Wrote: [ -> ]use <?php get_site_url();?> no <?php get_theme_url();?>

<?php get_site_url();?>privacy-policy or <?php get_site_url();?>privacy-policy.php ( but second options is not idealSmile

And use friendly url ( check this on settings)

Thanks a lot, that works. I'm using <?php get_site_url();?>privacy-policy. Smile