Skip Navigation

[Resolved] Build a archive with content and sidebar with filters

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 16 replies, has 2 voices.

Last updated by Luo Yang 5 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1303187

Hi Toolset support,

I'm trying to create a page like this: hidden link

Can you help me?

Thanks,
Menno

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/use-views-api-to-render-only-filters-or-only-results/

#1303255
ajax-search1.JPG

Hello,

I just got this thread, and I have checked the chat history, I assume this thread is talking about the problem:
Figure out why AJAX updates aren't working.

And we are talking about this URL:
hidden link

I have tried above URL with my Chrome browser, if I enable option "Information Technology", I can see only one result, see screenshot ajax-search1.JPG

Please elaborate the question with more details:
How and where I can see the problem: AJAX updates aren't working

Thanks

#1303337

Hi Luo,

Thanks for your response, can you refresh the page? You should know see the results and filter separated.

- Menno

#1303345

I can see the problem now.

Please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website(you can put the duplicator package into your own google drive disk, and share the link), I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1303365

Hi Luo,

I use the latest plugins. I have a archive-companies.php with these shortcodes:

<div class="container space-2">
      <div class="row">
        <!-- Jobs -->
        <div class="col-lg-9">
	        <div id="searchresults">
			<!-- Start the Loop. -->
			<?php echo do_shortcode('[wpv-view name="company-search" view_display="layout"]'); ?>
	        </div>
        </div>
        <!-- Filters -->
        <div class="col-lg-3">
	       <?php echo do_shortcode('[wpv-form-view name="company-search" target_id="self"]'); ?>
        </div>
        <!-- End Filters -->
      </div>
    </div>

I can send you ftp credentials to test some things if you want?

Thanks,
Menno

#1303371

OK, please provide your website credentials and FTP access in below private message box, also point out where I can edit your custom PHP codes, thanks

#1303399

Just added a private message.

#1303417

Thanks for the details, here are what I found in your website:
1) The problem URL is archive page of post type "Companies", but the view "Company Search" is a normal post view, normal post view won't work as expected, in this case, the AJAX search does not work.

2) And your theme files are hard-coded, since you are using custom PHP codes to customize the "Companies" archive page, Views WordPress Archive won't work directly.

So it needs some custom codes, and I have setup a demo in your website, here are detail steps:
1) I have copy your theme file archive-companies.php to archive-companies.php-bak, you can reverse it back anytime if you want.

2) Create a new theme file archive-companies.php, with below codes:

<?php
/**
 * The template for displaying archive pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

get_header();
?>

    <!-- Jobs Section -->
			<?php
			// Start the Loop.
			while ( have_posts() ) :
				the_post();

				// End the loop.
			endwhile;
			?>
    <!-- End Jobs Section -->

<?php
get_footer();

So Views WordPress archive will be able to work in that page.

3) Create a WordPress archive here:
hidden link
use the same filters, and output same post title shortcode.

Notice, in section "Output Editor", you can customize the search form and search result, for example:

<div class="container space-2">
      <div class="row">
        <!-- Jobs -->
        <div class="col-lg-9">
            <div id="searchresults">
            <!-- Start the Loop. -->
           [wpv-filter-meta-html]
            </div>
        </div>
        <!-- Filters -->
        <div class="col-lg-3">
           [wpv-layout-meta-html]
        </div>
        <!-- End Filters -->
      </div>
    </div>

I have tested it in your website, it works fine:
hidden link

More help:
https://toolset.com/documentation/getting-started-with-toolset/customize-post-archives/designing-an-archive-without-any-page-builder/

#1303429

Hi Luo,

This is fantastic!! Exactly what i'm looking for. We tested something like this but we could not get the filters next to the results.

Thanks!!
Menno

#1303471

PS. i think there is a problem :). Why is it possible to add just one post relationship filter?

#1303473

You are welcome, please let me know if you need more assistance for it, feel free to create new ticket for other new questions.

#1303479

I would like to have multiple filters with post relationships just like the review sample, how can i add more? Like here hidden link (build with Search & Filter Pro)

#1303483

Unfortunately, there isn't such a built-in feature within Toolset Views plugin, as you can see, you can add only one relationship filter to one view.

And we have a plan to add two or more relationship filter to Views, but I am not sure when will it be released. You can also add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#1303505

Ahw bummer! We were almost there but it doesn't work for me now when i can only add just one post relationship filter. It would be far more powerful if there isn't a limit on this. Why just one in the first place?

#1303507

Yes, it is a limitation of Views plugin, as I mentioned above: we have a plan to add two or more relationship filter to Views.

Currently, you might consider other workaround, for example, use custom field/taxonomy filters instead of relationship filter.