Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 10-04-2009, 09:01 AM   #1
Warrior Member
War Room Member
 
Join Date: Aug 2009
Posts: 22
Thanks: 2
Thanked 7 Times in 1 Post
Default Wordpress Post from a Category

Hi All,

I'm having a bit of an issue trying to have a page just display the posts from one category. I'm using exec-php to allow the posting of php and the following code:

Code:
<?php query_posts('category_name=Reviews&showposts=100'); ?>
<?php while (have_posts()) : the_post(); ?>
<div><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </div>
<?php endwhile;?>
Unfortunately its returning the list and then all the other posts with the content, it can be seen at my website (I don't have enough posts yet for urls) freshbizoppsdotcom/reviews - remove the dot for a '.'

Apologies if this breaks a rule, if it does i'll change it but it helps show the issue

Any help is greatly appreciated!

Thanks
Ally3009 is offline   Reply With Quote
Old 10-04-2009, 12:24 PM   #2
Ungrateful S.O.B.
War Room Member
 
Kirk Ward's Avatar
 
Join Date: May 2006
Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 1,393
Thanks: 253
Thanked 57 Times in 45 Posts
Social Networking View Member's Twitter Profile 
Default Re: Wordpress Post from a Category

Hi Ally,

Not sure, but I think wordpress builds a page for the category all unto itself.

Say your category is "birds," then if you provide a link to www.yoursite.com/birds/ then a page will appear listing all the posts in the category "birds."

Would that do what you want?

Kirk

"We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
Kirk Ward is offline   Reply With Quote
Old 10-04-2009, 02:40 PM   #3
Warrior Member
War Room Member
 
Join Date: Aug 2009
Posts: 22
Thanks: 2
Thanked 7 Times in 1 Post
Default Re: Wordpress Post from a Category

Thanks Kirk, I had forgotten about that, the main issue I have is that I have the Reviews section in my menu which uses the wp pages function to show them. So if I used that I would have to add it manually (which may work). I could also use a php re-direct to that domain.com/page/

I'll go and have a play with it and see what happens.

Ally
Ally3009 is offline   Reply With Quote
Old 10-04-2009, 02:43 PM   #4
Ungrateful S.O.B.
War Room Member
 
Kirk Ward's Avatar
 
Join Date: May 2006
Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 1,393
Thanks: 253
Thanked 57 Times in 45 Posts
Social Networking View Member's Twitter Profile 
Default Re: Wordpress Post from a Category

Quote:
Originally Posted by Ally3009 View Post
Thanks Kirk, I had forgotten about that, the main issue I have is that I have the Reviews section in my menu which uses the wp pages function to show them. So if I used that I would have to add it manually (which may work). I could also use a php re-direct to that domain.com/page/

I'll go and have a play with it and see what happens.

Ally
Ally,

There is also a plugin called "redirect" which may have some flexibility built into it. Takes advantage of the wp-permalink system. Set up a dummy page and have it redirect to the category.

Kirk

"We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
Kirk Ward is offline   Reply With Quote
Old 10-04-2009, 03:36 PM   #5
Warrior Member
War Room Member
 
Join Date: Aug 2009
Posts: 22
Thanks: 2
Thanked 7 Times in 1 Post
Default Re: Wordpress Post from a Category

I'll have a look at that plugin. At the moment I've redirected manually. I've also just seen how to get around the page listing by excluding categories using the following code

Code:
 <?php wp_list_pages('exclude=17,38' ); ?>
Where the numbers are the id's of your pages

Ally
Ally3009 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
category, post, wordpress

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 03:50 PM.