• Resolved ladyofthecave

    (@ladyofthecave)


    Goodmorning all,

    I am using the EA-Starter theme. In the header.php there is an if/else statement to show up a featured image as a header-image.

    if(is_front_page()){
    $bgurl = get_the_post_thumbnail_url();
    if( empty($bgurl)){
    $bgurl = get_the_post_thumbnail_url(get_option( ‘page_on_front’ ));
    }
    echo ‘<div class=”banner” style=”background-image: url(‘. $bgurl .’)”>’;

    echo ‘<form method=”GET” action=”locaties”>

    <p>Vind een ambulante organisatie die bij je past!</p>

    <div class=”search_button_input”><input type=”text” id=”search_location” name=”search_location” placeholder=”Plaatsnaam”>
    <input type=”submit” id=”search_button_ambulant” value=”Zoek”></div>

    </form>’;

    //I would like to place here an else if statement..

    }else {
    $bgurl = get_the_post_thumbnail_url();
    if( empty($bgurl)){
    $bgurl = get_the_post_thumbnail_url(get_option( ‘page_on_front’ ));
    }
    echo ‘<div class=”banner” style=”background-image: url(‘. $bgurl .’)”>’;
    }
    echo ‘</div>’ ;`

    I would like to make an else-if between these code to prevent on single_job pages that the company logo is replacing the header-image. But I am new to wordpress, so do not know how to call this single_job-page. Do you know how I can call this single_job page?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘if statement preventing for single_jobs to show up large logo’ is closed to new replies.