Forums Forums Search & Filter Pro Search results

Viewing 10 posts - 11 through 20 (of 20 total)
  • Anonymous
    #192214

    I repeat my problem again:

    I have filter as shortcode on page /blog/. I use SHORTCODE method to filter/display results on this page.
    I want to change title on BLOG page, not in results.php LOOP. NOT IN LOOP. Only one BLOG page title, which is “Recent posts” and marked <div class="page-blog page-blog-title">Recent posts</div>. It’s not in loop.

    Trevor
    #192218

    Ah, I can see what you have done now. It would need for part of the blog page template to be placed in the results.php file and for the blog template instead of calling the results shortcode, to call the content.

    I can write this for you if you want:

    In blog-page.php change lines 24-29:

    <div class="page-blog page-blog-title">Recent posts</div>
      <div class="blog-posts">
    
        <?php echo do_shortcode('[searchandfilter id="463" show="results"]');?>
      </div>
    </div>

    with:

    <?php the_content(); ?>
    

    Next, in the results.php file, find lines 68 and 69:

    </a></a>
    </div>

    I believe these have errors and should be just:

    </a>
    

    At the very end of the file is a blank line, after this:

    else  ?>
    
    <?php {
    	
    }
    ?>

    Here add two closing tags:

    </div>
    </div>

    Now find lines 25 and 26 (which are blank) and paste these lines:

    <?php global $searchandfilter;
    $sf_current_query = $searchandfilter->get(463)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      $page_title = "Recent Posts"; 
    } else {
      $page_title = "Search results for: " . $sf_current_query->get_search_term();
    }?>
    <div class="page-blog page-blog-title">Recent posts</div>
      <div class="blog-posts">

    I think that will do as you want. The title must be inside the results.php for it to be affected by if there are results.

    Anonymous
    #192220

    Okey, i have done all, but have new problem: I use infinity scroll, and when i scrolling my page everthing is duplicate. You can check it on /blog/ page

    Trevor
    #192233
    This reply has been marked as private.
    Anonymous
    #192289

    Okey. Can you check what the problem with infinityscroll?

    Trevor
    #192295

    When you originally made your results.php file, did you use the contents of the exemplar results.php file or the contents of the exemplar results-infinite-scroll.php scroll?

    The structure of the two exemplar files is different.

    Anonymous
    #192299

    I use results.php, this is my problem?

    Trevor
    #192301

    I will take a look at what you currently have to see if it needs to be changed.

    Anonymous
    #192337

    When you can look at?

    Trevor
    #192415
    This reply has been marked as private.
Viewing 10 posts - 11 through 20 (of 20 total)