Detail Page (blog or career detail page)

⌘K
  1. Home
  2. Detail Page (blog or care...
  3. Detail page Scripts

Detail page Scripts

<?php
            while ( have_posts() ) : the_post();
            ?>

              <!-- post category -->
              <?php
                $categories = get_the_category();
                $category_id = $categories[0]->cat_name;
              ?>
              <span class="post-single-category">
                  <?php echo $category_id;?>
              </span>

              <h2 class="post-single-title"><?php echo the_title(); ?></h2>
              <span class="post-single-created-date">
                <?php the_time('D d F  Y'); ?>, <?php get_field('insight_author'); ?>
              </span>

              <div class="post-single-tags">
                <?php 
                    // $tags = get_tags(array(
                    //   'hide_empty' => false
                    // ));
                    // echo '<ul>';
                    // foreach ($tags as $tag) {
                    //   echo '<li>' . $tag->name . '</li>';
                    // }
                    // echo '</ul>';
                ?>
                <?php 
                  echo get_the_tag_list('<p>',' ','</p>');
                ?>

              </div>

              <!-- post image -->
              <div class="post-single-img imgLiquidFill">
                <?php the_post_thumbnail(); ?>
              </div>

              <div class="post-single-content">
                <?php the_content(); ?>
              </div>

              <!-- Track post count -->
              <?php wpb_set_post_views(get_the_ID());?>
                
            <?php
            endwhile; // End of the loop.
            ?> 

description:

Display the detail post for each insight’s or career’s page. It will display content automatically based on post id.

How can we help?