[Resolved] Navigation Is Really Long

Home Forums Support [Resolved] Navigation Is Really Long

Home Forums Support Navigation Is Really Long

Viewing 15 posts - 16 through 30 (of 43 total)
  • Author
    Posts
  • #381968
    Terrell Jerry

    It was the two you told me to disable. I got the code from Tom.Is there another way I can use both of those codes.

    #381975
    Leo
    Staff
    Customer Support

    Both of them are causing the problem?

    Just trying to narrow it down.

    Can you try adding one only and then the other?

    Thanks!

    #382000
    Terrell Jerry

    Okay, explain how to add then one another?

    #382003
    Leo
    Staff
    Customer Support

    So currently you removed both blocks of code the problem is fixed.

    So try adding the first one back in, does the problem reappear?

    If not then remove the first one, add in the second, does the problem reppear?

    #382004
    Leo
    Staff
    Customer Support

    Also I think we only helped with the conditional statements. Where did the Script come from? Maybe it’s causing the issue?

    #382012
    Terrell Jerry

    Okay, where can I get another script that’s compatible.

    #382131
    Tom
    Lead Developer
    Lead Developer

    Which exact snippet is causing the issue?

    Out of the three, only one of them should be breaking things. Have you narrowed down which one is the problem?

    #382334
    Terrell Jerry

    Tom

    Stop banners from showing on the homepage. Causing the problems on my website!

    if ( ! is_front_page() ) : ?><script data-oio-zone=”type=banner&zone=2&align=center&refresh=0″>
    (function(w,d,e,o,u,s,t){w[o]||(w[o]={},s=d.createElement(e),s.src=u,s.async=1,
    t=d.getElementsByTagName(e)[0],t.parentNode.insertBefore(s,t))})(window,document,
    “script”,”oiopub”,”https://zippsurge.com/wp-content/plugins/oiopub-direct/zones.js”);
    </script>
    <?php endif;

    Make banner show up on the blog and single post with sections active.

    add_action( ‘generate_before_main_content’,’tu_blog_banner’ );
    function tu_blog_banner() {
    if ( is_home() || is_single() ) {
    ?>
    <script data-oio-zone=”type=banner&zone=2&align=center&refresh=0″>
    (function(w,d,e,o,u,s,t){w[o]||(w[o]={},s=d.createElement(e),s.src=u,s.async=1,
    t=d.getElementsByTagName(e)[0],t.parentNode.insertBefore(s,t))})(window,document,
    “script”,”oiopub”,”https://zippsurge.com/wp-content/plugins/oiopub-direct/zones.js”);
    </script>
    <?php
    }
    }

    Thank you for responding back so fast.

    #382400
    Tom
    Lead Developer
    Lead Developer

    That first snippet isn’t hooked into anywhere (no add_action()).

    It needs to be hooked into a certain area or else your site will break. Where do you want the banner to show up?

    #382479
    Terrell Jerry

    The first snippet I don’t want banners to show up on the homepage. The last snippet I only want it to show up on blog page and single post with sections active.

    #382602
    Tom
    Lead Developer
    Lead Developer

    Where you want the first snippet to show up? After the header?

    #382826
    Terrell Jerry

    Yes, I want the first snippet to show up in the container area. The second snippet on the blog and single post container. Also, I want both to show up when sections are enabled.

    #383045
    Tom
    Lead Developer
    Lead Developer

    Try this instead of the first snippet:

    add_action( 'generate_after_header', 'tu_insert_script_after_header' );
    function tu_insert_script_after_header() {
       if ( ! is_front_page() ) : ?>
          <script data-oio-zone="type=banner&zone=2&align=center&refresh=0">
    (function(w,d,e,o,u,s,t){w[o]||(w[o]={},s=d.createElement(e),s.src=u,s.async=1,
    t=d.getElementsByTagName(e)[0],t.parentNode.insertBefore(s,t))})(window,document,
    "script","oiopub","https://zippsurge.com/wp-content/plugins/oiopub-direct/zones.js");
       </script>
    <?php endif;
    }
    #383174
    Terrell Jerry

    That worked Tom but it’s showing on the homepage. How do we stop that from showing on the homepage I mean any banners?

    #383175
    Terrell Jerry

    Also, stop it from showing on about and contact page.

Viewing 15 posts - 16 through 30 (of 43 total)
  • You must be logged in to reply to this topic.