Display Specific Posts Catagories on Pages
I have been working a new site for my mom – upstageproductionsinc.com
What I want to do is display posts on a page that are limited to a particular post category.
For instance, I can lock “Front page posts categories” to “news”.
I have a page called “Auditions”. I want to only display posts that are categorized as “auditions” there.
Now I have found several plug-ins that do this, but they all display the posts in a different style. I wish to duplicate the style of the front / main page.
Can some one please point me in the right direction? I was unable to figure out how the main page calls and loops posts based on categories.
Isn’t there just a quick way of duplicating the “Category Widget” onto a page . . . I do not really want to have a sidebar widget and wish it to be easily accessible via the main menu . . .
For instance, the plugin Posts in pages (http://www.ivycat.com/wordpress/wordpress-plugins/posts-in-page/) is flexible enough that I can point it to a template file . . . but which template file fires the proper css in the graphene theme?
Additionally, I know I can create a custom menu to fire the Categories instead of a page, but I really want the flexibility of having a semi-static page element as a header, then of course the relevant categories below.
I thank you in advance for your help in this matter.
Ok . . so both index.php and category.php make a call to loop.php via get_template_part( ‘loop’, ‘index’ ) or get_template_part( ‘loop’, ‘category’ ) to actually perform the loop and formatting functions of the posts on either page.
Except that when I try to copy loop.php to a file, say custom_loop.php, for use with “Posts in Page” I get a multitude of errors and am unable to duplicate the original look and feel.
Has any one else had experience with this?
Regarding the fact that there is a few other way to accomplish this, Kenneth suggestion is by far the easiest solution.
But if you want to get your hand dirty you can do something like this:
1. Create custom shortcode that retrieves posts from specific category. (the best solution)
2. Create custom page template for specific page with specific post category loop (for example, page template for news will contain loop for querying posts with “news” category assigned to it etc.)
That’s all I can think of it now. There is no easy out of the box solution for this, as far as I now.
I guess I am not asking the question properly.
Specifically, what PHP file does the theme use to create the list of the posts to display on the main page and how/where does it get the category passed to it? What is the actual flow?
I am not familiar with FireFox and FireBug . . . I will look into that. Addtionally, although I would LOVE to create a custom shortcode, I am fairly new to WordPress. I have my background in asp and moving to php has been painful at times. So please forgive me if you think you gave easy answers as they are not easy to me.
Maybe this will be helpful for understanding work flow of wordpress based site:
So, when you open index.php it loops the posts based on theme options, and on category.php it loops based on category template in that file.
It’s a little confusing I know 🙂
Basically, the best solution for you (at this moment) is to use plugin for that and style the output of plugin with css to look like standard Graphene posts.
P.S. there is a tons of tutorial for wp shortcodes but you need to read this first:
You must be logged in to reply to this topic.