WordPress.org

Ready to get started?Download WordPress

Forums

Q and A FAQ and Knowledge Base for WordPress
breaks layouts - removed functions (2 posts)

  1. wpprogrammeurs.nl
    Member
    Posted 1 year ago #

    FYI :
    I use this plugin on 4 sites. It breaks the layout on 1 of these 4.

    I traced it down to the custom functions/filters that alter the excerpts.
    On my site removing these functions solved my layout problems.:

    function qaplus_auto_excerpt_more( $more ) {
    //	return ' …' . qaplus_continue_reading_link();
    }
    add_filter( 'excerpt_more', 'qaplus_auto_excerpt_more' );

    and

    function qaplus_custom_excerpt_more( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    //		$output .= qaplus_continue_reading_link();
    	}
    	return $output;
    }
    add_filter( 'get_the_excerpt', 'qaplus_custom_excerpt_more' );

    both can be found around line 200 in functions.php

    I still have a conflict on 1 of the 4 sites where clicking on a faq-title does not slide the answer in place but instead takes it to a new page.

    http://wordpress.org/extend/plugins/q-and-a/

  2. yorokobi
    Member
    Posted 1 year ago #

    Ditto.

    With the plugin running on a site with responsive child-theme I'm developing, I was getting double continue links. "Read More" from the theme, and "Continue reading →" from your plugin.

    There are post excerpt functions that are commented to have been taken from TwentyEleven as follows:

    /* Excerpt functions borrowed from TwentyEleven */
    
    /**
     * Sets the post excerpt length to 40 words.
     */
    
    function qaplus_excerpt_length( $length ) {
    	return 40;
    }
    add_filter( 'excerpt_length', 'qaplus_excerpt_length' );
    
    /**
     * Returns a "Continue Reading" link for excerpts
     */
    
    function qaplus_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }
    
    /**
     * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
     */
    
    function qaplus_auto_excerpt_more( $more ) {
    	return ' &hellip;' . qaplus_continue_reading_link();
    }
    add_filter( 'excerpt_more', 'qaplus_auto_excerpt_more' );
    
    /**
     * Adds a pretty "Continue Reading" link to custom post excerpts.
     *
     */
    
    function qaplus_custom_excerpt_more( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    		$output .= qaplus_continue_reading_link();
    	}
    	return $output;
    }
    add_filter( 'get_the_excerpt', 'qaplus_custom_excerpt_more' );

    I made a COPY of your plugin, then deactivated YOUR plugin. I then deleted this section of code from the COPY and activated my copy. Things returned to normal.

    It's really a fine plugin save for this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.