Excerpt preview

You could publish the post as private, so when you logged in the excerpt is showing on the archive page.

Excerpt of certain page to display on home page

You’ll need to create a new loop – outside of your main loop – using get_posts() and passing the page ID for the ‘About’ page and setting post_type to page Then, inside your new loop simply call get_the_excerpt() Update: From my links: $args = array( ‘post_type’ => ‘page’ ); $myposts = get_posts( $args ); foreach … Read more

excerpt button not going to custom post page

You to set the global $post, otherwise your get_the_ID() function won’t work because this code is not in a WordPress loop. function all_excerpts_get_more_link($post_excerpt) { global $post; return $post_excerpt . ‘ <p><a class=”btn btn-secondary understrap-read-more-link” href=”‘. get_the_permalink( get_the_ID() ) . ‘”>’ . __(‘VIEW CASE’, ‘understrap’) . ‘</a></p>’; } add_filter(‘wp_trim_excerpt’, ‘all_excerpts_get_more_link’);

modify text at the bottom of excerpt editor

Try below code. add_filter( ‘gettext’, ‘excerpt_gettext’, 10, 2 ); function excerpt_gettext( $translation, $original ) { $post_type = get_post_type( $_GET[‘post’] ); if($post_type == ‘your custom post type’) { $text = strpos($original, ‘Excerpts are optional hand-crafted summaries of your content that can be used in your theme’); if ($text !== false) { return ‘My Custom Excerpt Discription’; … Read more

Help needed using wp_trim_words

Keep in mind that a post excerpt is not always just the first X words of a post, so while wp_trim_words() could work under certain situations, it’s a pretty rigid solution. If you don’t want to deal with reverse-engineering the encrypted/obfuscated source file (shame on whoever did that), you might be able to get clever … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)