Remove slider on home page

  • Anonymous

    #37322

    Yup, you have to replace if ( is_page('blog') ) part with other pages conditional tags.

    DezD

    #37323

    Hi Prasanna

    Excellent, can you add multiple pages for example: if ( is_page(‘blog’), ( is_page(‘another1’, ), ( is_page(‘another2’, ) )

    (haven’t got a clue if this is anywhere correct…)

    Speak soon

    Deryn

    Anonymous

    #37324

    Yeah, but commas break your code. Use OR (||) operator.

    Example,

    if( is_home() || is_page('about') || is_category('technology') )

    DezD

    #37325

    Hi Prasanna

    Many thanks again, you’re a star….

    Off to get some tea as it’s 18:04 here in the UK.

    Hope to speak again soon.

    Kind regards

    Deryn

    Anonymous

    #37326

    Off to get some sleep as it’s 23:00 here in India. 😀

    Admin

    Syahir Hakim

    #37327

    The is_page() function can accept an array of pages to check for, and you can also use slug along with ID, like this:

    is_page( array( 42, 'about-me', 'Contact' ) );

    That will check if the current page is any one of those pages.

    DezD

    #37328

    Hi Syahir

    Thanks for that, much appreciated.

    As I mentioned to Prasanna I know nothing, or at least very little, about php so this will be a steep learning curve so please have some patience with me. I do have some other questions but they are on different subjects so I will raise separate posts for those.

    Hope to speak soon

    Best wishes

    Deryn

    Anonymous

    #37329

    Marking thread as resolved. You can do this yourself as well.

Viewing 8 posts - 11 through 18 (of 18 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!