Skip Navigation

[Resolved] Help with setting up a structure.

This support ticket is created 3 years, 10 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/Karachi (GMT+05:00)

Author
Posts
#1894877

i have a classified site up and running it works just fine I use classipress and toolset, I successfully remade my login, registration,edit profile, and profile page using toolset.
using classipress theme I have categories set up along with sub-categories, the theme has a section where I can add custom fields to the form to create a listing that are assigned to the category of choice. nowhere is the question... I want to be able to once on a listings category page to be able to filter the adverts for that category.
a) is it possible to create filters in toolset using the custom fields set in the themes advert custom fields and be functional on each catergory by inserting the toolset filters?
or
b) should i recreate the themes create a listing form with toolset from scratch and work from there?
c) can I insert types of custom fields into the listings form somehow?

if I can get a private reply I can supply the front and backend pages to show the processes as-is .

thank you very much
martin

#1894937

sorry, I couldn't edit the original.....

i have a classified site up and running it works just fine I use classipress and toolset, I successfully remade my login, registration,edit profile, and profile page using toolset.
using classipress theme I have categories set up along with sub-categories, the theme has a section where I can create and add custom fields,then create a form to include my choice of custom fields and choose which categories that form is used for to create a listing that are assigned to the category of choice. nowhere is the question... I want to be able to once on a listings category page to be able to filter the adverts for that category.
a) is it possible to create filters in toolset using the custom fields set in the themes advert custom fields and be functional on each catergory by inserting the toolset filters?
or
b) should i recreate the themes create a listing form with toolset from scratch and work from there?
c) can I insert types of custom fields into the listings form somehow?

if I can get a private reply I can supply the front and backend pages to show the processes as-is .

thank you very much
martin

#1895869

Hi Martin,

Thank you for contacting us and I'd be happy to assist.

To suggest the best way forward, I'll need to see how the theme adds and manages its custom fields and taxonomies.

Can you please share temporary admin login details along with the information of the custom fields and taxonomies which you'd like to use with Toolset filters?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1900797

Thank you for sharing these details and sorry about the delay in getting back on this.

I'll be performing some testing research on my test website accordingly and will share my findings with you today.

Thank you for your patience.

#1901059

thankyou waqar!

i think this is responsible for grabbing the fields and displaying them
themes/classipress/includes/theme-widgets/class-widget-listing-custom-fields.php

thankyou

#1901373

Thank you for waiting.

My test shows that the custom fields and categories for the Ads post by the theme can be made to work with the filters in the Toolset Views.

If you'll check the page "View: Test view from TS support" that is using the view "Test view from TS support", you'll that I've used "Ad Categories" taxonomy and the "Country" custom field as an example.

Please especially note how the following shortcodes have been used:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/ )

- wpv-control-postmeta
- wpv-control-post-taxonomy
- wpv-post-field
- wpv-post-taxonomy

This means that you can keep managing these Ads posts and their categories and custom fields through the theme, but still use Toolset views to show a list with customized search filters.

Important note: This may work for all custom fields which theme stores as simple text. If other fields like checkboxes, radios, etc are stored in a different and more complex format, then those may not work with the search filters in the view.

#1901387

thankyou waqar ,really appreciate it,iwill take a look later tonight, i will be using checkboxes and radios for almost every field.
once I have a view set up , how would I get it showing in my theme? direct PHP file editing(through childtheme) or via a temple in toolset ie single ad template?

thanks again
martin

#1901849

sorry, I can't edit my previous comment.

I have put some test adverts here

hidden link

I do not need the view to display any adverts just a filter to filter the 4 test adverts for that category. (I guess somehow it would need to check the category we were viewing ?)

Ie

select country and it would only show the adverts for the ads for that country for that category.
if I remember correctly the " AD categories " are taxonomy the file responsible this page is here
I have added the view manually here via PHP do shortcode on line 35. wp-content/themes/classipress-child/parts/header-taxonomy.php

I hope I have explained it properly.
as previously stated the fields created are added to the form and category chosen in the theme's backend.

please leave the page and view in place as is asi can use this exactly as it is for another project for the site (a BIG thankyou for that!!), feel free to make a new page and view
thanky ever so much for your help.

#1902339

You can call the view's search form and search results using these shortcodes:

Show the search form and results:
[wpv-view name="view-slug"]

Show only the search form and make it show results on page with ID 2:
[wpv-form-view name="view-slug" target_id="2"]

Show only the search results:
[wpv-view name="view-slug" view_display="layout"]

Likewise, you can use these shortcodes in the PHP code using the "do_shortcode" function:
https://developer.wordpress.org/reference/functions/do_shortcode/


echo do_shortcode( '[wpv-view name="view-slug"]' );

echo do_shortcode( '[wpv-form-view name="view-slug" target_id="2"]' );

echo do_shortcode( '[wpv-view name="view-slug" view_display="layout"]' );

If you'd like the Ad category archive pages ( hidden link ) to be controlled by Toolset and not the theme, you can create a WordPress Archive for it from WP Admin -> Toolset -> WordPress Archives.

If you'd like to keep managing pages through the theme's template files, then you'll need to consult the theme's official support and documentation, to understand how to customize them.

#1902905

sorry im more confused than at the start! i guess the simplest way to ask is:

the theme does everything I need except filter the custom fields of a category, can toolset filter these categories using a view or template , or do I need to use toolset to build the fields ,categories,filters,views etc ??

thanks

#1903339

well, this is embarrassing... it would seem that the theme has on it the ability in the forms to add the custom fields to the filters....
see here hidden link

so it would seem to be the only problem i now have is my address field for each advert is set in the profile of the user . could I make a map with filter for the user address set with toolset?
ie
show a map that shows the address of the adverts in that category with pins for each adverts address , a pin for the actual user viewing the page with a filter for distance? it sounds so easy!! not

thankyou waqar

#1903999

Thanks for the update and glad that the theme offered built-in custom field filters, as well.

On its own (independently), you can show a distance-based search and a map with map markers, using Toolset post view on a new page. However, I can't think of a way to incorporate that inside the template and the search mechanism controlled by the theme.

A workaround can be that you can add a distance-based search on a new page with Toolset post view and include a link to that page, to let the visitors know that they can also perform a search for listing near their location.

#1926619

thanks waqar , here is where im up to with this , but now im a little lost

when a customer subscribes they enter there profile settings , i have a toolset user form in use as part of this
user fields are here hidden link
1 of these fields is sales address.
now when they list an advert , toolset lists the address for that user in the single advert (all set up working fine) example hidden link

so now if im in a category ie: hidden link i have 5 adverts from 2 users , each advert displays the user that listed the advert, i have my toolset map on the right .

how can i add the markers for those 2 users in the example ? i do not need toolset to do anything other than the map and the markers for the users on that page ? i tried a few ways to no avail.

also i have many categories, would i need a toolset view and map for each category ?

the view im trying to use to display these markers is here
hidden link
thankyou waqar

#1926999

please ignore previous reply