• I need some guidance on the best practice in terms of customizing pages. What I’d like to do is have a few pages (on my blog) that have a paragraph or two of content at the top, followed by a list of posts that are related to that topic below this paragraph.

    I’ve read the Help Doc for How To Display Posts In A Page and this sounds like the correct approach, but I just need some reasurrance, I guess.

    I’m a beginner with PHP, but have several years of experience with other scripting languages. Is this a good approach? Is there a better way to do this for a PHP noob? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes. Or you could use the approach outlined in http://codex.wordpress.org/Pages#A_Page_of_Posts

    Thread Starter anim8tr

    (@anim8tr)

    Thanks… This last one displays posts based on the category. What if I wanted to display posts based on a subcategory or a tag?

    Again, this is a really basic question, but the way I am envisioning the architecture of my site would be to have maybe five basic categories, with topic areas related ro each category.

    For example, using a Winter Olympics theme, the site architecture would be:
    Home -> Sports – > Athletes -> Postings about specific athletes

    So, each sub-category Page (Athletes) would have a paragraph or two about a specific athelete followed by a listing all the posts about that athelete.

    Based on this, I was envisioning a category like Sports, a subcategory of Athletes, and then a tagging structure using the athletes name.

    Would this be a good approach? I want to try to implement a solution that can be in place for a while…

    Thread Starter anim8tr

    (@anim8tr)

    Ooops, need to claify mt example a bit…

    For example, using a Winter Olympics theme, the site architecture would be:
    Home -> Sports – > Athletes -> Specific Athletes with postings about each athlete

    So, each sub-category Page (Specific Athletes) would have a paragraph or two about a specific athelete followed by a listing all the posts about that athelete.

    I’m the architecture as Category -> Sub-Category -> Tags.

    Is there a way to display posts by Category -> Tag?

    Is there a way to display posts by Category -> Tag?

    You could use a custom query along the lines of:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Athletes',
    	'tag' => '500 metres',
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    which could list all posts regarding athletes that compete in 500 metre events.

    Thread Starter anim8tr

    (@anim8tr)

    esmi, thanks for the orientation. I appreciate it very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need some direction on customizing pages’ is closed to new replies.