Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Category Query

Home / Forums / Ascend Theme / Category Query

This topic is: Resolved
[Resolved]
Posted in: Ascend Theme

Tagged: 

November 27, 2018 at 7:43 am

Hi,

i am trying to make a category template for a specific category that loops another category. Sounds crazy, i try to explain:

1. I made a category-category1.php file (in the child theme) based on the archive.php (from parent theme) and try to insert a query like this:

` <?php $args = array(‘category_name’ => ‘category2’); ?>
<?php $qry = new WP_Query($args); ?>

while ($qry->have_posts()) : qry->the_post();
`

I think i’m not passing the query in the loop like it should and so i get a white page. Can you help?

2. Reading the forums, i understand that it is not a great idea to use custom templates.
– is it possible to get the same results through functions.php?
or
– is it possible to strip the custom template down to a minimum to ensure more compatibility with future updates?

Thank you

  • The forum ‘Ascend Theme’ is closed to new topics and replies.