WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Featured Widget Amplified
Post Info places " from shortcode (3 posts)

  1. cad60k
    Member
    Posted 1 year ago #

    Hey Nick

    Great Plugin by the way!!

    Having an Issue with the post info shortcodes.

    This is what I have placed in the post info section [post_categories sep=", " before=""]

    what shows up on the site is : , ""PROJECTS, ""RENOVATION

    I'm trying to remove the filed under section so have left the before="" blank.

    I've used a html blank space call ( ) without the "" which leaves the blank space but if I have 2 lines of categories there is an indent on the first line which doesn't look to good.

    Any ideas

    Craig

    http://wordpress.org/extend/plugins/genesis-featured-widget-amplified/

  2. ChrisCree
    Member
    Posted 1 year ago #

    I just ran into the same issue with the widget messing up when there are quotes in the shortcode. It really jacks up dates when you try to add a custom format with quotes around it.

    Comparing it to the featured widgets that come with Genesis I see the problem is an extra esc_html in the do_shortcode function with this plugin.

    In the plugin folder, if you open widget.php you can make 2 edits to fix your problem. The first is in line 1122. Change this:
    printf( '<p class="byline post-info">%s</p>', do_shortcode( esc_html( $instance['post_info'] ) ) );
    to this instead:
    printf( '<p class="byline post-info">%s</p>', do_shortcode( $instance['post_info'] ) );

    Then in line 1159 change this:
    printf( '<p class="post-meta">%s</p>', do_shortcode( esc_html( $instance['post_meta'] ) ) );
    to this instead:
    printf( '<p class="post-meta">%s</p>', do_shortcode( $instance['post_meta'] ) );

    Hopefully Nick will see this and incorporate it into his plugin so it will start handling the shortcodes properly.

  3. cad60k
    Member
    Posted 1 year ago #

    Thanks man

    I managed to get a work around with my client, but I'll use it on the next projects for sures.

    Thanks for the fix

    Craig

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.