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.

Pou Lala

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Pou Lala in reply to:
    Exclude first post
    #276548

    Sorry for the bad writing:

    function sf_filter_query_args( $query_args, $sfid ) {
      
      //if search form ID = 225, the do something with this query
      if($sfid==31940)
      {
      	//modify $query_args here before returning it
            //only show results within categories with these IDs
      	$query_args['offset'] = '1';
      }
      return $query_args;
    }
    add_filter( 'sf_edit_query_args', 'sf_filter_query_args', 10, 2 );
    
    Pou Lala in reply to:
    Exclude first post
    #276546

    Hi, I’ve a solution for that. You have to use the ‘offset’ parameter.

    I added this to function.php:
    <?php
    function sf_filter_query_args( $query_args, $sfid ) {

    //if search form ID = 225, the do something with this query
    if($sfid==31940)
    {
    //modify $query_args here before returning it
    //only show results within categories with these IDs
    $query_args['offset'] = '1';
    }
    return $query_args;
    }
    add_filter( 'sf_edit_query_args', 'sf_filter_query_args', 10, 2 );
    ?>

Viewing 2 posts - 1 through 2 (of 2 total)