Content in a div box in e.g. HEADER – outside loop
-
Hi folks –
I have a question about getting content outside the loop. I have a “News” Box and I want to have the possibility to add news to this box out of the backend.
I found this code here:
<?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'NEWS', true); wp_reset_query(); ?>
It works when I release a new post in which I put a custom field called “NEWS”, but I don’t understand how I can just post “news” to the box, without releasing a new “post”.
Any hints, ideas?
Thank you!
AD
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Content in a div box in e.g. HEADER – outside loop’ is closed to new replies.