-
AuthorPosts
-
December 9, 2013 at 5:02 am #197886
Hi there,
When I was clicking onto some Portfolio Tags, I was redirected to a Tag Archival Page, may I know where I can edit the format of this page, as well as the Search page? As I would not want to mess up the file structure of the system, is there an alternative to edit the page (eg. to take out the side bar / insert a custom sidebar)?
Thanks.
Regards,
Robert ChaiDecember 9, 2013 at 5:30 am #197899Hey sgrobert!
The archive tag page is generated using the tag.php file and the search page use the includes > loop-search.php file. If you want a custom sidebar for the tag page. Edit tag.php, find this code:
//get the sidebar $avia_config['currently_viewing'] = 'blog'; get_sidebar()
Replace it with:
//get the sidebar $avia_config['currently_viewing'] = 'archive'; get_sidebar()
Edit sidebar.php, find this code:
// forum pages sidebars if ($avia_config['currently_viewing'] == 'forum' && dynamic_sidebar('Forum') ) : $default_sidebar = false; endif;
Below add this code:
// archive pages sidebars if ($avia_config['currently_viewing'] == 'archive' && dynamic_sidebar('Archive') ) : $default_sidebar = false; endif;
Edit includes > admin > register-widget-area.php, find this code:
foreach ($sidebars_to_show as $sidebar) { register_sidebar(array( 'name' => 'Sidebar Pages', 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); }
Below, add this Archive widget area:
foreach ($sidebars_to_show as $sidebar) { register_sidebar(array( 'name' => 'Archive', 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); }
You now add widgets on Archive widget area. Remove every widgets on Displayed Everywhere widget area. You can do the same on search.php file if you want a custom sidebar on search results page.
Cheers!
Ismael -
AuthorPosts
- The topic ‘Where to edit Tag Archival Page?’ is closed to new replies.