GetSimple Support Forum
QUESTION How can I achieve internal linking for pages not inside the main navigation? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: QUESTION How can I achieve internal linking for pages not inside the main navigation? (/showthread.php?tid=13393)



How can I achieve internal linking for pages not inside the main navigation? - Marty - 2020-03-06

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


RE: How can I achieve internal linking for pages not inside the main navigation? - multicolor - 2020-03-07

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)


RE: How can I achieve internal linking for pages not inside the main navigation? - Marty - 2020-03-07

(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