[SOLVED] How to create category pages
Thought I would post this, since I spent hours looking for a solution before I solved it. I was looking for any way to create a page where certain content was on the top (sticky or otherwise), and allow posts to populate it from a specific category. I didn't want just a list of post titles, I wanted the full posts. Here's my fix. I edited the page2cat.php from this plugin:
http://pixline.net/wordpress-plugins/category-page-wordpress-plugin/en/ Here was the original function: Code:
function page2cat_content_catlist($content){ Code:
foreach($catposts as $single): Code:
foreach($catposts as $single): |
glb9235: make sure to see what happens when you go to a second page (change teh number of posts per page to easily test it.) I tryed playing with page2cat at one point and it kept restarting the posts from the beginning on each new page.
|
Hmm, that did seem to cause problems. Mine didn't create pages at all, just cut off after a certain number of posts. Any ideas?
I had forgotten to mention I added this to the functions.php file: Code:
function neat_trim($str, $n, $delim='...') { |
Hmm. I really want to be have page links from page menu navigation correspond to some categories of posts: is the above the only way to do this??
That seems very complicated, but maybe I'm not understanding what glb9235 was actually accomplishing. Already, I have this: http://endthelockout.org/ That second line is, of course, the categories. All I really want to do is integrate those into the page menu bar. Do I need to edit the code as glb9235 has done, or is there an easier solution? <<crossing fingers>> Thanks so much for any assistance! |
Did you ever look at the List Category Posts plugin? This uses a shortcode with plenty of variables. One of which is to show entire post.
|
Quote:
Jeff: You can use the plugin mentioned above to do this, or use the Page Links To plugin to put links to your category pages on the page menu bar. Edit: I was able to tweak the List Category Posts plugin template to work with atahualpa. It now uses mostly the same formatting as you set for normal posts - with header, byline, and body. Thought it might be useful. Code:
//Posts loop: |
Sometimes they are illusive and keyword searches don't always work. I find some plugins in unusual places and I spend WAY TOO MUCH TIME on the computer. But wait... That's what I do to make a living. Glad it worked for you.
|
All times are GMT -6. The time now is 03:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.