Premium support

Please log in to post in these forums. If you didn't create an account when you purchased, please contact us.

Free support

If you haven't purchased GP Premium, support for the free theme can be found on WordPress.org.

[Resolved] Navigation Is Really Long

Home Forums Support Navigation Is Really Long

This topic contains 42 replies, has 3 voices, and was last updated by  Tom 1 week, 1 day ago.

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

    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

    Both of them are causing the problem?

    Just trying to narrow it down.

    Can you try adding one only and then the other?

    Thanks!

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

    #382000

    Okay, explain how to add then one another?

    #382003

    Leo
    Staff

    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?

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

    #382004

    Leo
    Staff

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

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

    #382012

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

    #382131

    Tom
    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

    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

    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

    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

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

    #382826

    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

    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

    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

    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.