Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
Mayank Kapahi
tagDiv Member

How to show it in main content in article page

Mayank Kapahi
tagDiv Member

not a right approach to create it manually , i think it is better to modify td_module.php code instead creating redirect for every category page.

if (is_category()) {
$catID = $categories[0]->category_parent;
$subcats = get_categories(‘child_of=’ . $catID);
foreach ($categories as $category) {
if ($category->term_id == get_query_var(‘cat’)) {
$selected_category_obj = $category;
break;
}
}
}

Mayank Kapahi
tagDiv Member

lol ok , i know how to do it using loop.php, but is there any way to do it in category module. For example for category page i am using td_module_2.php

++ i just want to do it for parent category pages and not for sub categories. Any help will be really appreciable as i already wasted my hours and default category templates of newspaper look so weird

SubCat1 Post 1 Post 2

SubCat2 Post 1 Post 2

SubCat3 Post 1 Post 2

loop.php

http://www.screencast.com/users/MayankKapahi/folders/Default/media/d09b737c-946a-4ee3-a528-5ad024d64133

` if(is_category()){
$categories = get_the_category();
$catID = $categories[0]->category_parent;
$subcats = get_categories(‘child_of=’ . $catID);
foreach($subcats as $subcat) {
echo ‘<h3>’ . $subcat->cat_name . ‘</h3>’;
echo ‘<ul>’;
$subcat_posts = get_posts(‘cat=’ . $subcat->cat_ID);
foreach($subcat_posts as $subcat_post) {
$postID = $subcat_post->ID;
echo ‘<li>’;
echo ‘<a href=”‘ . get_permalink($postID) . ‘”>’;
echo get_the_title($postID);
echo ‘</a></li>’;
}
echo ‘</ul>’;
}
}`

Mayank Kapahi
tagDiv Member

when you are planing to release new update?

Mayank Kapahi
tagDiv Member

After exploring a bit I found the code for category page is coming from td_module.php and loop.php

if (have_posts()) {
while ( have_posts() ) : the_post();
echo $td_template_layout->layout_open_element();

if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, ‘Missing module: ‘ . $td_module_class);
}

echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();
endwhile; //end loop

echo $td_template_layout->close_all_tags();

Can you please provide any help in showing category page by order of subcategories seperately. Example

Category page:
Category Name
Subcategory Name 1- Posts of 1
Subcategory Name 2- Posts of 2
Subcategory Name 3- Posts of 3

And can you please tell where is a query for fetching categories and there posts?

http://qc.round.glass/blossom/category/make-them-eat-eat-n-grow/

Mayank Kapahi
tagDiv Member

🙂 seems like i need to do lot of work with newspaper theme

Mayank Kapahi
tagDiv Member

Me too 🙂

Mayank Kapahi
tagDiv Member

Thanks for your reply

Mayank Kapahi
tagDiv Member

But it mixup all post of parent and child right now, i need something link below :

http://www.screencast.com/t/h5hwWDEvE8Ud

Mayank Kapahi
tagDiv Member

it is a newspaper child theme

Mayank Kapahi
tagDiv Member

Question : How to increase size for: td-main-content-wrap td-main-page-wrap td-container-wrap. I want to set it 100%. Do i need to add css or there is settings available?

it is showing width :
.td-boxed-layout .td-container-wrap {
width: 1164px;
/* width: 100%; */
}

Mayank Kapahi
tagDiv Member

Thanks for your reply and support

Mayank Kapahi
tagDiv Member

Thanks for your reply

Viewing 13 posts - 1 through 13 (of 13 total)