inserting media into post and then making it a background of some div?
-
I am trying to create a post where i am uploading some media while creating a new post (i have created a custom post type for this purpose). Now this media doesnt need to be inserted in the post, but to be used in my category template file, wherein i have to set it as a background. Now what i am doing currently is –
<div class="<?php echo get_post_meta($post->ID, $bgImageClass, true); ?>"> </div>
And then defining the class with the background manually and then uploading the images seperately, Can anyone tell me how do i use wordpress power to achieve this?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘inserting media into post and then making it a background of some div?’ is closed to new replies.