Smarty Plugins Working in WP!

Yay! I got the “relatedstories” plugin working! The hardest bit was converting to use $wpdb instead of the PHP MySQL interface. I love that I could call get_permalink in post.html to figure out the story link:

{relatedstories}
{if $relatedstories}
  <b>Related Stories</b> ({$relatedstoriesWords})
  <ul>
  {foreach from=$relatedstories key=key item=story}
    <li> <a href="{get_permalink id=$story->ID}" >{$story->post_title}</a></li>
  {/foreach}
  </ul>
{/if}


You might also like

If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos to explore too!

One thought on “Smarty Plugins Working in WP!

Leave a Reply

Loading Facebook Comments ...