Connect with us

Articles

Echo Images inside a Post into the Loop

Published

on

Here is a useful trick. Want to call or echo an image into your blog post with our using the custom fields? Well this could be tricky, but I know of a way.

All you have to do is print these lines of code into your
index.php or home.php inside the loop:

<?php
$id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$home = get_option('home');
$pattern = '!<img.*?src="'.$home.'(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$image_src = $matches['1'][0]; ?>

then after write:

<?php if($image_src != '') { ?>
<a href="<?php echo the_permalink() ?>" rel="bookmark" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo $image_src; ?>" alt="<?php the_title(); ?>" /></a>
<?php }  ?>

That’s all! This will look for the first image in your post and echo it in the loop, could be used to show off those pretty thumbnails for the post..

News

On the lookout for 2.7

Published

on

I know the whole community is weary and waiting for the release of the now 18 days over original scheduled release of November 10th. But I am already anxious to start the prowl for plugins that need major updating for the new 2.7 platform.

I know because I have the latest nightly build installed on this site, and some of the plugins I am using have created a tiny problem, ;). Okay, maybe some have really not liked the new WP, but that hasn’t stopped me from trying them out.

Continue Reading

Plugins

Scheduled Post Shift

Published

on

I just came across an article over at WPHacks.com about a “how to” shift and bring back posts hidden way in the archive. Seems really interesting, cause I have a few blog sites myself and some of them like thefrosty.com and jeanasays.com. Theses sites have been working hard for a long while and have built up a good 20 plus paginated archive of posts.

So I am going to try and download the plugin Scheduled Post Shift Plugin by Dagon Design.

Once I have a chance to review this plugin I will surely write about it. 🙂

Continue Reading

Premium

WP Realtor

Published

on

The Ultimate WordPress Real Estate theme with custom developed plugins, single and multiple agents, extensive listing features and personalized search.

Bel Air Theme

  • Beautiful, elegant themes
  • Five colors included: sea blue, red, navy blue, gold and black
  • Agent can publish picture with biography
  • Top-Level link to add property listing
  • Easily publish your home details (including bathrooms, bedrooms, images and lots more)
  • “No Custom Fields” to hassle with when posting property details and images
  • Images are auto thumb-nailed and display full-size with a cool pop-up slide-show
  • Featured properties rotate on home page with agent
  • Cool Property Search Options – includes drop downs and search box
  • Agents page to display biography and properties for sale
  • Payment Calculator
  • Ad Banner Management
  • 100+ hours into programming, designing and preparing these themes for you.

This is the info taken from the Plug and Press Bel Air Theme site.

Price:

Single Use: $99 $79.95 Buy Now!
Multiple Use: $179.95 Buy Now!
Developers: $279.95 Buy Now!

Continue Reading

Trending