Forums Forums Search & Filter Pro Search results do not appear on a specific page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #77078

    Hallo, I would like to use the filter & search pro plugin with the colormag theme but the results do not appear using search.php nor archive.php. I guess the problem lies in the php-code of the theme since erverything works fine with the standard wordpress themes. Unfortunately I have no clue which parts of the code should be deleted or modified. Perhaps you can help me out with this issue. Here is the code of the archive.php

    <?php
    /**
     * The template for displaying Archive page.
     *
     * @package ThemeGrill
     * @subpackage ColorMag
     * @since ColorMag 1.0
     */
    ?>
    
    <?php get_header(); ?>
    
    	<?php do_action( 'colormag_before_body_content' ); ?>
    
    <div class="main-content-section clearfix">
    	<div id="primary">
    		<div id="content" class="clearfix">
    
    			<?php if ( have_posts() ) : ?>
    
    				<header class="page-header">
                   <?php if ( is_category() ) {
                      do_action('colormag_category_title');
                      single_cat_title();
                      } else { ?>
    					<h1 class="page-title">
                   <span>
    						<?php
    							if ( is_tag() ) :
    								single_tag_title();
    
    							elseif ( is_author() ) :
    								/* Queue the first post, that way we know
    								 * what author we're dealing with (if that is the case).
    								*/
    								the_post();
    								printf( __( 'Author: %s', 'colormag' ), '<span class="vcard">' . get_the_author() . '</span>' );
    								/* Since we called the_post() above, we need to
    								 * rewind the loop back to the beginning that way
    								 * we can run the loop properly, in full.
    								 */
    								rewind_posts();
    
    							elseif ( is_day() ) :
    								printf( __( 'Day: %s', 'colormag' ), '<span>' . get_the_date() . '</span>' );
    
    							elseif ( is_month() ) :
    								printf( __( 'Month: %s', 'colormag' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
    
    							elseif ( is_year() ) :
    								printf( __( 'Year: %s', 'colormag' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
    
    							elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
    								_e( 'Asides', 'colormag' );
    
    							elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
    								_e( 'Images', 'colormag');
    
    							elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
    								_e( 'Videos', 'colormag' );
    
    							elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
    								_e( 'Quotes', 'colormag' );
    
    							elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
    								_e( 'Links', 'colormag' );
    
    							elseif ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) :
    									woocommerce_page_title( false );
    
    							else :
    								_e( 'Archives', 'colormag' );
    
    							endif;
    						?>
    					</span></h1>
                      <?php } ?>
    					<?php
    						// Show an optional term description.
    						$term_description = term_description();
    						if ( ! empty( $term_description ) ) :
    							printf( '<div class="taxonomy-description">%s</div>', $term_description );
    						endif;
    					?>
    				</header><!-- .page-header -->
    
                <div class="article-container">
    
       				<?php global $post_i; $post_i = 1; ?>
    
       				<?php while ( have_posts() ) : the_post(); ?>
    
       					<?php get_template_part( 'content', 'archive' ); ?>
    
       				<?php endwhile; ?>
    
                </div>
    
    				<?php get_template_part( 'navigation', 'archive' ); ?>
    
    			<?php else : ?>
    
    				<?php get_template_part( 'no-results', 'archive' ); ?>
    
    			<?php endif; ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    	<?php colormag_sidebar_select(); ?>
    </div>
    
    	<?php do_action( 'colormag_after_body_content' ); ?>
    
    <?php get_footer(); ?>
    Trevor
    #77129

    Are you trying it with ‘As an Archive’?

    That page code you show does not actually show the wp_query, but just contains the loop. To me, that suggests using the Shortcode method would at least tell if results can be found, then it is just a matter of styling and additional/different content fields.

    Anonymous
    #77143

    Thank you very much for your quick response.

    Yes, I was trying it as “an archive” and this way the results do not appear and I´ve forgot to mention that using the “shortcode” works fine within the colormag theme, I`ve already tried it.

    So what is your suggestion? – To apply the “shortcode” method and then to adapt the search-form and result-output to the theme? Or what do you mean with “[…]then it is just a matter of styling and additional/different content fields.”?

    My thought was, that if I use the the “as an archive” mehtod i can get the results in the same style like the archive.

    Trevor
    #77159

    If you are up for it (or have a code editor with a recursive search), you need to find the theme file with the wp_query in it. We might be able to address the problem that way. But using Shortcode removes that issue. I have usually found a way to help users clone the site appearance with the shortcode method.

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