Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › only show productos from custom taxonomy category
- This topic has 6 replies, 2 voices, and was last updated 9 years, 9 months ago by
Ernest Marcinko.
-
AuthorPosts
-
September 5, 2016 at 4:17 am #9961
bousso
Participantmy friend I read all documentation , I try and try configurations , but still can´t make it work :
I made a horizontal auto-popupate result on front :
– first problem – can´t limit product results , I put 8 but still show everything it founds.
-second problem – can´t make it to show only results from my “categorias productos – electronica” custom taxonomy.If you can help me please, thank you !!!
September 5, 2016 at 11:38 am #9969Ernest Marcinko
KeymasterYou cannot access this content.
September 5, 2016 at 6:41 pm #9970bousso
Participantmy friend this is perfect, in the front I need at least 8 horizontal carrusels so I guess I have to replicate this code right?
add_filter( ‘asp_query_args’, ‘asp_include_only_term_ids’, 2, 2 );
function asp_include_only_term_ids( $args, $id ) {
/**
* Enter the desired taxonomy=>terms here.
* For example, if you want to search category 1 and 2, then:
* “category” => “1,2”
*/
$include = array(
“categoriageneral” => “166”
);
$search_ids = array(7);if ( !in_array($id, $search_ids) )
return $args;September 6, 2016 at 8:10 am #9972Ernest Marcinko
KeymasterHi,
If you update to the latest version, 4.9.7 (it was released earlier today), then you don’t even need that. On the Advanced Options -> Exclude results panel you can select the category to include posts from: http://i.imgur.com/9tM0Wf8.png
If you even don’t want to include items which have no categories/terms, then on the Frontend-search settings -> Advanced panel turn off the Show posts/CPM with empty taxonomy terms? option: http://i.imgur.com/KDFcVrK.png
September 6, 2016 at 6:44 pm #9986bousso
Participantperrrfectttt , I will check it again when I have time , I will let you know , thank you!!!
September 6, 2016 at 6:49 pm #9987bousso
Participantmy friend , the drag uo and down on mobile still doesn´t work , should I fix the template for now right?
September 8, 2016 at 11:03 am #10013Ernest Marcinko
KeymasterHi,
my friend , the drag uo and down on mobile still doesn´t work , should I fix the template for now right?
What do you mean by that? Can you please explain? Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.