hook on the_excerpt

You can write your three_dots function like this: function three_dots($excerpt) { // Append the dots to the existing excerpt. $excerpt .= ‘ […]’; return $excerpt; } add_filter(‘the_excerpt’, ‘three_dots’); About your ‘read more’ button, this usually isn’t handled by the excerpt itself but is instead added after the excerpt in your theme’s template files. If you’ve … Read more

How to disable publish_future_post auto add wp_options cron

You could hook pre_schedule_event to stop scheduling them, e.g. function pre_schedule_event_no_publish_future_post( $result, $event, $wp_error ) { if ( $event->hook === ‘publish_future_post’ ) { // Don’t schedule this event return false; } return $result; } add_filter( ‘pre_schedule_event’, ‘pre_schedule_event_no_publish_future_post’, 10, 3 ); You could possibly remove the _future_post_hook call instead remove_action( ‘future_post’, ‘_future_post_hook’, 5, 2 ); but … Read more

Replacing specific Gutenberg blocks

I am not sure If I get what you meant, but study https://developer.wordpress.org/reference/hooks/render_block_this-name/ filter, whan calling it give it $accepted_args number of 3 and inspect what is returned in $block_content or $instance. ID is encoded as ref attribute, if that’s what you are missing. You could also use render_block filter, but render_block_{$this->name} is more convenient, … Read more

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