Quantcast
Channel: Developer Handbook » Code
Viewing all articles
Browse latest Browse all 8

How to retrieve images from WordPress Post

$
0
0
You’ll probably enjoy that code which allow you to retrieve all images from post content and display it. To use this code on your blog, simply paste the following code on one of your theme files. <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php $szPostContent = $post->post_content; $szSearchPattern = '~<img [^>]* [...]

Viewing all articles
Browse latest Browse all 8

Trending Articles