• I’m new to wordpress and I have one doubt about how to handle the page and post

    do you do the Menu as post or as page ¿?

    All categories have done as the pages.

    But now each new entry i did as post, But How I say to wordpress that this post is for categoria 1 or page 1?

    I don´t understand how manage it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator cubecolour

    (@numeeja)

    An explanation of pages including when you would create content as a page rather than a post is given at: http://codex.wordpress.org/Pages

    If you are writing a blog about playing guitar you might create posts for ‘chord of the day’ or ‘latest news’. A category menu items can be made for each of these categories.

    If you also have pages like ‘about me’ and ‘contact me’, these would be outside of the blog structure and page menu items would be made for these.

    You can find an outline of how to use the custom menu editor at: http://codex.wordpress.org/Appearance_Menus_Screen

    Thread Starter zagore

    (@zagore)

    Hello cubecolour, do you know if this is well?

    A Page of Posts

    The following custom page template file displays the content of the Page, followed by the posts from two specific categories (specified by their category slugs). It is designed to work within a child Theme of the Twenty Thirteen theme. If you are using a different theme, you need to replicate the HTML structure of your own theme within this template.

    Save this to pageofposts.php and then assign the Page of Posts Template to your new Page:

    <?php
    /*
    Template Name: Page Of Posts
    */

    /* This example is for a child theme of Twenty Thirteen:
    * You’ll need to adapt it the HTML structure of your own theme.
    */

    get_header(); ?>

    <div id=”primary” class=”content-area”>
    <div id=”content” class=”site-content” role=”main”>
    <?php
    /* The loop: the_post retrieves the content
    * of the new Page you created to list the posts,
    * e.g., an intro describing the posts shown listed on this Page..
    */
    if ( have_posts() ) :
    while ( have_posts() ) : the_post();

    // Display content of page
    get_template_part( ‘content’, get_post_format() );
    wp_reset_postdata();

    endwhile;
    endif;

    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

    $args = array(
    // Change these category SLUGS to suit your use.
    ‘category_name’ => ‘music, videos’,
    ‘paged’ => $paged
    );

    $list_of_posts = new WP_Query( $args );
    ?>
    <?php if ( $list_of_posts->have_posts() ) : ?>
    <?php /* The loop */ ?>
    <?php while ( $list_of_posts->have_posts() ) : $list_of_posts->the_post(); ?>
    <?php // Display content of posts ?>
    <?php get_template_part( ‘content’, get_post_format() ); ?>
    <?php endwhile; ?>

    <?php twentythirteen_paging_nav(); ?>

    <?php else : ?>
    <?php get_template_part( ‘content’, ‘none’ ); ?>
    <?php endif; ?>

    </div><!– #content –>
    </div><!– #primary –>

    <?php get_footer(); ?>

    Moderator cubecolour

    (@numeeja)

    where did you find that code listing?

    Are you using a child theme? If so what parent theme are you using?

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

The topic ‘Menu is post or page?’ is closed to new replies.