• I love this plugin. I am using posts for announcements. The problem I have is if there are no posts it returns an error code message. I would like to change that message to something more compatible to what I am doing like, “No current news or announcements”. I have no idea how to use filters to do this. If I knew how to program I wouldn’t be using a plugin, so you see why I’m stuck. Can someone help?

    https://www.ads-software.com/plugins/post-content-shortcodes/

Viewing 1 replies (of 1 total)
  • Plugin Author Curtiss Grymala

    (@cgrymala)

    In your theme’s functions.php, you’ll need to create a new function that changes that text. Your code would look something like:

    add_filter( 'post-content-shortcodes-no-posts-error', 'custom_no_posts_text' );
    function custom_no_posts_text( $text ) {
        return 'Type whatever HTML you want to show up when there are no posts.';
    }
Viewing 1 replies (of 1 total)
  • The topic ‘How Do I Use Filters’ is closed to new replies.