Jump to content
Sign in to follow this  
bizint

Different news types displayed on different pages in same sidebar

Recommended Posts

bizint

I've got five categories of news that I want to display - I want some types of news displayed on nearly every page - but I want the news to be relevant to that page. For example on front page I want all the latest posts...easy enough...but on the Bristol Contact page I only want news displayed in the same area but with "Bristol" tags....or on the Fit-Out Page I only wants news displayed that is from the "Office-Construction" Category I have....does anyone know if this can be done?

Share this post


Link to post
Share on other sites
bizint

Or how...for example. If I add a post widget in the universal side bar...I get the latest news in a customisable list.... But If i want a different set of news to appear in the same sidebar on a different page...I cant seem to do that. Widget logic could make that roll of news appear on that page only....but I cant seem to put the same widget into the same universal side bar...and choose different paraneters and have that seeting for the same widget appear in another page in the same universal sidebar?!

Share this post


Link to post
Share on other sites
bizint

no ideas? I just need to display different categories of news on different pages in the widget side bar?

Share this post


Link to post
Share on other sites
kastelic

If your just doing it in a sidebar widget, I'm sure there's a plugin out there for doing this. But you could also insert the code to do it directly in you template file by writing a new function in functions.php and inserting it via a hook into your site. The code is a custom loop based on tags, and its wrapped in a conditional statement based on the wordpress conditional tags. The function to make the loop is called WP-Query. Custom loops: http://codex.wordpress.org/Class_Reference/WP_Query Hooks: http://www.pagelines.com/docs/base-child-theme Conditional Tags: http://codex.wordpress.org/Conditional_Tags

Share this post


Link to post
Share on other sites
bizint

Well I've found the "answer" to what I'm trying to do: Display posts in a sidebar that are related to the page name/category/tag http://wordpress.org/support/topic/pull-one-category-on-a-page?replies=3 But, what is said in the post is complete alien gobble-dee-gook....what on earth is all that about?! Am I getting into hot water or is this easier to integrate than it first looks?!

Share this post


Link to post
Share on other sites
bizint

OMG...took ages...the widget I needed was "List Category Posts" Widget....add as many of them as you like to a sidebar and use Widget Logic to only show the relevant one on the right page!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×