[Resolved] Image Post with PHP
I’m trying to modify an existing theme and i’m almost done.
I only have to call the event image in a php
The actual code is
$image = get_post_format( get_the_ID()); $image = $image['image']; $image = preg_replace('|\<a(.*?)<img(.*?)src=[\'"](.*?)[\'"](.*?)<\/a>|', '$3', $image); $imageTh = get_pix_thumb($image, $thumb_size );
echo '<img src="'.$imageTh.'" alt="'.get_the_title().'">';
Everything else works fine (the link, the post title…)
Honestly I’m a newbie with php so I don’t know exactly what to white there.
Can someone help please?
Thanks in advance
- The topic ‘[Resolved] Image Post with PHP’ is closed to new replies.