WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
How to limit the number of characters in the post snippet (3 posts)

  1. formyboyfriend
    Member
    Posted 2 years ago #

    Hi,

    I was just wondering if there was an easy way to limit the number of characters that appear in the post snippet. My posts tend to be quite short and at the moment the whole thing is appearing on fp I'd like to limit this to around 50 characters. Is this possible (with my limited programming experience)

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. formyboyfriend
    Member
    Posted 2 years ago #

    oops, clearly that should have said fb not fp :p

  3. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    The sfc_excerpt_length filter will let you control the number of characters it will read in order to produce the published text. It defaults to FB's maximum, which is 1000 characters.

    add_filter('sfc_excerpt_length','my_length');
    function my_length($num) {
      return 50;
    }

    Put that in your theme's functions.php file or in a plugin or something.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic