Skip Navigation

[Resolved] Show default archive content in Toolset View with filtering

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 2 voices.

Last updated by Minesh 11 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2702463

Tell us what you are trying to do?
Show default archive content in Toolset View with filtering. I need this to be automatic template that I can use on any wordpress archive page that just displays its content.

I tried multiple solutions but nothing works.. Is there a php hook I can use or something? I feel like this should be an existing option within the view settings but I cannot seem to find it.

thanks

#2702481

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

When you say "Show default archive content" can you please clarify what exactly the content you are referring to.

Maybe you can share few screenshots and tell me what is your exacted output.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2702858

Hello Minesh,

by default archive content I mean return whatever the default wp_query loop returns.

If I am on a /blog. I need it to return all of the blog posts as it normally would

#2703010

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

With Toolset you can create default archives.

Please check the following link:
- https://toolset.com/course-lesson/creating-a-custom-archive-page/

At top of the page you will see the video and if you forward the video at 7:45 you will see a "Loop Selection" section from where you will set that you want to build the current archive for what loop where there is a section "Standard Archives" where you can use option "Home/Blog".

#2703645

Is it possible to do this within a view?

Unfortunately I cannot use Archives as Im using Elementor for my templating. And I only want the actual loop content that I can plug into my already existing design.

#2703651

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Here is the Doc that shows how you can use the views:
- https://toolset.com/course-lesson/creating-a-custom-search/

For views (block or classic/legacy) you should create your desired view and add that view to your desired page, post or content template.

#2704078

Hello Minesh,

The above link leads to a generic tutorial with how to set up a search page. Unfortunately this does not suit me.

Here are the specifications:

- I am using a view.
- I have a blog that has many taxonomies such as author, format, genre and publisher.
- I have a Elementor archive template built called "taxonomy template".
- I assigned this elementor page template to show up in every taxonomy page outlined above.
- In this template I have a Toolset View that needs to show the content.
- So if a user is on page /genre/crime I need the toolset view to display blog posts with "crime" taxonomy assigned.
- I need this same view to also work on /author/john-doe so I can avoid creating 10+ templates for each taxonomy.

If I was using php this would just be a basic `while ( have_posts() )` to display all of the blog posts that belong to the taxoomy. How can I do this in toolset view?

Thank you

#2704095

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - Can you please share the frontend link of your archive as well as the Elementor taxonomy template link and send me admin access details and let me check what could be the possible workaround for this.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2704974

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing admin access details and its working.

If seems you forgot to share the problem URL.

Can you please share frontend archive link as well as link of your Elementor template and what view you are using.

I have set the next reply to private which means only you and I have access to it.

#2704989

archive pages (it should work for any archive page that the Elementor template is on):
hidden link
hidden link

view settings: hidden link

thanks for the help 🙂

#2704995

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now:
- hidden link
- hidden link

I've added the following view's filter hook to "Custom Code" section offered by Toolset:
- hidden link

add_filter('wpv_filter_query', 'func_adjust_current_tax_archive', 10, 3);
function func_adjust_current_tax_archive($query_args, $setting,$view_id) {
    
    if($view_id == 8920) {
      
   
      $current_term = get_queried_object();
      
      
      $query_args['tax_query'][] = array('taxonomy'=>$current_term->taxonomy,
                                              'field'=>'id',
                                              'terms'=>$current_term->term_id,
                                              'operator'=> 'IN',
                                              'include_children'=>1
                                          ); 
        
       
    }
    return $query_args;
}

Can you please confirm it works as expected now.