Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   [How To] modify 'Category Page' aka page2cat to display posts instead of just titles (http://forum.bytesforall.com/showthread.php?t=2963)

juggledad Aug 14, 2009 05:33 AM

[How To] modify 'Category Page' aka page2cat to display posts instead of just titles
 
While this plugin 'Category Page' aka page2cat (version 2.5 - get it at http://wordpress.org/extend/plugins/page2cat/) seems to be gathering dust (last update 3/29/2008) it still works, but the way it works is it lists just the titles (as links) of a category on a page. Most people seem to want to be able to list the entire post. You can do that by making a slight change to the plugin.

Edit the plugin lines 618-620 and change them from:
HTML Code:

  foreach($catposts as $single):
        $output .= "<li><a href='".get_permalink($single->ID)."'>".$single->post_title."</a></li>";
    endforeach;

to
HTML Code:

  foreach($catposts as $single):
        query_posts('cat='.$v0.'&showposts='.get_option('posts_per_page'));
  endforeach;

That all it takes.

herrprof Aug 14, 2009 09:01 AM

Works good for me, but it seems its duplicating the last posts tags in the section title:

For example:

http://truechiptilldeath.com/news/hardware/

Ideas?

juggledad Aug 14, 2009 09:05 AM

I'm not sure what you are talking about, can you be more specific?

herrprof Aug 14, 2009 09:11 AM

If you look at the my last link.. it seems to be showing the category header as a new post, and it has tags that duplicates the most recent tags in that category.. and for some reason also shows socialable links.

juggledad Aug 14, 2009 10:37 AM

What you are seeing is the PAGE info. This is a trade off, You could shut off the title display for the page and the footer items, but then the posts wouldn't show them.

You could dig into the code and figure a way to skip the page info altogether when running this plugin.

herrprof Aug 14, 2009 10:55 AM

Ok you gave me a clue, I was able to disable the page title and sociable from the meta info, but its still showing those phantom tags from the last post in the cat at the top.. ideas?

http://truechiptilldeath.com/news/featured/

juggledad Aug 15, 2009 04:32 AM

If you are talking about the 'Category: Chipmusic | Comments are closed' that is the PAGE info. It is the PAGE Footer. It looks like the page info is displayed, then the PAGE2CAT code is invoked to display the posts.

herrprof Aug 15, 2009 09:27 AM

Ah got it.. so the bug/choice is in page2cat trying to display a footer for the category. No way to exclude JUST this footer? I can disable all footers on multipost pages as a workaround, but thats undesirable.

herrprof Aug 15, 2009 11:43 AM

Another thing I noticed, if you click on OLDER POSTS, it displays the same posts again on page 2..

ernie334 Aug 22, 2009 01:47 AM

Is it possible to display post with certain tags onto a Page instead of categories?


Also, when displaying post from categories onto a Page, can we post excerpt instead of full post?

Thank you

horsemansarts Aug 22, 2009 02:26 PM

When I read the fix for the page2cat plugin I thought COOL, that's what I have wanted! And then I thought what you said, can't I just have excerpts? I figured I'd just give the code change a try (I'm no programmer but I thought HEY I can cut and paste with the best of them) and then if it worked out pretty good I'd ask about the excerpts. Much to my delight the output was alreaddy excerpts on the page. I don't know if I have some setting that is different? And for me removing the footer for multi-post pages worked out perfectly.

chrisp Aug 24, 2009 03:24 PM

I was following the instructions here to get a full post and everything worked fine except I am only getting an excerpt.

Quote:

foreach($catposts as $single):
query_posts('cat='.$v0.'&showposts='.get_option('p osts_per_page'));
endforeach;
Is there something else that I needed to do to get the full post displayed on a page?

Thanks :)

herrprof Aug 27, 2009 06:08 PM

Posts vs excerpts is an option in atahualpa page views.

Any update on the page repeating bug? Or am I missing a configureation setting?

agrossman Aug 27, 2009 06:42 PM

This thread was very helpful, and I am now able to display the entire post.

However, I do not want the post to be displayed on the homepage. How can I accomplish this?

Thanks!

p.s. To be more specific, when my posts are attributed to my category page, let's call it id=39, I do not want them to appear on the homepage. However, new posts not associated with id=39 I would still like to appear on the homepage.

agrossman Aug 27, 2009 07:39 PM

I found my answer here:

How to post on 2 seperate "Pages" or "Cats":

http://forum.bytesforall.com/showthr...=homepage+post

Thanks for such a great forum!!

jiggajones Nov 16, 2009 01:47 AM

Quote:

Originally Posted by juggledad (Post 12664)
While this plugin (version 2.5) seems to be gathering dust (last update 3/29/2008) it still works, but the way it works is it lists just the titles (as links) of a category on a page. Most people seem to want to be able to list the entire post. You can do that by making a slight change to the plugin.

Edit the plugin lines 618-620 and change them from:
HTML Code:

  foreach($catposts as $single):
        $output .= "<li><a href='".get_permalink($single->ID)."'>".$single->post_title."</a></li>";
    endforeach;

to
HTML Code:

  foreach($catposts as $single):
        query_posts('cat='.$v0.'&showposts='.get_option('posts_per_page'));
  endforeach;

That all it takes.


Just tried this but it still gives me a list instead of the full post, you can see it here, http://abouncybear.com/?page_id=540

is there anyway to get this to show the full post? or have I missed something?

juggledad Nov 16, 2009 10:55 AM

please attach the full plugin so I can take a look at what you did.

axesim Nov 30, 2009 06:51 PM

I searched page2cat plugin in wordpress; however it does not seem to exist. I am trying to list all the posts with their images in category view, but it displays only the text. Would you help me to include images to the posts in category view? (http://www.lindentea.com/)

Thank you,

juggledad Nov 30, 2009 06:58 PM

see post#1 I edited it with the link - it called 'Category Page' - I replied to your post in the other thread about that.

axesim Nov 30, 2009 06:59 PM

Please ignore my question here as you answered me in another page (http://forum.bytesforall.com/showthr...light=category). Sorry for posting the same question twice as I was searching other related posts to find a solution and thought that someone else would answer me as well. I was actually not expecting such a prompt response !! I really appreciate it. I will follow your instructions and try to fix. I hope it works.

SupraTT Dec 6, 2009 02:52 AM

Anyone figure out how to remove the footer right under the headline title without emptying the "FOOTER: Multi Post Pages" option? I want to have a footer for all the post excerpts, just dont want the extra footer showing up under the headline.

juggledad Dec 6, 2009 10:04 AM

A post is made up of the
Kicker
Headline
byline
body
footer

so are you talking about the 'footer' or 'byline'?

SupraTT Dec 6, 2009 10:28 PM

Hi Juggledad,

I mean the footer. On a multipost page, I want the footer to show for the exceprts, but when I use the Category Pages plugin to make a page with posts of a specific category, the page's title has a footer. I dont want the page's footer showing up, but the footer of the post excerpts to show up.

juggledad Dec 7, 2009 02:11 PM

Did you apply the changes from the start of this post?
Are you using the [catlist=nn] to generate the category list on the page?

SupraTT Dec 7, 2009 04:24 PM

Hi Juggledad,

Yes, I made all the changes from this post and I am using [catlist=XX] to generate the category posts. I am having the same issue as Post #8 on this thread.

Thank you,

SupraTT


All times are GMT -6. The time now is 07:49 PM.

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