How to have friendly navigation links
-
I’ve created a new Theme with a template for the home page and a template for the rest of the site (including the bloge bage).
Lets say I’ve 3 pages Home, Blog and Contact Details. Using the console I’ve set the “Front page displays static” and pointed that at the home page and set the blog to point at the blog page.I want to creat a link from the home page to the blog page.
Now what I can do is something like this :
<?php wp_list_pages('include=5&title_li=<h2>' . __('Pages') . '</h2>' ); ?>
where 5 is the id of the “blog page”Or
<?php bloginfo('template_url'); ?>/?page_id=5'
However if this changes in the console then i’ll need to change the code.
Is there a way to generate a link that always points to the blog page?
Or is there a way to generate the link based on the pagename? I’ve been playing with the
get_option('home')
butget_option('blog')
doesn’t seem to work for me.Thanks in advance
- The topic ‘How to have friendly navigation links’ is closed to new replies.