- <?php
- /**
- * The default template for displaying content
- * Used for single posts.
- */
- ?>
- <?php $grid = ot_get_option( 'grid_option', 'col-sm-' ); ?>
- <a id="top"></a>
- <div class="container content-single">
- <div class="row">
- <div class="<?php echo sanitize_html_class( $grid );?>12">
- <div id="post-<?php the_ID();?>" <?php post_class( 'link-container' );?>>
- <div class="row">
- <div class="<?php echo sanitize_html_class( $grid );?>12">
- <div class="link-header nocenter">
- <h1 class="post-header"><?php printf( "%s", $site_icon );?> <?php the_title();?></h1>
- <div class="link-header-back">
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> <?php _e( 'Back To Home', 'test123' ); ?></a>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="<?php echo sanitize_html_class( $grid );?>12">
- <div class="link-content">
- <div class="crp_related crp-rounded-thumbs"><ul>
- <?
- $args = array(
- 'orderby' => 'id',
- 'hide_empty'=> 0,
- );
- $categories = get_categories($args);
- $size = 'full';
- foreach($categories as $category) {
- $image = get_field('image', $category->term_id);
- var_dump($image);
- echo '
- <li>
- <a href="' . get_category_link($category->term_id) . '"><img src="'.$image['url'].'" alt="' . $category->name . '" /></a>
- <span class="crp_title" style="bottom:4px;">', (
- strlen($title= the_title('', '', false)) > 48 ?
- substr($title, 0, 48) :
- $category->name
- ), '</span>
- </li>';
- }
- echo '</ul>';
- echo '<div class="crp_clear"></div></div>';
- ?>
- <?php wp_reset_postdata(); ?>
- </div> <!-- end link-content -->
- </div>
- </div>
- <div class="row">
- <div class="<?php echo sanitize_html_class( $grid );?>12">
- <div class="comments-container">
- <?php comments_template( '', true ); ?>
- </div>
- </div>
- </div>
- </div> <!-- end link-container -->
- </div>
- </div>
- </div>