• Resolved awelsh

    (@awelsh)


    Is it possible to have a word limit on [post_content]? Some of my posts are really long and I only wanted to show excerpt of it. I’ve tried to use [post_excerpt wordlimit=””] but this strips all the html and shows all my other shortcodes. I need to either have a limit on post_content, or their needs to be an option to allow post_excerpt to include the html tags.

    Thanks,
    Adrian

    https://www.ads-software.com/plugins/w4-post-list/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shazzad Hossain Khan

    (@sajib1223)

    Hi, Without striping the html tags, wordlimit can not be calculated. You can solve the issue by filling the Excerpt box of each post. Or, you can use one Custom field and display the meta value with shortcode.

    Thread Starter awelsh

    (@awelsh)

    Thanks for your reply. Using the Excerpt box strips all the html so that is not a solution. However, your second option sounds interesting, but I just can’t seem to get it to work. I’ve created a custom field called “custom excerpt”, but not sure what shortcode to use to display it? Can you give an example?

    Thanks,
    Adrian

    Plugin Author Shazzad Hossain Khan

    (@sajib1223)

    To display the value of meta field “custom excerpt”, use – [post_meta key="custom excerpt"]. that’s it.

    Thread Starter awelsh

    (@awelsh)

    Strange. I made the custom field with the Types plugin (https://wp-types.com) but it didn’t work. So I downloaded the Advanced Custom Fields plugin and it worked.

    Thanks for your help. I’ll leave a good review.
    Adrian

    Plugin Author Shazzad Hossain Khan

    (@sajib1223)

    WP Types plugin use a prefix to the meta field name, not exactly sure, but possibly ‘wt_’. Where ACF uses the exact name you set.

    Thanks for the review.

    I hope i could come up with the fade effect for ajax pagination. But you know, the small effect creates an issues. When the new item fades in, it sometime goes below the old item till old item is completely hidden. To prevent that, most (or all) of the developer use absolute positioning. But i will try to come up with. Good luck.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Word limit on post_content’ is closed to new replies.