Coding to exclude wp-pagenavi call from main page

  • jrothra

    #6070

    This is mainly a coding question because I’m not certain what code to write. On the site i’m working on, toward the bottom there are the little box “page” nav that wp-pagenavi ads automatically.

    URL: http://www.fbcfloralcity.org

    I want to exclude the wp-pagenavi function call from the front (index) page, but include it at all the other places it shows up. However, I’m not sure what code to add in order to remove code, or exactly where to put it in the child theme or custom CSS without risking not being able to auto-update the main theme. Can you advise?

    ronangelo

    #33276

    Try to add this on Custom CSS option or on the child theme’s css.

    .home .wp-pagenavi {
    display: none;
    }

    jrothra

    #33277

    ronangelo,

    I tried that in the custom css, but it didn’t work. I then tried in the child theme’s CSS file, but that didn’t change anything. 🙁 I then tried this, to no avail:

    home .wp-pagenavi {
    display: none;
    }

    (no period preceding “home”).

    ronangelo

    #33278
    .home .wp-pagenavi {
    display: none !important;
    }
    Mod

    Kenneth John Odle

    #33279

    You are only displaying one post excerpt per page. Without this navigation, people may find your site difficult to navigate.

    Quote:
    (no period preceding “home”).

    A period denotes a class in CSS. It’s not optional. But Ron’s code works in my localhost environment. Be sure to flush your server and browser caches.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.