PHP Classes

File: elements/tags_container.php

Recommend this page to a friend!
  Classes of Victor Andeloci   Project P Wordpress Podcast Theme   elements/tags_container.php   Download  
File: elements/tags_container.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Project P Wordpress Podcast Theme
Publish pages for a podcast in a WordPress site
Author: By
Last change: playlist page
Date: 9 months ago
Size: 643 bytes
 

Contents

Class file image Download
<div class="tags-container">
  <?php
    $i
= 0;
   
$tags = get_the_tags(get_the_id());
    if (
$tags) :
      foreach (
$tags as $tag) :
        if (
$i <= 4 || (is_single() && !empty($args['show_least']) && $args['show_least'] == false)) :
 
?>
<a
            href="<?= get_home_url() ?>/tag/<?= str_replace(' ', '-', iconv('UTF-8', 'ASCII//TRANSLIT', $tag->name)) ?>"
            tag="<?= str_replace(' ', '-', iconv('UTF-8', 'ASCII//TRANSLIT', $tag->name)) ?>"
            class="tag"
          >
            #<?= $tag->name ?>
</a>
  <?php
          $i
++;
        endif;
      endforeach;
    endif;
 
?>
</div>