WordPress.org

Ready to get started?Download WordPress

Forums

Custom Sidebar Question (8 posts)

  1. pl2
    Member
    Posted 1 year ago #

    Hello everyone

    I'm new to WordPress.

    For my blog, I need different sidebars for each page. I, essentially need an image (can be the same image every time) but I need that image to direct to a different URL for each page.

    I've searched about this and the only thing I found was Image Widget, which is good, but I can't change the URL for every page. It's just one image, one URL for your sidebar.

    What's the simplest way to achieve this?

    Thank you.

  2. I would do this by adding two custom fields on each page - one for your image path and one for the link URL. Then, call those custom fields in your sidebar.php file.

    References:

    http://codex.wordpress.org/Custom_Fields
    http://www.wprecipes.com/wordpress-how-to-get-custom-fields-outside-the-loop

  3. pl2
    Member
    Posted 1 year ago #

    Thank you zoonini,

    I was wondering if there was any easier way of doing this for a beginner?

    Thank you.

  4. pl2
    Member
    Posted 1 year ago #

    I know how to create a custom field. However, the way I understand it is that you have your key and the value, one key would be the image, and the value of that be the url path of the image? How would I add the url target of the image there?

    Or do I create 1 key and 2 different values? One for the image target url, and one for the image url?

    Just a bit confused.

    Thank you.

  5. marquex
    Member
    Posted 1 year ago #

    Hi pl2

    Try this plugin

    http://wordpress.org/extend/plugins/custom-sidebars/

    It does what you need, and you don't have to invent anything new.

    Cheers

  6. pl2
    Member
    Posted 1 year ago #

    That sound great. I've just installed it, and it says that when you create a custom sidebar, you can see it in the widgets menu. Mine does not show up in the widgets menu. What am I doing wrong?

    [ Please do not bump, it's not permitted here. ]

  7. nycnml
    Member
    Posted 1 year ago #

    Related question: I've installed the plugin and have set up a custom sidebar. I then dragged some content into the new sidebar via the Widgets panel. So far, so good. I created a page, and designated the custom sidebar to appear. It seems my theme may not support dynamic sidebars — the theme is PureType from Elegant Themes.

    Some research suggests that I place the following code:

    wp_head();

    before the closing HEAD tag (</head>) in my HTML.

    Question: Does this seem like a correct fix, and if so, do you know where I would find the HTML file(s) to insert this line into? The HTML view of pages I create via wp-admin does not show any HEAD tags.

  8. nycnml - please start a new thread for your question, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic