Add some css by morefields checkbox
-
It’s probably a stupid question but i just can’t get it to work and I also cannot find the answer anywhere.
I have a custom post type called ‘projecten’ with 3 morefields, 2 textline’s and one chekbox.
The textboxes are working great, people can enter the text they want to appear in de ‘project’.
I loop the featured image and in the left top of the div there is an picture that is absolute positioned and 80px width, it’s an stamp to say the project is new.
Above that i have a black box where people can fill in something through the morefields.
Now what i want to happen is that when people check the checkbox ‘nieuw’ on the project page that the black box move 80px to the left so the ‘new’ stamp will appear.
i have this code now:
<?php if (get_post_meta($post->ID, ‘new-project-check’, true) ) : ?>
<style type=”text/css”>
.extracontent-block .stamp{
left: 80px;
}
</style>
<?php endif; ?>but that doesn’t seem to work.
Sorry for the long question I’m building the site on my localhost so i cant just send you an link to the site.
- The topic ‘Add some css by morefields checkbox’ is closed to new replies.