Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2017 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/89da3e4f21ee23ac6740376430afc12c to your computer and use it in GitHub Desktop.
Save anonymous/89da3e4f21ee23ac6740376430afc12c to your computer and use it in GitHub Desktop.
<?php
/**
*Recommended way to include parent theme styles.
*(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
*/
add_action( 'wp_enqueue_scripts', 'university_hub_pro_child_style' );
function university_hub_pro_child_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style.css',array('parent-style'));
}
function university_hub_site_branding() {
?>
<div class="site-branding">
<?php university_hub_the_custom_logo(); ?>
<?php $show_title = university_hub_get_option( 'show_title' ); ?>
<?php $show_tagline = university_hub_get_option( 'show_tagline' ); ?>
<?php if ( true === $show_title || true === $show_tagline ) : ?>
<div id="site-identity">
<?php if ( true === $show_title ) : ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php endif; ?>
<?php if ( true === $show_tagline ) : ?>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
<?php endif; ?>
</div><!-- #site-identity -->
<?php endif; ?>
</div><!-- .site-branding -->
<?php
$contact_number = university_hub_get_option( 'contact_number' );
$contact_email = university_hub_get_option( 'contact_email' );
$contact_address_1 = university_hub_get_option( 'contact_address_1' );
$contact_address_2 = university_hub_get_option( 'contact_address_2' );
?>
<div id="quick-contact">
<?php if ( ! empty( $contact_number ) || ! empty( $contact_email ) || ! empty( $contact_address_1 ) || ! empty( $contact_address_2 )) : ?>
<ul>
<?php if ( ! empty( $contact_number ) || ! empty( $contact_email ) ) : ?>
<li class="quick-call-info">
<a class="quick-call" href="tel:<?php echo preg_replace( '/\D+/', '', esc_attr( $contact_number ) ); ?>"><?php echo esc_attr( $contact_number ); ?></a>
<a class="quick-email" href="mailto:<?php echo esc_attr( $contact_email ); ?>"><?php echo esc_attr( antispambot( $contact_email ) ); ?></a>
</li>
<?php endif; ?>
<?php if ( ! empty( $contact_address_1 ) || ! empty( $contact_address_2 ) ) : ?>
<li class="quick-address-info">
<span class="main-address"><?php echo esc_html( $contact_address_1 ); ?></span>
<span class="sub-address"><?php echo esc_html( $contact_address_2 ); ?></span>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div><!-- #quick-contact -->
<div id="main-nav">
<nav id="site-navigation" class="main-navigation" role="navigation">
<div class="wrap-menu-content">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
//'fallback_cb' => 'university_hub_primary_navigation_fallback',
)
);
?>
</div><!-- .menu-content -->
</nav><!-- #site-navigation -->
<?php $search_in_header = university_hub_get_option( 'search_in_header' ); ?>
<?php if ( true === $search_in_header ) : ?>
<div class="header-search-box">
</div>
<?php endif; ?>
</div> <!-- #main-nav -->
<?php echo do_shortcode('[wpdreams_ajaxsearchlite]'); ?>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment