Jump to content
Sign in to follow this  
novakbrand

Different Sidebar Image for Each PAGE

Recommended Posts

novakbrand

I would like to insert a different sidebar image for each page (not post) of my PlatformPro site. I was able to insert an image using the image-widget found here, but it displays the same image on every page. I also tried simple-image-widget found here, but got the same results. Am I going about this the wrong way? Is there a way to create a custom Sidebar for each page instead?? Any help would be greatly appreciated! Adam

Share this post


Link to post
Share on other sites
ricardo

Hi Adam! Unless you use a sidebar manager, that method will not work. You didn't specify if this is a background image, a header or something similar but it's probably best accomplished with CSS. Not entirely sure this fits your scenario but, in a nutshell: - you create a custom field where you paste the URL of the image you want to use on that page; - you add a filter in functions.php to check the existence of the field and pull it to use in the sidebar; I've just did a similar customization for a client and I think it works fine if your images have the same size. Ricardo

Share this post


Link to post
Share on other sites
novakbrand

Thank you for the reply Ricardo! Here are a few links to better explain what I'm trying to accomplish: Approved Static Concept: this is what I'm striving to achieve PlatformPro in Progress: please note that the image repeats on every page. I hope solving the image issue will also shed some light on how to insert the 3 logos below the sidebar image and the Important Information box . . . Thank you much!! Adam

Share this post


Link to post
Share on other sites
Kate

Hi Adam, Another option is Widget Logic, which allows you to put different widgets on different pages.

Share this post


Link to post
Share on other sites
novakbrand

Thank you Kate. Maybe the Widget Logic is over my head, but I got it installed and read all documentation. It is very interesting, but I'm not sure that it will work in my case. I see the Widget Logic field at the bottom of the Image Widget I'm using, but unless it will allow me to specify which image appears on which page by entering specific code (this is the part that might be over my head) then I don't believe it's gonna work for me. Adam

Share this post


Link to post
Share on other sites
novakbrand

Kate, after more research I understand how the Widget Logic will allow me to select WHICH page my image will appear, but not WHICH page AND WHICH image will appear. In other words I'd like each page to have it's own unique image at the top of the sidebar.

Share this post


Link to post
Share on other sites
novakbrand

Ricardo, I originally pursued the Custom Field option you recommend, but was stumped when trying to add a Custom Field to a PAGE. I found documentation on how to add it to a POST, but my issue is PAGE specific. Can you please walk me through how I can add a custom field to my Primary Sidebar within Sidebar 1? Thank you, Adam

Share this post


Link to post
Share on other sites
Simon

if you have page numbers, you could use css to place the image direct, depending on the page number.

Share this post


Link to post
Share on other sites
novakbrand

Thanks Simon, I do have page numbers, but how would I create custom CSS to call on a specific page? This is the image level code: Trombley & Hanes Practice Adam

Share this post


Link to post
Share on other sites
novakbrand

Simon, this is the image level code:

[/code]

Share this post


Link to post
Share on other sites
cmunns

every page has a page ID attached to the body class. With css you can apply the images as background images to the sidebar e.g. ` .page-id-1 #sidebar .yourwidget {background:url('pathtoimage1.jpg') no-repeat top left;} .page-id-2 #sidebar .yourwidget {background:url('pathtoimage2.jpg') no-repeat top left;} ` and so on and so on.

Share this post


Link to post
Share on other sites
novakbrand

Ricardo, I've marked your answer as the "Best Answer" . . . because it is! Unfortunately, I didn't hear back from you so I got with some colleges and figured it out. Some of the other options did work, but I would call them more of a "band-aid". Thank you all! Adam

Share this post


Link to post
Share on other sites
ricardo

Sorry Adam! When I got back to your thread again, Kate and Simon where already helping you out with alternatives so I thought it would be confusing if I chime in at that time. Glad you sorted it out! =) Ricardo

Share this post


Link to post
Share on other sites
novakbrand

I totally understand. Thanks for your help! AN

Share this post


Link to post
Share on other sites
cabaj

Had a similar problem and after some searching found a plugin that solved it perfectly for me! It allows you to create as many new unique sidebars as you want and replace any existing sidebars with your custom ones. Great interface. Works like a charm. One of the best plugins I've come across. Here's the plugin site: http://wordpress.org/extend/plugins/custom-sidebars/

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  

×