help with meta_value
-
Hi everyone,
I’m trying to define a function based on a custom field. My custom field is named ‘newsletter’ and I’m just trying to create a function that gives ‘true’ if the page has the custom field and ‘false’ otherwise.
Here’s the function I’ve written so far:
function is_newsletter() {
global $post;
if (‘post_type=page&meta_value=newsletter’) {
return true;
} else {
return false;
};
};It’s not working. I’m pretty new at this, so sorry about this.
Can anyone help me with this?
Thanks a lot!
-Mary
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘help with meta_value’ is closed to new replies.