Forum Replies Created

Viewing 15 replies - 31 through 45 (of 82 total)
  • Thread Starter rely28

    (@rely28)

    Hi,

    For some reason, the plugin Health Check was not working as expected so I did the test manually (due to Covid situation, I don’t have much visitors on my website anyway)

    And I’ve found the faulty ones, yes with an s. I’ve contacted the author of the plugins both from the same person, FYI, it’s Meow Gallery and Meow Lightbox, if either of these plugins is activated, the issue is there.

    Regards,
    Romain

    Thread Starter rely28

    (@rely28)

    Hi,

    This issue still there even after I deactivated the plugin.

    Here is what I got :

    https://ibb.co/MgCBFD5

    Do you mean it could have been saved as “undefined” because of the plugin somehow ? Because I’m sure it was there before.

    Regards,
    Romain

    Thread Starter rely28

    (@rely28)

    That’s ok,

    Here is the capture screen, with some annotation in red.

    https://ibb.co/MgCBFD5

    Regards,
    Romain

    Thread Starter rely28

    (@rely28)

    Hi,

    Well, obviously, If I deactivate it, I won’t be able to see that preview… Because I mean the preview area under any post or page, one of the functionality that come with Yoast where you can have an idea of what the preview will be and change title or text preview as desired.

    Thread Starter rely28

    (@rely28)

    Awesome ! That made the trick ! Thanks a lot, gonna put 5 stars to your plugin straight away !

    Thread Starter rely28

    (@rely28)

    Ok, That’s a useful information since I remembered seing it somewhere, and here is the file I have, loop.php

    <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<div class="mkdf-post-content">
    	        <?php if ( has_post_thumbnail() ) { ?>
    		        <div class="mkdf-post-image">
    			        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    				        <?php the_post_thumbnail( 'thumbnail' ); ?>
    			        </a>
    		        </div>
    	        <?php } ?>
    	        <div class="mkdf-post-title-area <?php if ( ! has_post_thumbnail() ) { echo esc_attr( 'mkdf-no-thumbnail' ); } ?>">
    		        <div class="mkdf-post-title-area-inner">
    			        <h5 itemprop="name" class="mkdf-post-title entry-title">
    				        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    			        </h5>
    			        <?php
    			        $mkdf_my_excerpt = get_the_excerpt();
    			        
    			        if ( ! empty( $mkdf_my_excerpt ) ) { ?>
    				        <p itemprop="description" class="mkdf-post-excerpt"><?php echo wp_trim_words( esc_html( $mkdf_my_excerpt ), 30 ); ?></p>
    			        <?php } ?>
    		        </div>
    	        </div>
            </div>
        </article>
    <?php endwhile; ?>
    <?php else: ?>
    	<p class="mkdf-blog-no-posts"><?php esc_html_e( 'No posts were found.', 'backpacktraveler' ); ?></p>
    <?php endif; ?>

    The only problem remaining is that, if I remove that esc_html, I indeed don’t see html anymore but the highlight is not working then…

    Thread Starter rely28

    (@rely28)

    By the way, I did try your solution, in case, with no luck…

    Thread Starter rely28

    (@rely28)

    The strip tags is actually in the blog-function.php

    $post_excerpt = $post->post_excerpt !== '' ? $post->post_excerpt : strip_tags( strip_shortcodes( $post->post_content ) );

    I believe this is the culprit, but I’m afraid to messed up the functionality if removing or changing improperly…

    Thread Starter rely28

    (@rely28)

    But If I do so, I’m afraid it’s gonna change all of the actual exceprt, not just the ones from the search list, isn’t it ?

    Thread Starter rely28

    (@rely28)

    In the blog-function.php I have this :

    if ( ! function_exists( 'backpacktraveler_mikado_excerpt' ) ) {
    	/**
    	 * Function that cuts post excerpt to the number of word based on previosly set global
    	 * variable $word_count, which is defined in mkdf_set_blog_word_count function.
    	 *
    	 * @param $length - default excerpt length
    	 *
    	 * @return string - formatted excerpt
    	 *
    	 * It current post has read more tag set it will return content of the post, else it will return post excerpt
    	 *
    	 */
    	function backpacktraveler_mikado_excerpt( $length ) {
    		global $post;
    		
    		//does current post has read more tag set?
    		if ( backpacktraveler_mikado_post_has_read_more() ) {
    			global $more;
    			
    			//override global $more variable so this can be used in blog templates
    			$more = 0;
    			
    			return get_the_content( true );
    		}
    		
    		$number_of_chars = backpacktraveler_mikado_get_meta_field_intersect( 'number_of_chars', backpacktraveler_mikado_get_page_id() );
    		$word_count      = $length !== '' ? $length : $number_of_chars;
    		
    		//is word count set to something different that 0?
    		if ( $word_count > 0 ) {
    			
    			//if post excerpt field is filled take that as post excerpt, else that content of the post
    			$post_excerpt = $post->post_excerpt !== '' ? $post->post_excerpt : strip_tags( strip_shortcodes( $post->post_content ) );
    			
    			//remove leading dots if those exists
    			$clean_excerpt = strlen( $post_excerpt ) && strpos( $post_excerpt, '...' ) ? strstr( $post_excerpt, '...', true ) : $post_excerpt;
    			//if clean excerpt has text left
    			if ( $clean_excerpt !== '' ) {
    				//explode current excerpt to words
    				$excerpt_word_array = explode( ' ', $clean_excerpt );
    				
    				//cut down that array based on the number of the words option
    				$excerpt_word_array = array_slice( $excerpt_word_array, 0, $word_count );
    				
    				//and finally implode words together
    				$excerpt = implode( ' ', $excerpt_word_array );
    				
    				//is excerpt different than empty string?
    				if ( $excerpt !== '' ) {
    					return rtrim( wp_kses_post( $excerpt ) );
    				}
    			}
    			
    			return '';
    		} else {
    			return '';
    		}
    	}
    }
    Thread Starter rely28

    (@rely28)

    I’m not sure, here is what I have in the excerpt.php

    <?php
    
    if ( post_password_required() ) {
    	echo get_the_password_form();
    } else {
    	$excerpt_length = isset( $params['excerpt_length'] ) ? $params['excerpt_length'] : '';
    	$excerpt        = backpacktraveler_mikado_excerpt( $excerpt_length );
    	
    	$link_page_exists = apply_filters( 'backpacktraveler_mikado_filter_single_links_exists', '' );
    	
    	if ( ! empty( $excerpt ) && empty( $link_page_exists ) ) { ?>
    		<div class="mkdf-post-excerpt-holder">
    			<p itemprop="description" class="mkdf-post-excerpt">
    				<?php echo wp_kses_post( $excerpt ); ?>
    			</p>
    		</div>
    	<?php }
    } ?>

    Hi,

    I join this discussion while still open, I have a similar problem with different sizing but not about slideshow. The setting mentioned above is about “slideshow” but not for example about a random tiled gallery. Fact is, the gallery looks ok with mainly landscape photos but if there is a portrait photo in the middle, it got stretches in the landscape format too. But for a strange reason, if I click on this particular photo, I see it in slideshow mode, no problem, and when it’s back to the gallery, then the gallery is ok and this photo appear in portrait mode finally.

    Thread Starter rely28

    (@rely28)

    Well, been solved thanks to the other guy, I had to add a piece of code to avoid conflict with other plugin using the same shortcode and attribute structure.
    Thanks

    Thread Starter rely28

    (@rely28)

    Hi,

    Works like a charm ! Thanks a lot ! As far as I know, the other plugin doesn’t use the same attribute (that’s why I was getting an error) but do use the same shortcode as a replacement of the original one. Thanks again !

    Thread Starter rely28

    (@rely28)

    I mean layouts setting not Native WP Galleries… where you have the choice for Image layout.

Viewing 15 replies - 31 through 45 (of 82 total)