Forums Forums Search Search Results for 'filter style'

Viewing 10 results - 321 through 330 (of 496 total)
  • Author
    Search Results
  • #86166

    Anonymous
    Inactive

    Thanks for the quick response.

    Re: 1 & 2 I can wait for the next release, these are nice to have but not crucial for the launch.

    Judging by your answer I assume that it also won’t be possible to show the list of active filters in the archive page? That is, on top of the page the user would see that he’s filtered by category 1 and 2 and could quickly remove some of the filters? Unless there is a shortcode for that?

    Re 3: In short, my archive page features a 3rd party media player (by waveplayer.info) rendered via the shortcode. While AJAX refresh does give me all the posts I expect, the player isn’t rendered properly. I assume it’s missing the js / styles it needs.

    While I understand how it works in principle, I guess I just need a bit of a push in the right direction. Specifically, how to identify what the waveplayer plugin needs and how to include it within the AJAX request.

    Thanks in advance!


    Trevor
    Participant

    Just in case this happens again, this is the code I wrote:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(5048)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo ''; 
    } else {
    	
    	if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    <div class="slz-shortcode sc_block_posts "><div class="slz-template-03 ">
    	<div class="slz-list-block slz-column-2">
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div class="item">
    			<div class="slz-block-item-01 style-1">
    			<?php if ( has_post_thumbnail() ) {?>
    					<div class="block-image">
         <a href="<?php the_permalink(); ?>" class="link">
          <?php the_post_thumbnail("full", array( 'class' => 'img-responsive' ));?>
    					</a>
        </div>
    			<?php } ?>
        <div class="block-content">
         <div class="block-content-wrapper">
    			   <a class="block-title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    						<ul class="block-info">
    							<li><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><span class="author-label">By </span><span class="author-text"><?php the_author(); ?></span></a></li>
    						 <li><a href="<?php the_permalink(); ?>" class="link date"><?php the_date(); ?></a></li>
    						 <li><a href="<?php the_permalink(); ?>#comments" class="link comment"><?php comments_number();?></a></li>
           <li><a href="<?php the_permalink(); ?>" class="link view">?? Views</a>
                            </li>
    						 <li><?php the_category(); ?></li>
    						</ul>
    						<div class="block-text"><?php echo get_the_excerpt(); ?></div>
    
    			  </div>
    		  </div>
    			
    			</div>
    		</div>
    		
    		<?php
    	}
    	?>
    	</div>
    	</div></div>
    
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    }
    ?>
    #85201

    Trevor
    Participant

    Marketify should work the easy way. If you go to wp-content/themes/marketify (I think), edit the functions.php file, it needs to look something like this (where the 63 is the ID number of the form you made, so change that):

    <?php
    /**
    * Marketify child theme.
    */
    function marketify_child_styles() {
    wp_enqueue_style( 'marketify-child', get_stylesheet_uri() );
    
    do_action( 'search_filter_prep_query', 63 );
    
    }
    add_action( 'wp_enqueue_scripts', 'marketify_child_styles', 999 );
    
    /** Place any new code below this line */
    #83677

    Trevor
    Participant

    I have written a new results.php for you:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<div class="col-9 hb-equal-col-height hb-main-content">
    		<div id="hb-blog-posts" class="hb-blog-grid masonry-holder clearfix" data-layout-mode="fitRows" data-categories="" data-column-size="col-4">
    	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
       <article id="post-<?php echo get_the_ID();?>" class="col-4 post-<?php echo get_the_ID();?> post type-post status-publish format-standard has-post-thumbnail hentry" itemscope="" itemtype="http://schema.org/BlogPosting">
    				<div class="featured-image">
    					<a href="<?php the_permalink(); ?>">
    			<?php 
    				if ( has_post_thumbnail() ) {
    					the_post_thumbnail("small");
    					?>
            <div class="featured-overlay"></div>
            <div class="item-overlay-text" style="opacity: 0;">
              <div class="item-overlay-text-wrap" style="padding-top: 0px;"> <span class="plus-sign"></span> </div>
            </div>
       <?php
    				}
    			?>
    					</a>
    				</div>
    				<div class="post-content">
    					<div class="post-header">
       			<h2 class="title" itemprop="headline"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    					</div>
     			 <p><?php echo get_the_excerpt(); ?>
    	 			<br /><a href="<?php the_permalink(); ?>" class="read-more">Read More</a>
    		 		</p>
    				</div>
      	</article>
    		
    		<?php
    	}
    	?>
    		</div>
     </div>
     Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #83471

    Anonymous
    Inactive

    Thank you.

    My php isn’t that great, would it would be something like;

    function filter_function_name($input_object, $sfid=87)
    {
    if($input_object[‘name’]==’sf-level-1′)
    {
    //udpate this field before rendering
    $input_object[‘attributes’][‘style’] = ‘margin-left:50px;’;
    }

    return $input_object;
    }
    add_filter(‘sf_input_object_pre’, ‘filter_function_name’, 10, 2);

    #83050

    Trevor
    Participant

    What does your child theme functions.php look like? It should look like this:

    <?php
    /**
    * Marketify child theme.
    */
    function marketify_child_styles() {
    wp_enqueue_style( 'marketify-child', get_stylesheet_uri() );
    
    do_action( 'search_filter_prep_query', 63 );
    
    }
    add_action( 'wp_enqueue_scripts', 'marketify_child_styles', 999 );
    
    /** Place any new code below this line */
    #82378

    Anonymous
    Inactive

    All of a sudden the search forms have stopped sorting. The page is here: https://intrepidexposures.com/photo-tours/

    Tweaks to code as per previous threads here:

    // Search Filter
    function filter_input_object($input_object, $sfid) {
    	
    if(($input_object['name'] == '_sfm_workshop_location') || ($input_object['name'] == '_sfm_tour_style') || ($input_object['name'] == '_sfm_tour_leader')) {
    
    		
    		$new_options = array(); //the options added to this will replace all existing optoins in the field
    		
    		foreach($input_object['options'] as $option) {
    			
    			if ($option->value !== "")
    			{
    				//check to see if the option has a parent
    				$parent_id = wp_get_post_parent_id($option->value);
    				if(!$parent_id)
    				{
    					//then this option does not have a parent, so it must be a parent itself, add it to the new array
    					$option->label = get_the_title($option->value);
    					array_push($new_options, $option);
    				}
    			}
    		}
    		
    		//now we have an array with only parent options in, so simply replace the one in the input object
    		$input_object['options'] = $new_options;
    		
    	}
    	
    	return $input_object;
    }
    add_filter('sf_input_object_pre', 'filter_input_object', 10, 2);

    Any ideas?

    #81812

    Anonymous
    Inactive

    Hello, I’m trying to style the search bar on this page with css. I’ve managed to style the submit button using the .searchandfilter input[type=submit] but I can’t see what the css div class is for the search bar. please can you help?

    http://tsep.sj-creative.co.uk/category/news/?s=student

    #80210

    Trevor
    Participant

    There were a couple of errors in that, so I have re-coded it (I am not sure about the do_shortcode bit, but I have left that as is):

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(3552)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
    		echo "make your selection";
    } else {
    	if ( $query->have_posts() )
    {
    	echo '<div class="row">';
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		?>
    			<div class="col-md-3 popmake-<?php the_ID();?>" data-do-default="" style="cursor: pointer;">
    				<h3 style="text-align: center;"><?php the_title(); ?></h3>
    				<p style="text-align: center;"><?php do_shortcode(the_excerpt()); ?></p>
    			</div>
    	<?php
    	echo '</div>';
    	}
    }
    else
    {
    	echo 'No Results Found';
    }
    }
    ?>

    That may make no difference, but give it a try.

    #80206

    Anonymous
    Inactive

    shure!

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(3552)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
    		echo "make your selection";
    } else {
    	if ( $query->have_posts() )
    {
    	echo "<div class=\"row\">";
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		?>
    			<div class="col-md-3 popmake-<?php the_ID();?> data-do-default="" style="cursor: pointer;">
    				<h3 style="text-align: center;"><?php the_title(); ?></h3>
    				<p style="text-align: center;"><?php do_shortcode(the_excerpt()); ?></p>
    			</div>
    	<?php
    	echo "</div>";
    	}
    }
    else
    {
    	echo "No Results Found";
    }
    }
    ?>
Viewing 10 results - 321 through 330 (of 496 total)