There was an error while loading. Please reload this page.
Here, you will find a list of useful snippets/tools you might easily forget. Editor's note: This is not the place to put passwords!
update wp_posts set post_content = replace(post_content, 'http://olddomain.com','http://newdomain.com'); update wp_posts set guid = replace(guid, 'http://olddomain.com','http://newdomain.com'); update wp_options set option_value = replace(option_value, 'http://olddomain.com','http://newdomain.com');
This is useful for getting the url for background-image inline.
$img = MultiPostThumbnails::get_post_thumbnail_id('post', 'secondary-image', $post->ID); $imgArray=wp_get_attachment_image_src($custom,'secondary-image-size'); $url = $imgArray[0];
<?php $i=0; $extraclass=""; if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); if ($i==0){ $extraclass.=" first"; } ?> <div class="<?php echo $extraclass; ?>"></div> <?php endwhile; $i++; endif; ?>