first commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for default displaying portfolio taxonomy
|
||||
*/
|
||||
get_header();
|
||||
//no columns on this page - giving true as a parameter to get column classes function
|
||||
$column_classes = fw_ext_extension_get_columns_classes( true );
|
||||
|
||||
//getting taxonomy name
|
||||
$ext_services_settings = fw()->extensions->get( 'services' )->get_settings();
|
||||
$taxonomy_name = $ext_services_settings['taxonomy_name'];
|
||||
|
||||
$categories = fw_ext_extension_get_listing_categories( array(), 'services' );
|
||||
global $wp_query;
|
||||
$sort_classes = fw_ext_extension_get_sort_classes( $wp_query->posts, $categories, '', 'services' );
|
||||
|
||||
$unique_id = uniqid();
|
||||
?>
|
||||
<div id="content" class="<?php echo esc_attr( $column_classes['main_column_class'] ); ?>">
|
||||
<?php
|
||||
if ( count( $categories ) > 1 ) : ?>
|
||||
<div class="filters isotope_filters-<?php echo esc_attr( $unique_id ); ?> text-center">
|
||||
<a href="#" data-filter="*" class="selected"><?php esc_html_e( 'All', 'fw' ); ?></a>
|
||||
<?php foreach ( $categories as $category ) : ?>
|
||||
<a href="#"
|
||||
data-filter=".<?php echo esc_attr( $category->slug ); ?>"><?php echo esc_html( $category->name ); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div><!-- eof isotope_filters -->
|
||||
<?php endif; //count subcategories check ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="isotope_container isotope row masonry-layout columns_margin_bottom_20"
|
||||
<?php if ( count( $categories ) > 1 ) { ?>
|
||||
data-filters=".isotope_filters-<?php echo esc_attr( $unique_id ); ?>"
|
||||
<?php } ?>
|
||||
>
|
||||
<?php
|
||||
while ( have_posts() ) : the_post();
|
||||
|
||||
?>
|
||||
<div
|
||||
class="isotope-item col-lg-4 col-md-6 col-sm-12 <?php echo esc_attr( $sort_classes[get_the_ID()] ); ?>">
|
||||
<?php
|
||||
include( fw()->extensions->get( 'services' )->locate_view_path( 'loop-item' ) );
|
||||
?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div><!-- eof isotope_container -->
|
||||
<?php
|
||||
else :
|
||||
// If no content, include the "No posts found" template.
|
||||
get_template_part( 'template-parts/content', 'none' );
|
||||
endif; ?>
|
||||
<?php // Pagination.
|
||||
$pagination = paginate_links( array(
|
||||
'prev_text' => __( 'Prev' ),
|
||||
'next_text' => __( 'Next' ),
|
||||
'type' => 'list',
|
||||
));
|
||||
if ($pagination) {
|
||||
echo '<nav class="pagination-nav">' . wp_kses_post( str_replace( 'page-numbers', 'page-numbers pagination', $pagination ) ) . '</nav>';
|
||||
}
|
||||
?>
|
||||
</div><!--eof #content -->
|
||||
|
||||
<?php if ( $column_classes['sidebar_class'] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes['sidebar_class'] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
get_footer();
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php if ( ! defined( 'FW' ) ) {
|
||||
die( 'Forbidden' );
|
||||
}
|
||||
/**
|
||||
* Single service loop item layout
|
||||
* also using as a default service view in a shortcode
|
||||
*/
|
||||
|
||||
$ext_services_settings = fw()->extensions->get( 'services' )->get_settings();
|
||||
$taxonomy_name = $ext_services_settings['taxonomy_name'];
|
||||
|
||||
$icon_array = fw_ext_services_get_icon_array();
|
||||
|
||||
?>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<article class="vertical-item content-padding with_border text-center">
|
||||
|
||||
<div class="item-media">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</div>
|
||||
|
||||
<div class="item-content">
|
||||
<h4 class="entry-title">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h4>
|
||||
<div>
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<?php else: ?>
|
||||
<div class="teaser text-center">
|
||||
|
||||
<?php if ( $icon_array['icon_type'] === 'image' ) : ?>
|
||||
<?php echo wp_kses_post( $icon_array['icon_html']); ?>
|
||||
<?php else: //icon ?>
|
||||
<div class="teaser_icon black size_big border_icon">
|
||||
<?php echo wp_kses_post( $icon_array['icon_html']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<h3>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h3>
|
||||
<div class="theme_buttons small_buttons color1">
|
||||
<?php
|
||||
echo get_the_term_list( get_the_ID(), $taxonomy_name, '', ' ', '' );
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
</div><!-- eof .teaser -->
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php if ( ! defined( 'FW' ) ) {
|
||||
die( 'Forbidden' );
|
||||
}
|
||||
/**
|
||||
* The template for displaying single service
|
||||
*
|
||||
*/
|
||||
|
||||
get_header();
|
||||
$pID = get_the_ID();
|
||||
|
||||
//no columns on single service page
|
||||
$column_classes = fw_ext_extension_get_columns_classes( true );
|
||||
|
||||
//getting taxonomy name
|
||||
$ext_services_settings = fw()->extensions->get( 'services' )->get_settings();
|
||||
$taxonomy_name = $ext_services_settings['taxonomy_name'];
|
||||
|
||||
$image_alt = get_post_meta(get_post_thumbnail_id($pID), '_wp_attachment_image_alt', true);
|
||||
|
||||
?>
|
||||
<div id="content" class="<?php echo esc_attr( $column_classes['main_column_class'] ); ?>">
|
||||
<?php
|
||||
// Start the Loop.
|
||||
while ( have_posts() ) : the_post(); ?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( "toppadding_5" ); ?>>
|
||||
|
||||
<?php if ( has_post_thumbnail()) { ?>
|
||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php echo esc_html( $image_alt ); ?>" class="alignleft big-margin" />
|
||||
<?php } ?>
|
||||
|
||||
<h1 class="entry-title topmargin_0">
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
||||
</article><!-- #post-## -->
|
||||
<?php endwhile; ?>
|
||||
</div><!--eof #content -->
|
||||
<?php if ( $column_classes['sidebar_class'] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes['sidebar_class'] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
get_footer();
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying services taxonomy
|
||||
*/
|
||||
get_header();
|
||||
//no columns on this page - giving true as a parameter to get column classes function
|
||||
$column_classes = fw_ext_extension_get_columns_classes( true );
|
||||
|
||||
//getting taxonomy name
|
||||
$ext_services_settings = fw()->extensions->get( 'services' )->get_settings();
|
||||
$taxonomy_name = $ext_services_settings['taxonomy_name'];
|
||||
|
||||
$categories = fw_ext_extension_get_listing_categories( array(), 'services' );
|
||||
global $wp_query;
|
||||
$sort_classes = fw_ext_extension_get_sort_classes( $wp_query->posts, $categories, '', 'services' );
|
||||
|
||||
//get taxonomy settings
|
||||
$queried_object = get_queried_object();
|
||||
$atts = fw_get_db_term_option( $queried_object->term_taxonomy_id, $queried_object->taxonomy );
|
||||
|
||||
$unique_id = uniqid();
|
||||
?>
|
||||
<div id="content" class="<?php echo esc_attr( $column_classes['main_column_class'] ); ?>">
|
||||
<?php
|
||||
//no need to show filters on category set check to 100 categories
|
||||
if ( count( $categories ) > 100 ) : ?>
|
||||
<div class="filters isotope_filters-<?php echo esc_attr( $unique_id ); ?> text-center">
|
||||
<a href="#" data-filter="*" class="selected"><?php esc_html_e( 'All', 'fw' ); ?></a>
|
||||
<?php foreach ( $categories as $category ) : ?>
|
||||
<a href="#"
|
||||
data-filter=".<?php echo esc_attr( $category->slug ); ?>"><?php echo esc_html( $category->name ); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div><!-- eof isotope_filters -->
|
||||
<?php endif; //count subcategories check ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="isotope_container isotope row masonry-layout columns_margin_bottom_20"
|
||||
<?php if ( count( $categories ) > 100 ) { ?>
|
||||
data-filters=".isotope_filters-<?php echo esc_attr( $unique_id ); ?>"
|
||||
<?php } ?>
|
||||
>
|
||||
<?php
|
||||
while ( have_posts() ) : the_post();
|
||||
?>
|
||||
<div
|
||||
class="isotope-item col-lg-4 col-md-6 col-sm-12 <?php echo esc_attr( $sort_classes[get_the_ID()] ); ?>">
|
||||
<?php
|
||||
include( fw()->extensions->get( 'services' )->locate_view_path( 'loop-item' ) );
|
||||
?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div><!-- eof isotope_container -->
|
||||
<?php
|
||||
else :
|
||||
// If no content, include the "No posts found" template.
|
||||
get_template_part( 'template-parts/content', 'none' );
|
||||
endif;
|
||||
?>
|
||||
<?php // Previous/next page navigation.
|
||||
$pagination = paginate_links( array(
|
||||
'prev_text' => __( 'Prev' ),
|
||||
'next_text' => __( 'Next' ),
|
||||
'type' => 'list',
|
||||
));
|
||||
if ($pagination) {
|
||||
echo '<nav class="pagination-nav">' . wp_kses_post( str_replace( 'page-numbers', 'page-numbers pagination', $pagination ) ) . '</nav>';
|
||||
}
|
||||
?>
|
||||
</div><!--eof #content -->
|
||||
|
||||
<?php if ( $column_classes['sidebar_class'] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes['sidebar_class'] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user