Or use http://wordpress.org/extend/plugins/page-links-to/ to redirect the Pages to the appropriate category.
i am so lost on this I am not a programmer I just want the category jennifer to load on the page called jennifer. I read all this code and I can not make it work. Can someone please help me out?
Unfortunately pages are static and are not able to display dynamic content (categories).
If I’m understanding you correctly, you want all the posts in the category ‘Jennifer’ to show up when you click the page ‘Jennifer’?
There’s a way to redirect the page you click to the ‘Jennifer’ category however, which will look like it accomplishes the same task, but sadly you need to do a little bit of code editing.
this link http://codex.wordpress.org/Pages#A_Page_of_Posts shows how to make a category load on a page but I just dont understand where to place the page name and the category name
Ignore that page, it’ll only confuse you even more. Now that I know what you want to do though, I can link you to an article I wrote for people willing to do this…
I wanted to do the same thing when I first got WordPress. I really hope it helps you out since it’s what I wrote it for…
Unfortunately, it does require some very simple code editing, but it does tell you what code to use and where to put it…
the reason why I want it to load in a page is because I have a image slider that loads at the top of the page. I can already set up a menu link that send them to a page with just a category i need but I need to find a way to load it into a page. What is this guy doing? http://www.youtube.com/watch?v=4lRhwino5pc&feature=related
What id probably do — edit your archive template that is displaying category archives. test for individual categories, and have it display your slider if its the right category.
is this really that hard to do in word press this guy in the video made it look so easy he just added a little code and Done.
Its really not that hard. but its also not something you can easily accomplish just from the wordpress dashboard. you have a few options, but the basis of all of them, is that something in the template file showing those category posts, needs to know to display your slider. So you could,
1) create a template page that queries posts and says to display only posts of the category http://codex.wordpress.org/Function_Reference/query_posts#All_Posts_in_a_Category and also includes your slider. then just create a page for it in the dashboard, and publish. or,
2) what i was explaining above. basically, when you put a category into your menu, it displays all of the entries from that category when the link is clicked, using most likely, your themes archive template. So what you could do inside that template, is use conditional tags to determine if its the category or categories you want to display the slider for. http://codex.wordpress.org/Conditional_Tags . So the page would output different html say, if it were category A, vs category B, vs a tag or an author archive.
hope that makes slightly more sense 🙂
the first one is what I want to do I tried that by just adding this to the page.php`<?php if(is_page(“matt”))(query_post”cat=4″):)?>
But it did not work
Duplicate page.php and call it jennifer.php and put this at the top of this new file:
<?php /* Template Name: jennifer */ ?>
Now you have created a custom page template.
<?php query_post('cat=4'); ?>above the loop
Publish a “Page” with the title jennifer and give this Page the Page template “jennifer” found under “Page Attributes” on the edit Page screen. If all is well the Page jennifer will now show posts with a category of jennifer.
- The topic ‘Have a category show one one page’ is closed to new replies.