Tag Info

New answers tagged

0

I know it's three years late, but I found a better solution that it can even help me in the future: First, clean the default excerpt more to remove the default ellipses [...]: function clean_excerpt_more() { return ''; } add_filter( 'excerpt_more', 'clean_excerpt_more' ); Then, we get the excerpt and add the link inline, into the same excerpt ...


0

When you use the register_post_type function you will need to include support for excerpts: add_action( 'init', 'press_release_post_type' ); function press_release_post_type() { register_post_type( 'press_release', array( 'labels' => array( 'name' => __( 'Press Release', '$text_domain' ), ...


0

Ok I figured it out. My custom post type was called press_release not press-release, and instead of returning no results, wordpress was returning some arbitrary collection of results that were broken in weird ways.


0

add_filter( 'excerpt_length', function($length) { return 400; }, 999 ); add_filter('excerpt_more', function($more) { return ''; }); another edit: this will cut words at the end, not in the middle of some word. I'm sorry if I understood the request wrong. And be free to change 400 to any amount of words you want to show. add that to your functions.php ...



Top 50 recent answers are included