Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Rozhnov Vyacheslav

Forum Replies Created

Viewing 10 posts - 21 through 30 (of 44 total)
  • Rozhnov Vyacheslav in reply to:
    I found a mistake?
    #26654

    I removed from the template code. Now everything is working properly.

    Rozhnov Vyacheslav in reply to:
    I found a mistake?
    #26653
    add_action( 'pre_get_posts', 'et_custom_posts_per_page' );
    function et_custom_posts_per_page( $query ) {
    	global $shortname;
    	
    	if ( is_admin() ) return $query;
    	
    	if ( $query->is_category ) {
    		$query->set( 'posts_per_page', get_option( $shortname . '_catnum_posts' ) );
    	} elseif ( $query->is_tag ) {
    		$query->set( 'posts_per_page', get_option( $shortname . '_tagnum_posts' ) );
    	} elseif ( $query->is_search ) {
    		if ( isset($_GET['et_searchform_submit']) ) {			
    			$postTypes = array();
    			if ( !isset($_GET['et-inc-posts']) && !isset($_GET['et-inc-pages']) ) $postTypes = array('post');
    			if ( isset($_GET['et-inc-pages']) ) $postTypes = array('page');
    			if ( isset($_GET['et-inc-posts']) ) $postTypes[] = 'post';
    			$query->set( 'post_type', $postTypes );
    			
    			if ( isset( $_GET['et-month-choice'] ) && $_GET['et-month-choice'] != 'no-choice' ) {
    				$et_year = substr($_GET['et-month-choice'],0,4);
    				$et_month = substr($_GET['et-month-choice'], 4, strlen($_GET['et-month-choice'])-4);
    
    				$query->set( 'year', absint($et_year) );
    				$query->set( 'monthnum', absint($et_month) );
    			}
    			
    			if ( isset( $_GET['et-cat'] ) && $_GET['et-cat'] != 0 )
    				$query->set( 'cat', absint($_GET['et-cat']) );
    		}
    		$query->set( 'posts_per_page', get_option( $shortname . '_searchnum_posts' ) );
    	} elseif ( $query->is_archive ) {
    		$query->set( 'posts_per_page', get_option( $shortname . '_archivenum_posts' ) );
    	}
    
    	return $query;
    }
    
    Rozhnov Vyacheslav in reply to:
    Choose which kinds of pages S&F will try to do this on
    #26218

    It because the auto count is not working on your category archive pages? But it begins to work on the Search & filter results page – is that correct?

    Yes.

    In this case, its because this feature (detect defaults) doesn’t yet support this – I will add this functionality in for sure as it would be nice, but because it is new feature there will always be some room for improvement.

    I did not understand. When you add this feature?

    Rozhnov Vyacheslav in reply to:
    Choose which kinds of pages S&F will try to do this on
    #25937

    When can add this functionality?

    Rozhnov Vyacheslav in reply to:
    Choose which kinds of pages S&F will try to do this on
    #25830
    This reply has been marked as private.
    Rozhnov Vyacheslav in reply to:
    Choose which kinds of pages S&F will try to do this on
    #25742

    As hide the empty terms when I open the page?

    Rozhnov Vyacheslav in reply to:
    js a script doesn't work after loading of the filter
    #25520

    Hi Ross. Why does not work the script?

    <script type="text/javascript">
    $(document).on("sf:ajaxstart", ".searchandfilter", function(){console.log("ajax start");});
    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){console.log("ajax complete"); document.write("<h1>hi all!</h1>");});
    $(document).on("sf:init", ".searchandfilter", function(){console.log("S&F JS initialised");});
    </script>

    Page for example, http://www.mega-pools.ru/?sfid=41738&_sft_category=category-1

    Rozhnov Vyacheslav in reply to:
    I don't see the update 2.0
    #25514

    So far, no update available. How else can i get the update?

    Rozhnov Vyacheslav in reply to:
    Limited Support in preparation for Search & Filter 2.0
    #23543
    This reply has been marked as private.
    Rozhnov Vyacheslav in reply to:
    Filter in specific category
    #23496

    up

Viewing 10 posts - 21 through 30 (of 44 total)