• Resolved MrSlartibartfast

    (@mrslartibartfast)


    Hi there,

    First thanks for the great theme, I really like the design. I’m just starting to play around with it and testing it at the moment in a local dev environment.

    So what I was wondering is, how to edit the front page template. I would like to use the structure that the theme uses so its easier to maintain and only adapt the parts I want to change and add those changed ones to my child theme.

    I’ve added the meta-slider plugin and created my own slider, no problem there.

    For example under the slider I would want to add a part with displaying a few posts of a category.. and so on. I’ve looked around a bit in the theme and I’m not completely understanding the structure yet.
    Can you give me some pointers? (I’d prefer to do it by hand instead of using the page builder..)

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter MrSlartibartfast

    (@mrslartibartfast)

    Ok, so as it happens – once I posted the question it took only a little more time so I figured it out.

    To edit the front-page template “page builder home”, the home-panels.php file needs to be manipulated.

    Just in case someone else is having the same question:
    I made a copy of home-panels.php to my child-theme folder, renamed the file and edited the template name inside the file.
    Then under the page select to display at home chose the new template name.

    ..a follow up question has come up though:
    I’m creating a new loop to display a some posts from a category and now the content is not anymore full width. (I get some extra space on the right side – like a right sidebar)
    I’m using the themes page template parts for the display.

    <?php
    $loop2 = new WP_Query( array('category_name' => 'front-page'	)); 
    
    while ($loop2->have_posts()) : $loop2->the_post(); 
    
        get_template_part( 'content', 'page' ); 
    
    endwhile; // end of the loop. ?>

    Cheers

    Theme Author Andrew Misplon

    (@misplon)

    Hi @mrslartibartfast

    Thanks for your support, it’s most appreciated.

    I’m really glad to see you’ve been making progress. Thanks for keeping this thread updated. To quickly take a step back to your original question, you could have also used SiteOrigin Page Builder for your home page and have inserted a Post Loop (PB) widget. Once you’ve inserted the Post Loop widget into Page Builder you can select the Blog template and then click the Build Posts Query button, next, search for the category you want to display using the Taxonomies field. Just start typing the name of the category you want to display and the field will suggest choices.

    We’ll need to add a little supporting CSS to make the new page template full-width. If you can please, provide the full file name you’ve used, I can assist further.

    Thread Starter MrSlartibartfast

    (@mrslartibartfast)

    Hi @andrew Misplon,

    Thanks for your really quick response & explanation for the page builder.

    Maybe I’ll really resort to the Page Builder Plugin. I’ve already installed it, but in general I prefer to edit the files myself, which helps me understand everything a bit better.

    As new frontpage template I’m using now a file called:
    home-frontpage.php

    After your comment about supporting css I had a look and added this rule to the child themes style.css:

    .page-template-home-frontpage #primary {
      border: none;
      float: none;
      padding: 0;
      width: 100%;
    }

    This works well, or do I need to add any more css rules?

    Thanks a lot for your help.
    //offtopic: I’m really impressed with the good structure of the style.css! Nice to see it well organized.

    Theme Author Andrew Misplon

    (@misplon)

    For sure, I completely understand.

    Yes, that’s perfect, we just need to let theme know that this is a full-width page so the #primary container must be 100% width without a border. Nicely done ??

    Thanks for positive feedback regarding style.css structure. Should any further questions arise, please, don’t hesitate to reach out.

    Thread Starter MrSlartibartfast

    (@mrslartibartfast)

    Great, thanks again for your quick answers.
    Have a nice day

    Theme Author Andrew Misplon

    (@misplon)

    You too ?? Cheers for now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Front Page template edit’ is closed to new replies.