File: /home/dh_5jabqq/bermudashipwreckarchive.com/wp-content/themes/loquet/single-museum.php
<?php
/*
* The template for displaying museum single
*/
get_header(); ?>
<?php while( have_posts() ) { ?>
<?php the_post(); ?>
<?php
/*====== Customizer Settings ======*/
$content_inner_padding = "0";
$page_navigation = get_theme_mod( 'loquet_museums_page_navigation' );
$page_navigation_width = get_theme_mod( 'loquet_museums_page_navigation_width', 'narrow' );
$page_navigation_skin = get_theme_mod( 'loquet_museums_page_navigation_skin', 'light' );
$social_sharing_box = get_theme_mod( 'loquet_museums_social_sharing_box', '1' );
$social_sharing_box_style = get_theme_mod( 'loquet_museums_social_sharing_box_style', 'style-13-v3' );
$social_sharing_box_size = get_theme_mod( 'loquet_museums_social_sharing_box_size', 'size-s' );
$container_width = get_theme_mod( 'loquet_museums_page_container_width', 'narrow' );
$featured_header = get_theme_mod( 'loquet_museums_featured_header', '1' );
$featured_header_position = get_theme_mod( 'loquet_museums_featured_header_position', 'position-2' );
$comments = get_theme_mod( 'loquet_museums_comments', '1' );
$categories = get_theme_mod( 'loquet_museums_details_categories', '1' );
$related_museums = get_theme_mod( 'loquet_museums_related_museums' );
$tags = get_theme_mod( 'loquet_museums_tags', '1' );
$tags_style = get_theme_mod( 'loquet_museums_tags_style', 'style-3' );
$sidebar_widgets_position = get_theme_mod( 'loquet_museums_sidebar_widgets_position', 'hide' );
$sidebar = get_theme_mod( 'loquet_museums_sidebar', 'loquet-sidebar' );
/*====== Metabox Settings ======*/
if( function_exists( 'rwmb_meta' ) ) {
$post_page_navigation = rwmb_meta( 'loquet-page-navigation' );
$post_social_sharing_box = rwmb_meta( 'loquet-social-sharing-box' );
$post_content_inner_padding = rwmb_meta( 'loquet-content-inner-padding' );
$post_container_width = rwmb_meta( 'loquet-page-container-width' );
$post_featured_header = rwmb_meta( 'loquet-featured-header' );
$post_featured_header_position = rwmb_meta( 'loquet-featured-header-position' );
$post_comments = rwmb_meta( 'loquet-comments' );
} else {
$post_page_navigation = "";
$post_social_sharing_box = "";
$post_content_inner_padding = "";
$post_container_width = "";
$post_featured_header = "";
$post_featured_header_position = "";
$post_comments = "";
}
if( $post_comments !== "default" and !empty( $post_comments ) or $post_comments == "0" ) {
$comments = esc_attr( $post_comments );
}
if( $post_social_sharing_box !== "default" and !empty( $post_social_sharing_box ) or $post_social_sharing_box == "0" ) {
$social_sharing_box = esc_attr( $post_social_sharing_box );
}
if( $post_content_inner_padding !== "default" and !empty( $post_content_inner_padding ) or $post_content_inner_padding == "0" ) {
$content_inner_padding = esc_attr( $post_content_inner_padding );
}
if( $post_page_navigation !== "default" and !empty( $post_page_navigation ) or $post_page_navigation == "0" ) {
$page_navigation = esc_attr( $post_page_navigation );
}
if( $post_container_width !== "default" and !empty( $post_container_width ) ) {
$container_width = esc_attr( $post_container_width );
}
if( $post_featured_header !== "default" and !empty( $post_featured_header ) or $post_featured_header == "0" ) {
$featured_header = esc_attr( $post_featured_header );
}
if( $post_featured_header_position !== "default" and !empty( $post_featured_header_position ) or $post_featured_header_position == "0" ) {
$featured_header_position = esc_attr( $post_featured_header_position );
}
if( $featured_header_position == "position-2" ) {
$page_content_style = "gt-style-2";
} else {
$page_content_style = "gt-style-1";
}
?>
<?php
if( $featured_header == "1" and $featured_header_position == "position-2" ) {
echo loquet_featured_header( $post_id = get_the_ID(), $position = esc_attr( $featured_header_position ) );
}
?>
<?php echo loquet_page_wrapper_before(); ?>
<?php
if( $featured_header == "1" and $featured_header_position == "position-3" ) {
echo loquet_container_before();
echo loquet_featured_header( $post_id = get_the_ID(), $position = esc_attr( $featured_header_position ) );
echo loquet_container_after();
}
?>
<?php
if( $container_width == "wide" ) {
echo loquet_flex_container_full_before( $extra_class = "gt-page-layout" );
} elseif( $container_width == "fluid" ) {
echo loquet_flex_container_fluid_before( $extra_class = "gt-page-layout" );
} elseif( $container_width == "narrow" ) {
echo loquet_flex_container_before( $extra_class = "gt-page-layout" );
}
?>
<?php echo loquet_page_content_before( $extra_class = esc_attr( $page_content_style ) ); ?>
<article class="gt-article">
<div id="post-<?php the_ID(); ?>" <?php post_class( 'gt-content' ); ?>>
<?php
if( post_password_required() ) {
if( function_exists( 'loquet_password_protected_box' ) ) {
echo loquet_password_protected_box();
}
} else {
?>
<div class="gt-content-header">
<?php
if( $categories == "1" ) {
if( !empty( loquet_get_post_terms( $post_id = get_the_ID(), $taxonomy = "museum-category", $post_type = "museum" ) ) ) {
echo '<div class="gt-categories">';
echo loquet_get_post_terms( $post_id = get_the_ID(), $taxonomy = "museum-category", $post_type = "museum" );
echo '</div>';
}
}
?>
<h1><?php the_title(); ?></h1>
</div>
<?php
if( $featured_header == "1" and $featured_header_position == "position-1" ) {
echo loquet_featured_header( $post_id = get_the_ID(), $position = esc_attr( $featured_header_position ) );
}
?>
<div class="gt-content-body">
<div class="gt-item gt-item-content<?php if( !empty( $content_inner_padding ) ){ echo " gt-inner-padding-" . esc_attr( $content_inner_padding ); } ?>">
<?php the_content(); ?>
</div>
<?php echo loquet_museum_content_modules( $museum_id = get_the_ID() ); ?>
<?php
if( $tags == "1" ) {
if( !empty( loquet_get_post_terms( $post_id = get_the_ID(), $taxonomy = "museum-tag", $post_type = "museum" ) ) ) {
echo '<div class="gt-item gt-item-tags">';
echo '<div class="gt-title">' . esc_html__( 'Tags:', 'loquet' ) . '</div>';
echo '<div class="gt-term-listing gt-' . esc_attr( $tags_style ) . '">';
echo loquet_get_post_terms( $post_id = get_the_ID(), $taxonomy = "museum-tag", $post_type = "museum" );
echo '</div>';
echo '</div>';
}
}
wp_link_pages(
array(
'before' => '<div class="gt-item gt-item-pages"><div class="gt-title">' . esc_html__( 'Pages:', 'loquet' ) . '</div><div class="gt-page-pages">',
'after' => '</div></div>',
)
);
if( $social_sharing_box == "1" and function_exists( 'loquet_social_sharing' ) ) {
if( !empty( loquet_social_sharing( $class = "", $style = esc_attr( $social_sharing_box_style ), $skin = "light", $size = esc_attr( $social_sharing_box_size ), $custom_title = "", $align = "left" ) ) ) {
echo '<div class="gt-item gt-item-social-sharing">';
echo loquet_social_sharing( $class = "", $style = esc_attr( $social_sharing_box_style ), $skin = "light", $size = esc_attr( $social_sharing_box_size ), $custom_title = "", $align = "left" );
echo '</div>';
}
}
if( $related_museums == "1" ) {
if( !empty( loquet_museum_related_museums( $museum_id = get_the_ID() ) ) ) {
echo '<div class="gt-item gt-item-related-museums">';
echo loquet_museum_related_museums( $museum_id = get_the_ID() );
echo '</div>';
}
}
?>
</div>
<?php
if( $comments == "1" ) {
echo '<div class="gt-content-footer">';
if( $comments == "1" ) {
if( comments_open() || get_comments_number() ) {
echo '<div class="gt-item gt-item-comments">';
comments_template();
echo '</div>';
}
}
echo '</div>';
}
?>
<?php } ?>
</div>
</article>
<?php echo loquet_page_content_after(); ?>
<?php
echo loquet_sidebar_before();
if( $sidebar_widgets_position == "before-sidebar" ) {
dynamic_sidebar( $sidebar );
}
echo loquet_museum_sidebar_modules( $museum_id = get_the_ID() );
if( $sidebar_widgets_position == "after-sidebar" ) {
dynamic_sidebar( $sidebar );
}
echo loquet_sidebar_after();
?>
<?php
if( $container_width == "wide" ) {
echo loquet_flex_container_full_after();
} elseif( $container_width == "fluid" ) {
echo loquet_flex_container_fluid_after();
} elseif( $container_width == "narrow" ) {
echo loquet_flex_container_after();
}
?>
<?php echo loquet_page_wrapper_after(); ?>
<?php
if( $page_navigation == "1" ) {
echo '<div class="gt-page-pagination gt-style-1 gt-' . esc_attr( $page_navigation_skin ) . '">';
if( $page_navigation_width == "wide" ) {
echo loquet_container_full_before();
} elseif( $page_navigation_width == "narrow" ) {
echo loquet_container_before();
}
echo loquet_page_navigation();
if( $page_navigation_width == "wide" ) {
echo loquet_container_full_after();
} elseif( $page_navigation_width == "narrow" ) {
echo loquet_container_after();
}
echo '</div>';
}
?>
<?php } ?>
<?php get_footer();