[resolved] Set category blog list preview to full page (4 posts)

  1. smj93
    Posted 2 years ago #

    I am not quite sure how to word this but here it goes.

    On my home page which displays blog previews the content is full width: http://stuartjones.me/
    I did this by setting all the pages to full width and without a side bar.

    When I select a category e.g. Cardiff University: http://stuartjones.me/category/cardiff-university-work/ it changes it to about 3/4 of the page. How can I change the category template so it looks like the home page?

    Cheers, Stu

  2. Maria Antonietta Perna
    Posted 2 years ago #

    Hi Stu,

    A quick way you can achieve a full-width layout on category pages is by copying the archive.php file from your parent theme into your child theme and delete the following lines of code:

    <div class="main <?php //echo kadence_main_class(); ?> <?php //echo $postclass;?>" role="main">

    and also delete the closing main tag at the very bottom of the document:

    </div> <!--/.main -->

    I hope this helps.

  3. Kadence Themes
    Theme Author

    Posted 2 years ago #

    Hey, making a child theme like antonietta456 described would work, although you can add a function to your child theme functions file:

    <?php add_filter('kadence_display_sidebar', 'kad_sidebar_on_archive');
    function kad_sidebar_on_archive($sidebar) {
      if (is_category( ) ) {
        return false;
      return $sidebar;
    } ?>

    else premium has options for this in the theme options.

    Kadence Themes

  4. smj93
    Posted 2 years ago #

    Ok thank you guys! It works now :)

    Cheers, Stu

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic