Forum Replies Created
-
AuthorPosts
-
Jason
ParticipantYes, I still need some help. Can we start with the tag archive?
I’m trying to use the same format as the category snippet but it doesn’t work.
Here’s what I have:
if ( is_single() ) { $tag = get_queried_object(); $tag = $tags[0]; } else { $tag = get_tag( get_query_var( 'tag' ) ); } $tag_slug = $tag->slug; wpsp_display( 13607, 'tax_term="' . $tag_slug . '"' );
Jason
ParticipantThat did the trick! Thanks again for all your help!
Jason
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!Jason
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.
Jason
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.
Jason
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.
Jason
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. -
AuthorPosts