// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
add_shortcode(‘thumbnail’, ‘thumbnail_in_content’); function thumbnail_in_content($atts) { global $post; return get_the_post_thumbnail($post->ID); }Continue reading
function add_alt_text_to_images( $html ) { // Check if the image has a title attribute if ( preg_match( ‘/(title=[“‘].*?[“‘])/’, $html, $matches ) ) { // Get the title $title = substr( $matches[0], 7, -1 ); // Check if the image has…Continue reading
function wpb_remove_schedule_delete() { remove_action( ‘wp_scheduled_delete’, ‘wp_scheduled_delete’ ); } add_action( ‘init’, ‘wpb_remove_schedule_delete’ );Continue reading
add_filter( ‘automator_send_webhook_get_fields_should_strip_qoutes’, ‘__return_false’ );Continue reading
add_filter( ‘automator_disable_object_cache’, ‘__return_true’, 99, 2 );Continue reading
/** * Form revision * @link https://wpforms.com/docs/how-to-use-form-revisions-in-wpforms/ */ add_filter( ‘wp_wpforms_revisions_to_keep’, function() { return -1; // -1 for unlimited, 0 to turn them off, >0 to set a specific limit } );Continue reading
function sort_posts_by_category($query) { if ($query->is_main_query() && !is_admin()) { $oldest_first_categories = array(1483,1486,1485,1484,1482,1391); // Replace with the IDs of the categories where you want to display oldest posts first if (is_category($oldest_first_categories)) { // $query->set(‘order’, ‘ASC’); // $query->set(‘orderby’, ‘date’); $query->set( ‘meta_key’, ‘start-date’ );…Continue reading