Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Darryn, I would use the following manual condition for that.

    ! is_page( 'checkout' )

    That will make the box show up on all pages except for the page with checkout as slug.

    Hope that helps!

    Thread Starter darrynvanhout

    (@darrynvanhout)

    Thanks Danny.

    If I wanted to hide on multiple pages. How would I do this?

    /solar-quotes/ & /solar-quotes-3/

    I have tried this: ! is_page( ‘solar-quotes’&’solar-quotes-3’) however this does not seem to hide on the ‘solar-quotes-3’ page.

    Thanks

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Darryn,

    You can use the following to hide on multiple pages.

    ! is_page( 'solar-quotes' ) && ! is_page( 'solar-quotes-3' )

    You can continue like that by just adding more exclusion statements. Say you want to hide it on some-other-page as well:

    ! is_page( 'solar-quotes' ) && ! is_page( 'solar-quotes-3' ) && ! is_page( 'some-other-page' )

    Hope that makes sense!

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hiding on all subpages of a given page is a bit more difficult but I would use the following for that.

    This checks if the requested URL does not contain /my-account/.

    Use the following manual condition for this.

    stristr( $_SERVER['REQUEST_URI'], '/my-account/' ) === false

    To use this in combination with the other rules you set-up, use this.

    ! is_page( 'solar-quotes' ) && ! is_page( 'solar-quotes-3' ) && ( stristr( $_SERVER['REQUEST_URI'], '/my-account/' ) === false  )

    Hope that helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Condition: exclude a page’ is closed to new replies.