• Resolved energymv

    (@energymv)


    So you could have:

    Home | About | Archives | Category xxxxx | Contact |

    It seems like it should be simple to do. Can anyone show me a way to accomplish that on my blog? because I want to create a page at the top to feature one category called “Homebrew” and thus make it easier for people to find (since it will be listed as its own page as well as under categories).

    Maybe i need to use the “custom fields” thing or maybe i could automatically link to category page for Homebrew https://energyanalysis/homebrew?? Ug it should be so simple that i don’t even think i should need a special plugin to accomplish this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If I understand you right, you want a link to a page that polls all posts of a specific category? That’s pretty easy to do:

    Create a new template for your page. You can make a copy of index.php, save it as “page_homebrew.php” and add the template code at the very top of that page:

    <?php
    /*
    Template Name: Homebrew Page
    */
    ?>

    Modify the Loop of that page to only poll a certain category using query_posts. For example

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=X,Y&paged=$page"); while ( have_posts() ) : the_post() ?>

    (where X and Y are the categories you want to include.

    Write your page from the dashboard, choose your “Homebrew Page” as the template.

    Thread Starter energymv

    (@energymv)

    thank you that sounds good, but on my dashboard i don’t have the option to select any template. I only have:

    Custom Fields
    Comments & Pings
    Password Protect This Page
    Page Parent
    Page Order
    Page Author
    Page Revisions

    i saw that page template in my last theme which had other flaws, but this them doesn’t have it. bugger.

    When you Write a new page (or Manage an existing one), there’s a template dropdown list.

    Thread Starter energymv

    (@energymv)

    i know what you mean, but that dropdown list is not available in this theme for some reason. i am using free revolution theme…

    Not sure, I don’t think the theme has any influence on whether templates work or not. This thread might help: https://www.ads-software.com/support/topic/164813?replies=49

    “switch to default theme and then back to my theme helped.”

    And of course the page template .php needs to exist on your webserver when you enter the Write/Manage page mode.

    Thread Starter energymv

    (@energymv)

    ok thanks page template dropdown list exists in default theme, but not in free revolution theme even though page.php exists on webserver.

    i will try to construct the new homebrew page in default theme where page template dropdown exists, and then switch back to my revolution theme and see what kind of results that gives me.

    Thread Starter energymv

    (@energymv)

    thank you i got the dropdown list to display in my theme after changing permission from 644 to 755 on the index file on my web server.

    then i modified code in the new page_homebrew.php:

    my implementation of your code produced a syntax error, so i played with it and successfully produced the homebrew page with the following lines of code (first line is new code), however the post header hyperlink and comments field are now out of servicde for some reason…
    \
    <?php query_posts(“cat=68”); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    \

    thank you for giving me those pointers and please let me know if you have any suggestions that i might try to fix the header hyperlink and comments field in the homebrew page

    *update* it is fixed! thank you!

    terrybolas

    (@terrybolas)

    IS not working for me….

    Is there any simple tutorial for this?

    Please!?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Write a page that shows posts from one category..’ is closed to new replies.