• I did search and asked similar thing previous times but no answer. My english may not good so I tried to ask again. 😉 I want to show specific sidebar item for each post. Different items for each post.

    Example
    Post 1 –> show sidebar item 1
    Post 2 –> show sidebar item 2

    Can I put specific to show by refer to post id? I want my reader to see different sidebar item specific for each post while they are reading each post.

    Hope this better than last time.

    cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • If I understand weell waht you are saying… when you will have 569 posts – you would need to have 569 sidebar files.
    Are you sure that’s what you want?

    Thread Starter sxperm

    (@sxperm)

    Thanks Moshu, That is what I wanted 😀

    Thread Starter sxperm

    (@sxperm)

    Err..I mean one item, not all in sidebar.

    For example

    My sidebar has 4 items, but only one in four that I need to display differently for each post. Specific itemfor each post. Are these still need to separate file for each post? If so, still ok for me. 😀

    That or 569 conditionals… and growing.

    I don’t think that’s such a wise idea 🙁
    You will need to edit your template files with every post: not only make another sidebar but also making the call for it in the single.php.
    Ending up with hundreds of template files in the theme folder doesn’t sound like a sane idea.

    Maybe there is some PHP magic for a better solution, I don’t know, I am not a coder.

    As for the PHP magic, it would help to get away from the hypotheticals and know just what the “specific sidebar item for each post” would actually be before we can figure out if PHP can provide some automation here.

    Thread Starter sxperm

    (@sxperm)

    Pardon me, I am not quite sure about PHP magic you are talking about. Is this one

    http://th.php.net/magic_quotes

    or this one.

    http://th2.php.net/oop5.magic

    Please clarify me.

    Regards

    We are NOT talking about a feature of PHP called ‘magic’, but rather the ability of PHP to provide a solution here, as in the ‘magic of computer programming.’

    You fail to detail exactly what “specific sidebar item for each post” actually means. Stick to that, and then we’ll see if there is something here you can automate.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to show different items in sidebar for each post’ is closed to new replies.