ThemeShaper Forums » Thematic

[closed]

Conditional in thematic_after ?

(7 posts)
  • Started 10 years ago by mmodic
  • Latest reply from mmodic
  • This topic is resolved
  1. mmodic
    Member

    Why conditional tag is_front_page() not working in thematic_after.... when I move code in wp_head it's working fine :(

    Posted 10 years ago #
  2. It works for me. Post the code you are using for this.

    -Gene

    Posted 10 years ago #
  3. mmodic
    Member

    function jquery_scripts() { ?>
    <?php if(is_front_page()){ ?>

    <script type="text/javascript">
    jQuery(document).ready(function($){
    ... code goes here );
    });
    </script>

    <?php }
    }

    Posted 10 years ago #
  4. mmodic
    Member

    and this gives me false on return ...

    Posted 10 years ago #
  5. Sorry still works for me. Here are some questions that may lead you in the right direction.

    Did you include this code outside of that function?

    add_action('thematic_after','jquery_scripts');

    and are you sure you've chosen the correct template tag for your situation?

    http://codex.wordpress.org/Conditional_Tags#The_Front_Page

    Have you altered the query on this page (custom loop?) and if so would need to wp_reset_query()

    http://codex.wordpress.org/Function_Reference/wp_reset_query

    Posted 10 years ago #
  6. mmodic
    Member

    no i didn't altered loop .. added wp_reset for test ... not working ...
    Yes i included add_action. If I change it to wp_head instead thematic_after it's working. And this is happening on clean thematic and wordpress install also .. hmm very strange ..

    Posted 10 years ago #
  7. mmodic
    Member

    now it's working ... I must be trippin .. sorry I'm not newbie with thematic and this was driving me crazy on 2 projects ... probably need to go o vacation . tnx a lot .

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.