The preview of this search result page template looks exactly how I want it to in the Elementor builder, however when applied and published things look very crazy on the live side.(everything is skewed) Almost like there is a default setting applied to the search result page that is interfering with the Elementor template.
I have been searching for a result and have tried making edits to the functions file, search files, and nothing is helping. When the search result page template is changed to Draft – there is default styling on the search result page however for the life of me can not find where that default information is living.
Any help would be greatly appreciated! The site is built with the Genesis theme
]]>So I’ve made some custom archive pages by copying the theme’s page.php and adding this code:
<p>Categories:</p>
<ul class=”bycategories”>
<?php wp_list_categories(‘title_li=’); ?>
<div class=”clear”></div>
What I want to do is customize these two archive pages so that one of them (video archive) shows thumbnails of a video to represent each sub category, and once the sub category is selected, I’d like that to show thumbnails of each of the videos in that sub category instead of a list with the stretched image like on home page.
My other archive (writing archive) should just be a simple list of the relevant posts.
I know this might be a complicated change to make, but any pointers in the right directions would be welcomed.
Cheers
R
]]>However there is an issue surfacing.
When clicking in the front-end on one of the categories (category name) it is showing the result using the default archive.php template instead of my custom archive-recept.php.
Can you tell me why this is and what I can doe about it?
Thanks in advance.
]]>Both Template Files are found and used. The “taxonomy-job_listing_category.php” works completely fine, also the pagination function. The pagination doesn’t work with my “archive-job_listing.php”. If I want to go the next page I get a “404 not found” error.
I read and tried a lot of modifications until now, but without success. Hopefully somebody here have an idea.
Thanks
Chris
//add multi custom post type to tags and categories
function add_custom_types_to_tax( $query ) {
// Return right away if in admin or not working on the main frontend query
if ( is_admin() || ! $query->is_main_query() ) {
return;
}
// Check if we're on a category or tag archive. If so, add our post type
if( ( $query->is_category() || $query->is_tag() ) ) {
// Get all your post types
$post_types = array('post' , 'product' , 'news');
$query->set( 'post_type', $post_types );
}
}
add_action( 'pre_get_posts', 'add_custom_types_to_tax' );
My archive page code is:
<?php
if ( have_posts() ) :
the_archive_title( '', false );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
while ( have_posts() ) : the_post(); ?>
<h3><?php the_title(); ?> </h3>
<?php endwhile;
the_posts_pagination( array(
'prev_text' => __( '<<', 'twentysixteen' ),
'next_text' => __( '>>', 'twentysixteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( '', 'twentysixteen' ) . ' </span>',
) );
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
]]>– parent category title – (by category id)
child category name
> product > product > product > product > product > product
child category name
> product > product > product > product > product > product
child category name
> product > product > product > product > product > product
what i have now kinda works
<?php
$parentid = get_queried_object_id();
$args = array( 'parent' => $parentid );
$terms = get_terms( 'product_cat', $args );?>
<div class="product-cats-arch">
<?php woocommerce_breadcrumb(); ?>
<?php if ( $terms ) { ?>
<?php foreach ( $terms as $term ) { ?>
<section class="section-cat">
<h2>
<?php echo $term->name; ?>
</h2>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<?php wc_get_template_part( 'content', 'product' ); ?>
<?php endwhile; ?>
</ul>
</section>
<?php } ?>
<?php } ?>
but it shows all the products under each subcategory
i cant figure it out
any help please ?
https://www.ads-software.com/plugins/woocommerce/
]]>I would like to pass a user name as a parameter to my shop URL (example: myshop.com/shop/?creator=user1) and then display the products created by user1 only.
I suspect I could use add_action( "woocommerce_product_query", "functionToDoTheJob" )
, but I’m stuck on how to modify the query.
Any help appreciated! Thank you in advance!
https://www.ads-software.com/plugins/woocommerce/
]]>Thank you for your help
]]>I created a child theme from twenty fifteen standard theme.
Added the following php files by duplicating archive and page file, renaming and editing content:
page-shop.php
content-shop.php
archive-termine.php
content-termine.php
I put those file into my child theme folder.
Then I created a CPT called termine and assigned archives to true.
Then I created a page called Shop and assigned the shop page template to it.
Problem:
When trying to access pages , sometimes I get redirecte to the termine archive.
When trying to visit the shop page sometimes I get redirected to the robots.txt (lol?) or to the termine archive.
This issue occurs mostly when using firefox. But it also happens in Chrome, however I have no idea what triggers the output in the end. Because sometimes it happens and sometimes it doesnt.
I already tried deactivating plugins, flush permalinks, rebuild permalinks with various different options etc.
I think it is related to the templates.
Please help I am already trying to work this out for several days to no avail..
Thank you very much!
Saskia
]]>