Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #2956357
php code
Closed

Comments

  •  1
    shirleydt started the conversation

    hi there, I use facetwp.  some of the facets didn't show up correctly.  Facetwp support said there is some sort of view counter query that initially interferes with facet.  They suggest I put below code into php file.  

    I do not want to add to the file itself.  Is there a place I can place the code to fix the facet?  


    <?php
    /** only detects queries that are set to facetwp=true explicitly **/ add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
    	if ( true !== $query->get( 'facetwp', false ) ) {
    		return false;
    	}
    	return $is_main_query;
    }, 10, 2 );

    see below for the detailed facet issue:

    I noticed one of the facet didn't show up correctly on below page. Kitchen Tips, the check boxes of "collections" and "cooking tips" do not show up the first time when the page is rendered. Once the user has made a selection on the page, then both show up. Would you please advise why this happened and how to fix it? https://homenaturallymade.com/meal-plan/


    Thanks and Best Regards

    Shirley


  •  2,492
    PenciDesign replied

    Hi,

    You can add this code by installing the Code Snippet plugin, then creating a new snippet and putting all the custom PHP code in it.

    Regards,
    PenciDesign.


  •  1
    shirleydt replied

    Perfect!  Thank you so much.

    Shirley