• I am installing wordpress to use as a CMS for the main content but also for the blog of the website.

    Integrating wordpress into my xhtnl file works fien apart from one thing, on my navigation list I have this before it

    <li class=”pagenav”>Pages

    Is there any way to remove that so my navigation pulled by

    <?php wp_list_pages(); ?>

    doesn`t display that and the trailing ?

    Also, wordpress has been installed on the root, I want the content pages of the website to be displayed as https://www.mysite.com/page1/ so used the permalink markup

    /%postname%/

    which works fine, however I want the blog (posts) to be of the format https://www.mysite.com/blog/post1/

    Is this possile to seperate the pages and the posts to display different urls and administer them from the same wordpress installation?

    Thanks for any help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter candell

    (@candell)

    bump :o)

    https://codex.www.ads-software.com/Template_Tags/wp_list_pages
    set link_befor => ‘<li class=”pagenav”>’
    and link_after => ”

    set the category base to “blog”

    Thread Starter candell

    (@candell)

    Hi

    Thanks for your help, just struggling to use this though. How do I add the link_before to <?php wp_list_pages(); ?> so that the ‘<li class=”pagenav”>Pages‘ bit doesn`t show?

    edit: just figured out this bit, thanks. Can you still help with the next part of my post…?

    Also, I added to Settings > Permalinks > Category base the word blog, I guess I need to edit the Custom structure field to make this happen? If I do, what needs to go in here?

    Thanks

    simple hack. 2 wordpress installations in 2 different locations ??

    candell, regarding the second issue: you do not need a hack and you do not need two installations. All you need to do is change your permalink settings from

    /%postname%/

    to

    blog/%postname%/

    This will work exactly how you want it to. On the single view posts it will show domain.com/blog/post-name and on all other pages it will show domain.com/page-name. I know it seems counter intuitive and you would expect it to add the /blog/ to all pages…but it doesn’t.

    Just make sure your blog page that uses the index template and displays the list of recent posts, is also named blog. That page will then be domain.com/blog which is also what you want.

    Hope that helps. : )

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Newbie questions’ is closed to new replies.