pasuay Posted April 3, 2013 Share Posted April 3, 2013 Any expert can help to convert the following codes into a php function returning the output? ( for wordpress shortcode ) So much thanks! <ul> <?php $rPosts = new WP_Query(); $rPosts->query('showposts=5&offset=0'); while ($rPosts->have_posts()) : $rPosts->the_post(); ?> <li class="recent-post-special"> <a href="<?php the_permalink();?>"><?php the_post_thumbnail('recent-thumbnails'); ?></a> <p class="recent-post-special font2"><a class="recent-post-special" href="<?php the_permalink(); ?>"><?php the_title();?></a></p> </li><div class="clear"> </div> <?php endwhile; wp_reset_query();?> </ul> Link to comment https://forums.phpfreaks.com/topic/276488-wordpress-shortcode-php-coding-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.