Profile photo of Victor QuesadaVictor Quesada
asked 11 months ago

dw focus – page for Display tags List in Alphabetical Order

1 Answers
Dominic
answered 11 months ago

You can create a php file in your theme folder (ex: template-tagcloud.php) then add the following code to your new file:

<?php

/**

 * Template Name: Tag cloud page

 *

 * @package DW Focus

 * @since DW Focus 1.3.1

 */

get_header(); ?>

<div class="container">

 <div class="content-inner">

 <div class="row">

 <div class="<?php dw_focus_primary_column_class(); ?>">

 <div id="primary" class="content-area">

 <main id="main" class="site-main" role="main">

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

 <header class="page-header">

 <?php the_title( '<h1 class="page-title">', '</h1>' ); ?>

 </header>

 <div class="page-content">

 <?php the_content(); ?>

 <?php wp_tag_cloud('number=0&order=ASC'); ?>

 <?php

 wp_link_pages( array(

 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'dw-focus' ) . '</span>',

 'after' => '</div>',

 'link_before' => '<span>',

 'link_after' => '</span>',

 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'dw-focus' ) . ' </span>%',

 'separator' => '<span class="screen-reader-text">, </span>',

 ) );

 ?>

 </div>

 <?php

 if ( comments_open() || get_comments_number() ) :

 comments_template();

 endif;

 ?>

 <?php endwhile; ?>

 </main>

 </div>

 </div>

 <div class="<?php dw_focus_secondary_column_class(); ?>">

 <?php get_sidebar(); ?>

 </div>

 </div>

 </div>

</div>

<?php get_footer(); ?>

Finally, you can log in to Dashboard > Pages > Add new, and select the Tag cloud page in the Page Attributes section on the right hand side.
Hope this helps!

Profile photo of Victor QuesadaVictor Quesada
replied 11 months ago

thanks

Powered by DW Question & Answer Pro

Access years of experience in WordPress; Collaborate with professionals trusted by tens of thousands of people across the world.

Sign Up Today