Ron Hendriks
asked 7 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
Wilfred
answered 7 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 
http://i.imgur.com/ivrMgNw.png 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>
</div>
</div>
<?php
$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'));?>">

http://i.imgur.com/DyM6OM8.png
Hope this helps!

Powered by DW Question & Answer Pro