Support » Fixing WordPress » please help with has_tag functions

  • Resolved re-end


    For the first time, my apologize for my bad english.
    I have problem using has_tag function.

    In my blog, theres two language I use to post, its ‘bahasa’ (Indonesian) and the other language is ‘english’.

    Then I want customize my banner on sidebar followed by language that I use. If my post in bahasa, the banner’s apperance will difference with english post version. So, I added tags ‘bahasa’ in my post if I write in ‘bahasa’.

    And I put this code in the sidebar :

    if (has_tag('bahasa')){
         Banner A
    } else {
         Banner B

    But, it didnt work. Banner B is always show eventhough the post is in bahasa, so Banner A is never appeared.

    I had read this this
    but its not help me.

    Would you like to help me to resolve my problem with has_tag function.
    Thank You

Viewing 3 replies - 1 through 3 (of 3 total)
  • I wonder if you this post by Nathan Rice might not help you.

    WordPress Single Post Templates

    Thanks for the response…

    Yes, its not help me out. Nathan Rice post is based category. What i want is ordered by tags.

    When I try using is_tag functions the code is working. But it just work for tags archive page, in single page my problem still appear.

    Would someone help me please?

    After trial and error, it seem has_tag function cannot use in sidebar.
    How I can use this function in my sidebar?
    Please any suggestion?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘please help with has_tag functions’ is closed to new replies.