Forums Forums Search Search Results for 'yoast'

Viewing 10 results - 1 through 10 (of 70 total)
  • Author
    Search Results
  • #271434

    Trevor
    Participant

    I have tried as far as I can, but it would appear that those two settings on the Advanced settings tab are needed for your theme, Uncode, to work with our form.

    I do not think that there is any simple way to fix this from our plugin. As per the thread you referenced, I think you will need to use a similar Yoast function. This Google search may yield some ideas:

    https://www.google.com/search?q=functions.php+_yoast_wpseo_metadesc&oq=functions.php+yoast__metadesc

    #271353

    Anonymous
    Inactive

    Yes, if I turn it off then it removes those classes and Yoast behaves normally.

    How can I fix it? How can I connect the form to the products correctly?

    #271349

    Trevor
    Participant

    But it does remove those classes, and does Yoast then behave? It sounds like the form is not correctly connected to the products.

    #271338

    Anonymous
    Inactive

    I don’t think so. I just deactivated Yoast completely and can still see that same tag. Also if I switch to a standard theme like Twenty Twenty, it’s still there.

    Is this something that Search and Filter does?

    #271321

    Trevor
    Participant

    I can see that the body tag has the search classname attached, which is not normal. Is Yoast adding that? See here:

    https://www.screencast.com/t/RvSxpLw94C


    Anonymous
    Inactive

    Hi,

    I am using Search and Filter Pro plugin on my WooCommerce shop page to search and filter for products: https://laespontanea.wine/comprar-vino-natural/

    I am using Yoast SEO plugin to edit the meta data title and description for this page.

    There is a plugin conflict, when Search and Filter Pro is active on a specific page, Yoast detects that page as a “search” page and uses the meta title specified for search pages. It also adds a noindex tag as search pages are marked automatically as noindex by default by Yoast.

    Have you encountered such similar issues before and what is the best way to solve it?

    I was able to change the meta title using the solution provided in this thread: https://support.searchandfilter.com/forums/topic/page-meta-title-on-search-page/

    Do you know how I could add a meta description?

    Thanks
    Michele


    Anonymous
    Inactive

    The load more functionality is just a script that I added to the bottom of our template override. Here is the complete code within our file at theme-name/search-filter/results.php

    <?php
    /**
     * Search & Filter Pro Template Part
     * Results Template Override
     * @package Search_Filter
     */
    
    if ( $query->have_posts() ) { ?>
    
    	<div class="wpgood-filtered-portfolio">
    	
    		<?php while ( $query->have_posts() ) { $query->the_post(); ?>
    
    			<article class="wpgood-portfolio">
    
    				<a class="wpgood-portfolio-link" href="<?php the_permalink(); ?>">
    
    					<?php if ( has_post_thumbnail() ) {
    
    							the_post_thumbnail( 'portolio-thumb' );
    
    					} ?>
    
    					<h3><?php the_title(); ?></h3>
    				
    				</a>
    				
    			</article>
    			
    		<?php } ?>
    		
    		<div class="pagination">
    			
    			<div class="nav-previous">
    
    				<?php next_posts_link( 'Load More', $query->max_num_pages ); ?>
    
    			</div>
    
    		</div>
    
    		<div class="wpgood-load-more"></div>
    
    	</div>
    
    <?php } else {
    
    	echo '<p class="wpgood-filtered-portfolio wpgood-no-results">No Results Found</p>';
    
    } ?>
    
    <script>
    	jQuery( document ).ready( function($) {
    		// Load more functionality
    		$( document ).on( 'click', '.wpgood-filtered-portfolio .pagination a', function(e) {
    			e.preventDefault();
    			var targetURL = $( this ).attr( 'href' );
    			$( '.wpgood-load-more:last' ).load( targetURL + ' .wpgood-filtered-portfolio' );
    			$( '.wpgood-filtered-portfolio .pagination a:first' ).remove();
    		} );
    	});
    </script>

    We’re not using any translation plugins and keep our plugin list pretty lean. We do use Yoast and have readability analysis enabled. I know I get constant Yoast nags about writing in various languages, so maybe(?) what you’re seeing comes from that? But I don’t think this should make a difference. My js grabs whichever url is most recently served.

    Looking forward to your thoughts and am happy to share an admin login, if it helps.

    Thanks again!

    #264136

    Anonymous
    Inactive

    Thanks for the pointing Trevor.
    Solved.

    Following the code to be used in case of Yoast active on your website:

    add_filter('wpseo_title', 'filter_search_wpseo_title');
    function filter_search_wpseo_title( $title ) {
    	global $searchandfilter;
    	if( ! is_admin() && isset( $searchandfilter ) ) {
    		if ( $searchandfilter->active_sfid() ) {
    			return 'Search Page Title You Want';
    		}
    	}
    	return $title;
    }

    ** edited 27/10/2020 to include is_admin & isset check

    You just have to use the Yoast “wpseo_title” filter.

    Thanks!

    #264134

    Trevor
    Participant

    The page title is handled by WordPress, not our plugin, hence in that thread you read Ross was not entirely sure what would work and what would not.

    WordPress relies on the theme template (or any plugin that intercepts that, or is called by that), but again that is in no way influenced or controlled by our plugin.

    There are WordPress hooks to control the title, but it is likely that Yoast is intercepting these anyway.

    wp_title is what you would search for. There is standard functions.php code that should work if the theme and any other plugin do not interfere:

    add_filter('wp_title','search_form_title');
    function search_form_title($title){
      global $searchandfilter;
      if ( $searchandfilter->active_sfid() ) {
        return 'Search Page Title You Want';
      } else {
        return $title;
      }
    }
    #264132

    Anonymous
    Inactive

    Hi Trevor, thanks for the reply.
    No, I’ve developed my personal theme, no childs involved.
    The page meta title tag is generated via Yoast plugin through the “wp-head()” function placed into header.php WP file.
    Currently I’m using display as archive using a custom php template file, let’s call it like yours for easy understanding, sf.search.php, that is calling “get_header()” that calls “wp_head()” in header.php that will call Yoast SEO plugin in order to generate the <title> meta tag.

    So, I would like to know how that archive template is going to generate the meta title as “blog”.

    Doing a google search I’ve found a thread on this forum about a similar problem (funny that if I try to search here I can’t find it! 😀 ):

    https://support.searchandfilter.com/forums/topic/search-results-page-title-tag/

    By the way that’s a 2015 thread, with some code hints that I’m not really sure they will work due to the plugin changes in the last 5 years.

    Thank you.

Viewing 10 results - 1 through 10 (of 70 total)