Changing Text For Suggestion Donation Descriptions

add_filter( ‘charitable_campaign_suggested_donations’, ‘example_charitable_campaign_suggested_donations’, 10, 2 ); function example_charitable_campaign_suggested_donations( $value = array(), $campaign_object ) { if ( empty( $value ) ) { return; } /* $value is an array of suggested donations. It often looks like this by default: Array (…Continue reading

Add duplicate link to admin bar menu

add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading

Yoast SEO (copy)

// Change OG title for Yoast on Vendor Pages function wcv_wpseo_change_og_title( $title ) { if ( WCV_Vendors::is_vendor_page() ) { $vendor_shop = urldecode( get_query_var( ‘vendor_shop’ ) ); $vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); $shop_title = get_user_meta( $vendor_id, ‘pv_shop_name’, true ); $og_title =…Continue reading

Blocks on templates

/** * Setting Hero Block on Pages by default. * */ function awesome_register_page_template() { $post_type_object = get_post_type_object( ‘page’ ); $post_type_object->template = array( array( ‘core/pattern’, array( ‘slug’ => ‘frost/hero’, ) ), ); } add_action( ‘init’, ‘awesome_register_page_template’ );Continue reading

Duplicate Posts and Pages (copy) (copy)

// 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

Duplicate Posts and Pages (copy) (copy)

// 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

Duplicate Posts and Pages (copy) (copy)

// 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

Duplicate Posts and Pages (copy)

// 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