• Ola,
    I use WP pages to make a ‘normal’ website, not a blog. Posts and pages are two different things in WP. You can show a list of posts in a page with a ‘read more’ link. But to make a ‘read more’ post page visible in your ‘page menu’ is, so far I know, not possible. Is anybody out there how has a solution to connect posts with pages and make this visible in a ‘page menu’? If not, are you interested in a plugin to solve this?

    gr,
    Ron

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi

    You can add posts to either the beginning or end of the navigation items by manually adding code in header.php

    <ul>
    wp_list_pages ............
    <li><a href="http://example.org/mypost1">My Post 1</a></li>
    <li><a href="http://example.org/mypost2">My Post 2</a></li>
    </ul>

    Or, to add links at the end of the page list, you can add this code into functions.php and fill in the <li>‘s you want on the list (as many as you want)

    add_filter('wp_list_pages', 'add_forum_link');
    function add_forum_link($output) {
            $output .= '<li><a href="http://forum.example.org/">Forum</a></li>';
            return $output;
    }

    Thread Starter ron-moss

    (@ron-moss)

    oke thats true, but that does not solve my issue: how to connect posts to pages dynamically by using for example a plugin in the CMS

    Install Page Links To, create a page and use your post URL along with the ‘links_to_target’ Custom Fields. Essentially, it is the technique described in the FAQ How to easily display links to both Pages and Categories in the blog navigation header?

    Thread Starter ron-moss

    (@ron-moss)

    oke thanks, i’m going too dig in to it and let you know if it works for me..

    Thread Starter ron-moss

    (@ron-moss)

    I tried both ‘Page Links To’ and ‘adding-links-to-wp_list_pages-part-2/’. They both do their job, and make it easier to publish categories on pages. But my main problem stays:
    When I click on a category. How to make a post ‘visible’ in the overall ‘pages menu’; when I go too an post under a category overview??
    So if i look at the source code(made by <?php wp_list_pages(‘title_li=&depth=1’); ?>), I cant see the CSS ‘current_page_item’ class.
    So I cant make the page menu link active in CSS, if I’m at post(under a category).
    For understanding; I now show some categories onder a page(menu item), under each categorie, there are a few post(so these posts also belong to the page).

    Thread Starter ron-moss

    (@ron-moss)

    short: so simply put posts under pages and if you go to a post on your website, y’r page menu is active!

    Thread Starter ron-moss

    (@ron-moss)

    anybody got a solution(MichaelH?), or maybe its time for developing an new plugin?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Add post to pages menu’ is closed to new replies.