• Hey Folks,

    I’m trying to clear the final hurdle here of tweaking a theme called Minimatica.

    It appears that when you make the home-page static (via the Reading Settings) it then causes the Blog to lose its original CSS. It kind of looks like it did before the static switch but it loses the header, a cool flag with the date on it that wraps around the posted thumbnail, some shadows in the thumbnail, as well as some basic formatting. This also is affecting the CSS of the front-page a bit.

    Having been at this for days I am certain that the problem lies somewhere in the loop.php as the index calls it up.

    However, I am quite new at this and have basically been teaching myself WordPress and a little CSS by way of building my father’s site, bartmidwood.com

    As far as I can tell, most folks using Minimatica pretty much opt to put the blog on a subdomain. But I’ve managed to get the blog working and keep it in-house. Just need to solve this final bit.

    Any takers?

    Here’s my index and my loop:

    [please post chunks of code at pastebin.com]
Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter Zuckerman

    (@zuckerman)

    @ Daniel Yes. You must have viewed the page when I was trying out different combinations. But, yes, absolutely.

    @ Chip Thank you so much for your reply. I tried everything you suggested. I removed all my own personal custom php files, ensured I had Blog and Front Page pages, configured the static settings, and went to appearance and changed the home page view to blog.

    This didn’t ultimately achieve what I was looking for. And having blog set on the homepage view doesn’t display the slider which is the reason I’m using this theme.

    If I set the homepage view to gallery and I have the Front Page page with a custom page template (which has the code from the theme’s original home.php code). Then the site looks and behaves as it should… except, once again, for the blog CSS. If I don’t have the template then the page just says “Front Page” on the header and displays no loop.

    The only hacks I’ve made to the code is on the loop-slider.php by replacing

    <?php query_posts( $args ); ?>

    with this:

    <?php
    if ( is_front_page() ) {
    query_posts( array ( ‘category_name’ => ‘featured’, ‘posts_per_page’ => -1 ) );
    }?>

    All this does is forces the pics in the slideshow to only pull from a specific category.

    But if I put this back to normal it doesn’t seem to change the problem at hand.

    You can view the site now at bartmidwood.com and I won’t mess with it until I get another suggestion.

    I’m more than happy to post all of my settings as well as ay php files.. as the theme comes with a quite a few custom phps.

    This didn’t ultimately achieve what I was looking for. And having blog set on the homepage view doesn’t display the slider which is the reason I’m using this theme.

    The Theme doesn’t appear to display the slider on static Pages, so if you want to use a static Page as the site front page, and have the front page display the slider, you’ll have to add some customization.

    I would strongly recommend doing this customization as a custom front-page.php template file.

    If I set the homepage view to gallery and I have the Front Page page with a custom page template (which has the code from the theme’s original home.php code).

    To start: try copying home.php, as front-page.php.

    Modify it by removing the if/else conditional wrappers, and referenes to the Loop. You should be left with this:

    get_header(); ?>
    <div id="slider">
    	<?php get_template_part( 'loop', 'slider' ); ?>
    </div><!-- #slider -->
    <?php get_footer(); ?>

    Then the site looks and behaves as it should… except, once again, for the blog CSS. If I don’t have the template then the page just says “Front Page” on the header and displays no loop.

    The only hacks I’ve made to the code is on the loop-slider.php by replacing

    <?php query_posts( $args ); ?>

    with this:

    <?php
    if ( is_front_page() ) {
    query_posts( array ( ‘category_name’ => ‘featured’, ‘posts_per_page’ => -1 ) );
    }?>

    All this does is forces the pics in the slideshow to only pull from a specific category.

    You actually made a second change, that may or may not be impacting the slider output:

    ‘posts_per_page’ => -1

    Try changing that back to:

    ‘posts_per_page’ => 4

    i.e.

    <?php
    if ( is_front_page() ) {
    query_posts( array ( ‘category_name’ => ‘featured’, ‘posts_per_page’ => 4 ) );
    }?>

    …and see if that helps fix the layout.

    Thread Starter Zuckerman

    (@zuckerman)

    @ Chip. Followed your suggestion to the letter. It is pretty much one of the methods I’d already tried — but I tried it again. Still, no dice.

    It did remove the need for the custom template attributed to the Front Page page.

    Also changing -1 to 4 had no immediate visible effect.

    EDIT: This is how the blog should be styled — sans the striped background. Although this is actually a categories pages. https://www.janjaapvanassen.com/?cat=4

    @ Daniel Hey, Daniel. Minimatica is your theme, yes? Have you been able to get this to work on your end?

    Thread Starter Zuckerman

    (@zuckerman)

    Daniel,

    Would you be willing to test this out on your end? It should be very simple with a fresh install of your theme to:

    1) Make a Welcome Page (or Front Page) and a Blog Page

    2) Go to reading Settings and make the site static

    Then, perhaps, you could see quite clearly what is amiss.

    I have read many posts of others wanting to do what I want to do with with Minimatica. However, every site I’ve seen utilizing Minimatica is hosting their blog on a subdomain. Obviosuly, there’s a common problem that no one yet seems to have figured out.

    What you’re saying should work without problems and without modifying the original theme. All you have to do is make the setting properly in Settings > Reading.

    Thread Starter Zuckerman

    (@zuckerman)

    So you keep saying. But it doesn’t. I’ve just created a completely fresh install of WordPress and installed and activated Minimatica.

    I created a Blog Page and a Front Page. I then went to reading settings, ticked “a static page”, made “Front Page” the front page and “Blog” where the posts go. I also created one post in Posts with a featured image attached to it.

    Under Theme Options I chose Gallery for Home Page View.

    I did nothing else. This is what it looks like it without any modifications.

    Front Page:
    https://baldissimo.com/

    Blog Page
    https://baldissimo.com/?page_id=5

    Now, I also tried Home Page View as Blog. And it caused the Blog Page to display the loop without any of the original CSS.

    So, Daniel, I beg of you, if you have the chance, please, look into the matter.

    Again, No one who uses Minimatica with a static front page has a blog on the same domain. That should tell you something.

    EDIT: to be clear my original install is still at https://bartmidwood.com/

    Thread Starter Zuckerman

    (@zuckerman)

    Part of the mystery here is that PAGES don’t carry the same CSS as POSTS. And since we’ve made the site static and associated posts with a PAGE the blog doesn’t have the original POSTS CSS.

    Thread Starter Zuckerman

    (@zuckerman)

    M last post unless someone comes up with another solution or Daniel responds…

    I have a temporary fix. I’m going to remove the static setting and categorize every blog post under the category BLOG. This will get me the CSS I’m looking for. Although I won’t have a Mysite/Blog but a MySite/Category/Blog. “But them’s the breaks.”

    I really hope you get a chance to look at the theme Daniel. I hope I’m wrong that there’s something amiss in the code that’s preventing a smooth static transition. Again I have not seen a single Minimatica themed site that has a static front page with properly CSSed blog page — unless the blog is hosted on a subdomain. In fact there’s even a couple user made tutorials about Minematica where they expressly say to put the blog on a subdomain.

    If it really is that simple perhaps you could demonstrate. Because i really do love this theme.

    Thank you everyone who contributed and gave this a shot.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Static Front Page makes Blog Lose Original CSS’ is closed to new replies.