[resolved] please help with has_tag functions (4 posts)

  1. re-end
    Posted 7 years ago #

    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

  2. MichaelH
    Posted 7 years ago #

    I wonder if you this post by Nathan Rice might not help you.

  3. re-end
    Posted 7 years ago #

    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?

  4. re-end
    Posted 7 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic