Home › Forums › Pro Support › Caching issues? Categories not styled as assigned
- This topic has 10 replies, 2 voices, and was last updated 4 years, 9 months ago by
Tom.
-
AuthorPosts
-
November 27, 2018 at 3:05 am #6680
Jason
ParticipantHi, 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.
November 27, 2018 at 3:15 am #6681Jason
Participantok, 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.November 27, 2018 at 5:32 pm #6689Tom
KeymasterHi 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 🙂
November 27, 2018 at 10:02 pm #6699Jason
Participantok, 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.
November 28, 2018 at 6:34 pm #6721Tom
KeymasterYes, you could try to replace that
get_template_part()
withwpsp_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
November 29, 2018 at 3:26 am #6728Jason
ParticipantThanks 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.
November 29, 2018 at 3:57 am #6729Jason
ParticipantI’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.
November 29, 2018 at 6:23 pm #6737Jason
ParticipantTom, 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!November 29, 2018 at 6:55 pm #6740Tom
KeymasterWhat happens if you disable columns within the GeneratePress blog settings? Customize > Layout > Blog.
Let me know 🙂
November 29, 2018 at 8:23 pm #6742Jason
ParticipantThat did the trick! Thanks again for all your help!
November 30, 2018 at 7:16 pm #6748Tom
KeymasterYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.