We're merging with GenerateBlocks! Learn more here.

[Resolved] Caching issues? Categories not styled as assigned

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Caching issues? Categories not styled as assigned

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #6680
    Jason
    Participant

    Hi, I just got SP Pro and I’m using the “Blogg” skin. I assigned all categories (links on main menu) to the premade Post List “Blogg1”.
    There are no caching plugins as this is a staging site. The only page that shows the list as it should is https://keepmake.com/stage1/blogg-1/
    Other category pages such as https://keepmake.com/stage1/category/food-drink/ show some of my previous attempts at configuring a style, but otherwise no styles applied from “Blogg1” list on any other category (most menu items). Simple CSS for for the CSS edits and all previous GP affected items are commented out, leaving just 11 active lines of custom CSS. No custom functions have been added.

    I’ve tried using an incognito window, shift-ctrl-R, but no changes, so I’m stumped as to what might be wrong. Thanks in advance for the assistance.

    #6681
    Jason
    Participant

    ok, after looking at Customize>Layout>Blog – I think this is the clue. These categories only inherit this customization and are not being overridden by WP Show Posts “Blogg1” list.
    How do I change that behavior? Sorry if this is a total newbie question.

    #6689
    Tom
    Keymaster

    Hi there,

    WP Show Posts isn’t a replacement for your standard WordPress archives. It’s just a way to display formatted posts throughout your website.

    The default WordPress loop/archives are better suited for paginated archives like your categories etc..

    WPSP is best for display small lists of posts on static pages, as one example.

    Let me know if you need more info 🙂

    #6699
    Jason
    Participant

    ok, bear with my ignorance for a moment, but I think I have an idea on how to implement this but I’m fuzzy on the details. I also own Cobalt Apps Extender Pro which I’m using on this site. It can create archive templates and then set those to conditionals. After looking at the archive code for GP, I see this:

    /*
    * Include the Post-Format-specific template for the content.
    * If you want to override this in a child theme, then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( ‘content’, get_post_format() );

    So, could a WPSP list supply all the necessary code to be a content-__.php with the PHP line supplied?
    Would I have to add another action to remove the default archive loop?
    Or I could hook in the WPSP php code based on a conditional, but I think I’d still need to remove the standard archive loop to give a certain category the look I want.

    I realize this is leveraging the use of another product – not sure how GP Elements could work here possibly – but I’m hoping to get enough pieces in place to get this to work.

    PS- I thought I might have been able to avoid BeaverThemer as I own BB but I prefer the GP+Extender type combo. I see from other posts that this is a sought after feature. If I find the solution, I’ll do a write up. Meanwhile, I’m just hoping my hunch will work. Thanks again for your help.

    #6721
    Tom
    Keymaster

    Yes, you could try to replace that get_template_part() with wpsp_display().

    If you’re doing categories, you can even grab the category automatically with something like this: https://wpshowposts.com/support/topic/automatic-filter-on-current-posts-category/#post-3806

    #6728
    Jason
    Participant

    Thanks Tom, I think I’m almost there. I copied the archive.php into my child theme and replaced get_template_part() with the code from the other post but replaced my WPSP post id of course.
    Here’s my code snippet in archive.php:

    `/* while ( have_posts() ) : the_post(); */

    /*
    * Include the Post-Format-specific template for the content.
    * If you want to override this in a child theme, then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    if ( is_single() ) {
    $cats = get_the_category();
    $cat = $cats[0];
    } else {
    $cat = get_category( get_query_var( ‘cat’ ) );
    }
    $cat_slug = $cat->slug;
    wpsp_display( 13607, ‘tax_term=”‘ . $cat_slug . ‘”‘ );

    /*endwhile;*/`

    Here is a page with the results: https://keepmake.com/stage1/category/food-drink/

    I have a few questions about the result:
    Why is the footer hanging right below and behind the header? Do you know how to correct that?

    Other than that, I’m pretty pleased that this works and for all your help and patience with this.
    If you have any ideas on how to make this more modular – meaning perhaps different WPSP layouts for different categories or maybe some integration into the GP Elements section that would be an added bonus.

    I could see this becoming a future feature of WPSP perhaps. The idea of duplicating all those layouts for separate pages for 20 some categories (and no duplicate/clone feature) was something I wanted to avoid.

    #6729
    Jason
    Participant

    I’m guessing the footer issue might be because the if/else/endif might need to be commented out or removed. So I still need a bit of help.

    #6737
    Jason
    Participant

    Tom, I’ve narrowed down the issue which is placing the footer just below the header, but I still don’t know how to correct it.

    Here’s the element(s):
    <div class="generate-columns-container masonry-container masonry" style="position: relative; height: 129.6px;"><div class="grid-sizer grid-50 tablet-grid-50 mobile-grid-100 masonry-brick"></div> <header class="page-header masonry-brick">

    Checking that 129.6px height inline style in the inspector then puts the footer in the correct position. I’m not sure what’s generating that or how best to fix it.
    Any help is much appreciated, thanks!

    #6740
    Tom
    Keymaster

    What happens if you disable columns within the GeneratePress blog settings? Customize > Layout > Blog.

    Let me know 🙂

    #6742
    Jason
    Participant

    That did the trick! Thanks again for all your help!

    #6748
    Tom
    Keymaster

    You’re welcome 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.