featured-images-rss-feed

function featuredtoRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '<div>' . get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content; } return $content; } add_filter('the_excerpt_rss', 'featuredtoRSS'); add_filter('the_content_feed', 'featuredtoRSS');Continue reading

Add Portal to Queue List Button for Event Update Cron WORKS!!!

/** * A WPCode Snippet that creates a shortcode to display a form * that allows changing the ACF field “eios-queue” and saving the post. */ // Shortcode to be used in the post/page content add_shortcode(‘change_eios_queue_form’, ‘display_change_eios_queue_form’); function display_change_eios_queue_form() {…Continue reading

Disable Author User Routes

add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading

Disable Author User Routes

add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading

Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Enable Legacy Email Templates

/** * Revert to legacy ‘HTML’ email template, v1.8.4 and below * * @link https://wpforms.com/developers/how-to-enable-legacy-email-template/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ $settings = (array) get_option( ‘wpforms_settings’, [] ); $settings[ ’email-template’ ] = ‘default’; update_option( ‘wpforms_settings’, $settings );Continue reading

WP Simple Pay: Facebook Payment Conversion Tracking

/** * @link https://library.wpcode.com/snippet/j57gg315/ */ add_action( ‘simpay_payment_receipt_viewed’, /** * Runs the first time the payment confirmation page is viewed. * * @param array $payment_confirmation_data */ function( $payment_confirmation_data ) { // Payment customer data (not used in this example). $customer =…Continue reading