HI @gdalex
Yes, i know that coding is a must for what i want, i have already created a category.php file and edit. (i am a little rusty have not coded in 10 years)
A about the subcategories i have been able to list all categories but some how i am unable to get the string for all child categories id correctly so that i can set it in the shortcode i use to display the categories
rezept category
always cooking
immer beim kochen
sempre a cozinhar
Phillip Moringer
PS : this is the code i have ate the moment
<div class="wprm-spacer"></div>
<?php
/**
* A Simple Category Template
*/
get_header(); ?>
<div class="wprm-spacer">
</div>
<br>
<p>
<?php
$categories = get_the_category();
$category_id = $categories[0]->cat_ID;
$childid = array('child_of'=> 244);
$childid_cat = get_categories( $childid );
foreach($childid_cat as $category) {
//echo '<p> is child id ' $category->term_id'</p>';
echo 'abc' ;
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
wp_list_categories( array(
'orderby' => 'id',
'show_count' => true,
'use_desc_for_title' => false,
'child_of' => $category_id
) ); ?>
<?php echo do_shortcode('[pci-cat-slider size="thumbnail" show_desc="false" dots="true" arrows="false" autoplay="true" term_id= $childid]'); ?>
<?php Go\page_title(); ?>
</p>
<div class="wprm-spacer"></div>
<section id="primary" class="site-content">
<div id="content" role="main" style>
<?php
// Check if there are any posts to display
if ( have_posts() ) : ?>
<?php
// Display optional category description
if ( category_description() ) : ?>
<div class="wprm-spacer"> </div>
<h3 style="text-align: center;">
Category discription:
</h3>
<div class="archive-meta"style="padding: 5px 60px;"><?php echo category_description(); ?></div>
<?php endif; ?>
<?php
// The Loop
while ( have_posts() ) : the_post();?>
<div style="padding: 25px 50px;">
<div style="border: 1px solid black; border-radius: 7px;background-color:#f4e8ea;padding:15px ;">
<div class="wprm-recipe-roundup-summary-container">
<div >
<div >
<div class="post__thumbnail1" style="width: 225px; height:225px;padding: 5px!important;">
<?php ;the_post_thumbnail(); ?>
</div>
<?php get_template_part( 'partials/content', 'excerpt' );?>
</div>
</div>
</div>
</div>
</div>
<?php
// Previous/next page navigation.
get_template_part( 'partials/pagination' );?>
<div class="entry">
<p class="postmetadata"><?php
//comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments closed');
?></p>
</div>
<?php endwhile;
else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<?php get_footer(); ?>
</div>
</section>
-
This reply was modified 3 years, 6 months ago by
chefwildboar.