WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is most likely just a PHP problem, and it's probably a pretty simple answer, but I just can't seem to get my brain to function this morning. This is what I'm trying to do:

 $job_file = $cfs->get('job_file'); // job_file is a URL

 if ($job_file = NULL) {
     echo "NOT AVAILABLE";
 } else {
     echo '<a href="'. $job_file . '">' . get_the_title() . '</a>';

It will display the URL of the current page instead of the $job_file variable. What am I missing?

share|improve this question
I am betting on @t-f's answer but on the off chance that that isn't it, what is $cfs and how is the data saved? – s_ha_dum Sep 16 '13 at 15:34
t-f was correct. Pretty silly of me. – joshmax Sep 16 '13 at 15:45
up vote 3 down vote accepted

Well, this is PHP...

if ($job_file == NULL) {

You might want to compare, and not set, right?

share|improve this answer
See, I knew it was something simple I was forgetting... Thanks. – joshmax Sep 16 '13 at 15:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.