• Resolved gregsgraphics

    (@gregsgraphics)


    Hi Farinspace,

    I am contacting you on behalf of Sherry Gritch, who purchased the plugin. We are using your Nooz plugin for the press releases on our site. We noticed that when we have a placed image with a caption at the beginning of a press release, the ‘caption code’ shows in the 3-line text preview on the Press Releases main feed page.

    For example, on the post for June 24th, it shows “[caption id="attachment_20392" align="alignright" width="500"]” in the text.

    Is there a way to hide this code in the main feed page?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor farinspace

    (@farinspace)

    @gregsgraphics, for reference, your client is likely using the FREE version of the plugin as we do not yet sell a PRO version, with that said this is all complimentary support.

    What you have identified seems to be a bug/glitch. I will try to resolved this through a new version update.

    However in the mean time you can resolve the problem as follows:

    1. This is the easiest way to resolve the issue on a post by post basis: By using the “Excerpt” field you can specify a custom excerpt per post, any shortcodes will not be used when using a custom excerpt.

    2. This option requires a bit of code, but will apply to all press releases, place the following in your themes “functions.php”:

    add_filter( 'get_the_excerpt', function( $post_excerpt, $post ) {
    	if ( 'nooz_release' == $post->post_type ) $post_excerpt = strip_shortcodes( $post_excerpt );
    	return $post_excerpt;
    }, 11, 2 );
    

    I would recommend using option #2. Once I am able to update the plugin, the above code will not interfere in any way.

    • This reply was modified 3 years, 5 months ago by farinspace.
    • This reply was modified 3 years, 5 months ago by farinspace.
    Plugin Contributor farinspace

    (@farinspace)

    If you are using an older version php, less than 5.3, you may need to try the following code instead:

    add_filter( 'get_the_excerpt', 'my_nooz_release_excerpt', 11, 2 );
    function my_nooz_release_excerpt( $post_excerpt, $post ) {
    	if ( 'nooz_release' == $post->post_type ) $post_excerpt = strip_shortcodes( $post_excerpt );
    	return $post_excerpt;
    }
    
    Thread Starter gregsgraphics

    (@gregsgraphics)

    Hi farinspace, thanks for getting back to us so quickly.

    Putting in a “custom excerpt” in the individual posts where the caption code was showing seems to have fixed the issue. We’ll have to check it in different browsers. It takes the page a few minutes to update (and I usually clear out the page cache as well), but that may be a browser/plugin/host thing.

    We’ll let you know if we need anything else. Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Caption/Attachment Code Showing in PR Feed’ is closed to new replies.