Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   [SOLVED] Display post title only of a category in a page (http://forum.bytesforall.com/showthread.php?t=4140)

ladylulu Oct 31, 2009 03:29 AM

[SOLVED] Display post title only of a category in a page
 
Hi there!

Can anyone tell me if it is possible to display only the post title of a category in a page?
How did you do it?

Please help me.. :D

Thanks a lot! :)

juggledad Oct 31, 2009 04:47 AM

are you saying that for a category, you just want to list the post titles? Take a look at the WordPress Category Posts plugin - http://wordpress.org/extend/plugins/...ategory-posts/

ladylulu Oct 31, 2009 06:44 AM

yup yup! :D

ok. will try that plugin.
Thanks a lot! :)

ladylulu Oct 31, 2009 07:40 AM

hi juggledad,

the plugin seems not working. :(
I added this code

<?php wp_cat_posts(4); ?>

at the page editor but only the title of the page is displayed. :(
or maybe I miss something. hmm...

juggledad Oct 31, 2009 08:57 AM

ok, here is what you do

1) Create a page called Category test
when you publish the page, make note of the address in your browser window. It will be something like
HTML Code:

http://yourdomain.com/wp-admin/page.php?action=edit&post=248
Write down the number at the end, in tis case '248' that is the page number and don't worry if you only have 3 pages, a page is really a special type of post so the numbering is not sequential.

2) go to ATO->Style & edit CENTER COLUMN->The LOOP and find the line
HTML Code:

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
insert the following right after that line
HTML Code:

<?php if (is_page(248)) {wp_cat_posts(4); } ?>
So now, when ever you are displaying page 248, it will list all the items in category '4' on the page.

Hope this helps

ladylulu Nov 1, 2009 09:42 PM

hi juggledad,

wow, thanks a lot for that step-by-step and detailed instruction!
that really helps. :)
thanks again! God Bless you more..

vyonte May 3, 2010 10:26 AM

Hi there, I'm looking this option but for one that my customer.

In this case my customer has installed the wishlist plugin. I need that show post in the active category. All the plugins that I installed, (included comment in this thread), do his work, but don't work for me, becaus always show all the category.

With default category widget "Categories", I can show the active category for a user rol, but this don't show to me the post on it. I even thought in the ability to show the last 5 or 10 post.

I use Atahualpa theme

Anywhere here know how can I do this?

Valentin

vCopia Mar 1, 2011 06:10 AM

Jughead,

Can you use this for tags too? If so, would the code be (saying the page # I'm using is the same in your example above):

<?php if (is_page(248)) {wp_tag_posts(4); } ?>

juggledad Mar 1, 2011 06:24 AM

The original poster was using a plugin for categories. If you have a plugin for tags that defines the function 'wp-tags-posts()' then sure you can use it.

vCopia Mar 1, 2011 08:02 AM

Gotcha.

Installed List Category Posts plugin I found referenced elsewhere in forum - probably by you and other admin's herein. Worked great, and the best part was I didn't have to alter the AT code at all. Just had to create a directory under wp-content/themes/atahualpa/ called list-category-posts and place a default template file provided with the plugin to be able to use the shortcode below in posts, pages, anywhere really.

[catlist id=-3 tags=Netflix template=default excludeposts=1218 thumbnail=yes]

Just had to tweek the template so the thumbnails and text lined up the way I wanted, but since one can use the default.php file to create as many other template files as they wish, I was able to design a few different views for different pages.

You got me going on the right road and I ended up where I wanted to be. Thanks for that.


All times are GMT -6. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.