Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Daily Bolt: redirect single posts to articles
//* Redirect posts to original URL
add_action( 'template_redirect', 'nabm_original_post_redirect' );
function nabm_original_post_redirect() {
if ( ! is_singular() ) {
if ( $url = genesis_get_custom_field( 'rss_pi_source_url' ) ) {
wp_redirect( esc_url_raw( $url ), 301 );
Copy link

Hello Please where did you define the genesis_get_custom_field variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment