Undefined Variable Help

Joined
Mar 25, 2021
Messages
28
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

Members online

Forum statistics

Threads
473,828
Messages
2,569,736
Members
45,519
Latest member
SadyeCrisw

Latest Threads

Top