• For starters, I like this plug-in.

    I’m using Genesis 2.2.0 and found some code on http://www.relevanssi.com/knowledge-base/relevanssi-and-genesis/, which I added to functions.php. (I did remove a section on WooCommerce as I don’t use it.)

    Those 2 snippets gave me what I wanted for search results – excerpts and featured image. It nicely pulls in my custom post types I created using Types and Views.

    However, the second snippet below creates problems on custom post types. The layout is broken and content is missing. The footer is also missing from all pages, even if not a CPT.

    I’ve searched here and the Relevansi site, but not sure where to go next. If I pull the 2nd snippet, the correct layout returns but I no longer have the excerpts and featured image.

    Thanks in advance.

    // Modify content to add Featured Images and Relevanssi permalink
    remove_all_actions( 'genesis_entry_content' );
    add_action( 'genesis_entry_content', 'child_do_post_excerpt' );
    function child_do_post_excerpt() {
    	// Get featured image if page or post
    	the_post_thumbnail( 'medium', array( 'class' => 'alignright' ) );
    
    	// Get excerpt rather than the_content() so Relevanssi can grab a snippet and highlight search terms
    	the_excerpt();
    
    	// Get 'Read More' link with Relevanssi permalink
    	if ( function_exists( 'relevanssi_get_permalink' ) ) {
    		echo '<a class="read-more-link" href="' . esc_url( relevanssi_get_permalink() ) . '">View more »</a>';
    	}
    }

    https://wordpress.org/plugins/relevanssi/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Sorry, but no idea – I hate Genesis with a passion myself, exactly for reasons like this: it makes things that should be simple and straightforward very, very complicated.

    I think the problem may be caused by remove_all_actions( 'genesis_entry_content' ); – that removes all actions, and is probably removing something it shouldn’t.

    Thread Starter td7

    (@td7)

    Thanks Mikko for your reply and honesty.

    I’m not entirely sure it’s Genesis though as the problem appears to only happen on the custom post types created with Types and Views. I’ll reach out to those folks and see if anything surfaces.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Footer and Layout Issues – Non Search Pages’ is closed to new replies.