Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Codeless builder code in search results

shortcodes is search results
    • 6 years, 4 months ago robertvhgoor
      Participant

      Hi there,

      There seems to be codesless builder shortcodes in my search results. How can I fix this?

      https://1drv.ms/u/s!Ao66qgmoQOEBg6Ep8LRg1Euir2nHcw

      Thanks!

    • 6 years, 3 months ago robertvhgoor
      Participant

      Please let me know!

    • 6 years, 3 months ago Ruco
      Keymaster

      Hello,

      We have fixed this and will update the theme with this issue resolved.

      For the moment you can fix this by replace the file \templates-parts\blog\parts\entry-content.php with the lines below:

      <?php
      
      // Display excerpt if auto excerpts are enabled in the admin
      if ( codeless_get_mod( 'blog_excerpt', true ) && ( ! is_single() || codeless_get_from_element('blog_from_element', false) ) ) :
      
          if( get_the_excerpt() == '' ){
              $content    = get_the_content();
              $content    = preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $content);
      
          if(is_search()){
      
                preg_match_all('/\[cl_(.*?)\]/', $content, $matches_vc );
      
                 if ( isset($matches_vc[0]) && !empty($matches_vc[0]) )
                      
                      return; 
      
           } 
      
              echo  wp_trim_words( $content, codeless_get_mod('blog_excerpt_length', 40), ' [...]' );
          }
      
          else {
      
          if(is_search()){
                $content    = get_the_content();   
                preg_match_all('/\[cl_(.*?)\]/', $content, $matches_vc );
               
             
      
                 if ( isset($matches_vc[0]) && !empty($matches_vc[0]) )
                      
                      return; 
      
           } 
      
              the_excerpt();
      
          }    
      
      // If excerpts are disabled, display full content
      else :
          
          codeless_hook_post_content_begin();
      
          $content    = get_the_content();
      
          $content    = str_replace(']]>', ']]>', apply_filters( 'codeless_the_content' , $content ));
      
          $page_header = codeless_extract_page_header($content);
          $content    = codeless_strip_shortcode_gallery( str_replace($page_header, '', $content ) );
      
          if(is_search()){
      
                preg_match_all('/\[cl_(.*?)\]/', $content, $matches_vc );
      
                 if ( isset($matches_vc[0]) && !empty($matches_vc[0]) )
                      
                      return; 
      
           }   
      
          echo apply_filters('the_content', $content ); 
      
          codeless_hook_post_content_end();
                  			
      endif; 
      			
      wp_link_pages( array(
          'before'      => '<div class="page-links">' . __( 'Pages:', 'handel' ),
          'after'       => '</div>',
          'link_before' => '<span class="page-number">',
          'link_after'  => '</span>',
      ));

      Let us know.

      Regards!

Viewing 2 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password