• hi,

    I would like to add Quotes to my blog and present them separately under a menu ‘Quotes’. I think the best would be to use the “Quote” post format to specify posts as quotes, and show only these posts under this menu.

    Could someone tell me, how can I achieve this?

    thanks
    Viktor

Viewing 5 replies - 1 through 5 (of 5 total)
  • Do you mean add a link to your nav-bar menu? If so:
    Create a post category called Quotes
    Create a Custom Menu (If you are not using one already)
    There is a box on the Menu page called Categories. Add the Quotes category to the menu

    Hope this helps!
    If it is not what you are after or if you would like me to explain the steps further, please let me know.

    Thread Starter nagyv

    (@nagyv)

    I didn’t mean exactly this, but something similar. Instead of using categories I would like to use the post format that I have to specify for every post, and create a menu from these.

    http://codex.wordpress.org/Function_Reference/get_post_format_link
    Аnd google for post format archives. There are quite many articles about it, e.g.
    http://www.chipbennett.net/2011/01/11/using-wordpress-post-formats-as-a-taxonomy/
    The link for a post format archive must be like _http://site.com/type/aside

    Thread Starter nagyv

    (@nagyv)

    Thanks, I’ve managed to add a menu using

    <?php echo '<a href="' . get_post_format_link( get_post_format() ) . '">' . get_post_format_string( get_post_format() ) . '</a>'; ?>

    I am not sure this way is good for a top menu. There is exhaustive tut in the chapter Taxonomy Sidebar Widget. This variant is more suitable as a part of a top menu.

    $postformatterms = get_terms( 'post_format' );
    if ($postformatterms) {
    	echo '<ul>';
    	foreach( $postformatterms as $term ) {
    		$termslug = substr( $term->slug, 12 );
    		$termname = $term->name;
    		$termlink = get_post_format_link( $termslug );
    		echo '<li><a href="'. $termlink .'">' . $termname . '</a></li>';
    	}
    	echo '</ul>';
    }

    For a WP custom menu may be it’s easier to add links manually.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu for post format’ is closed to new replies.