jasondrey13
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Themes and Templates
In reply to: Set Custom Background class on [html] rather than [body]I’m trying to get the “Custom Background” feature built into WordPress to work on the html tag- I can’t hard code the image into the theme, because the theme is for a multisite installation, and each will be different.
Forum: Themes and Templates
In reply to: Set Custom Background class on [html] rather than [body]I actually already have default backgrounds working nicely in all browsers- adding a background to the HTML element in the CSS. It’s not a display issue- it’s just that WordPress adds the “custom-background” CSS class to the body tag by default, and I need the tag to be inserted in the HTML element.
Any ideas?
Thanks!Forum: Fixing WordPress
In reply to: Get posts/pages with certain custom meta valueThat works! Thank you!
(I only had to change the first meta_value to meta_key.)
Here’s the final code:
$querystr = "SELECT wposts.* FROM ".$wpdb->posts." AS wposts INNER JOIN ".$wpdb->postmeta." AS wpostmeta ON wpostmeta.post_id = wposts.ID AND wpostmeta.meta_key = 'event_important' AND wpostmeta.meta_value = 'on'"; $primary_events = $wpdb->get_results($querystr, OBJECT); if ($primary_events): ?> <h1>Events</h1> <ul> <?php global $post; ?> <?php foreach ($primary_events as $post): ?> <?php setup_postdata($post); ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?><span><?php echo 'Get the Date'; ?></span></a></li> <?php endforeach; ?> <?php else : ?> <h1 class="center">No Events</h1> <p class="center">Sorry, there are no events yet.</p> <?php endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)