Undefined Variable Help

Joined
Mar 25, 2021
Messages
29
Reaction score
0
Hi, I am getting an undefined variable error with $page wondering how I can adjust this to account for that?

PHP:
<?php
  if (get_field('external-site', $page->ID) == '') {
    wp_redirect( get_field('external-site', $page->ID) );
  } else {
    wp_redirect( home_url().'/page-not-found' );
  }
?>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top