Example #1
0
    <div class="search-container pull-right">
      <a href="#" id="search-btn">
        <i class="fa fa-search"></i>
      </a>
      <?php 
get_search_form();
?>
    </div>
    
  </div>

</header>

<?php 
if (is_service_page()) {
    ?>
<div class="service-page-title" style="background-color:<?php 
    echo get_service_color();
    ?>
">
  <div class="container">
    <div class="col-md-12">
      <?php 
    the_title();
    ?>
    </div>
  </div>
</div>
<?php 
}
Example #2
0
    $is_service_page = is_service_page();
    // Get the header to show in the sidebar
    $service_header = '';
    if ($is_service_page !== false) {
        if ($is_service_page === 1) {
            $service_header = 'Professional Services';
        } else {
            if ($is_service_page === 2) {
                $service_header = 'Relevant Projects';
            }
        }
    } else {
        $service_header = 'Service Categories';
    }
    $post_parent = $is_service_page != false ? get_the_ID() : 0;
    $service_color = get_service_color();
    $the_query = new WP_Query(['post_type' => 'service', 'post_parent' => $post_parent, 'post_status' => 'publish']);
    if ($the_query->have_posts()) {
        if ($service_header) {
            ?>
      <div class="services-header"><?php 
            echo $service_header;
            ?>
</div>
    <?php 
        }
        while ($the_query->have_posts()) {
            $the_query->the_post();
            ?>

      <a