• If I talk about strawberries I want only strawberries on the page.. and if chocolate then chocolate will be displayed on the page. Can this be done?

Viewing 1 replies (of 1 total)
  • Yes my dear.

    <?php if( is_home()){ ?>

    ^ to check if the page is the home page

    <?php if ( is_page(‘About’) || is_page(‘Contact’)){ ?>

    ^ to check whether the page is the “About” page or “Contact” page

    <?php if( is_single()){ ?>

    ^ to check if it’s a single page ( page of each post individually )

    so if you want strawberries you will get strawberries by checking if the page the user is on, is the strawberry page

    if( is_single() && in_category(‘Strawberry’) )

    //do something like changing the banner or image ??

    Have a good day

Viewing 1 replies (of 1 total)
  • The topic ‘How to create different banners or images to each page with different focus’ is closed to new replies.