Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’d look into making use of https://developer.ww.wp.xz.cn/reference/hooks/template_redirect/. I believe you should be able to do something close to what you need with the code below. Please adjust accordingly to make sure you’re fetching the ACF data properly:

    function webworklife_redirect_to_document() {
        $pdf_url = get_field( 'upload_file' );
    
        wp_redirect( $pdf_url );
        exit();
    }
    add_action( 'template_redirect', 'webworklife_redirect_to_document' );\
    
Viewing 1 replies (of 1 total)

The topic ‘CPT + ACF Permalink’ is closed to new replies.