Ron Hendriks
asked 10 years ago

You can set a default view for category pages. Can you change the default list view for tag pages to grid view?

1 Answers
answered 10 years ago

Hi Ron,
To resolve this issue, please follow my instruction here:
1. Open Archive.php file in /wp-content/themes/dw-focus/archive.php
2. Replace the following code from line 29 to line 41 with:

<div class="post-layout">
<a class="layout-list <?php dw_active(apply_filters( 'cat_display_filter', dw_get_option('cat_display')),'list'); ?>" href="#"><i class="icon-th-list"></i></a>
<a class="layout-grid <?php dw_active(apply_filters( 'cat_display_filter', dw_get_option('cat_display')),'grid'); ?>" href="#"><i class="icon-th"></i></a>
$no_results = '';
if( ! have_posts() ) {
$no_results = 'no-results';
<div class="content-inner <?php echo $no_results; echo 'layout-'.apply_filters( 'cat_display_filter', dw_get_option('cat_display'));?>">
Hope this helps!

Powered by DW Question & Answer Pro