WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Image Post with PHP (3 posts)

  1. cloc69
    Member
    Posted 11 months ago #

    Hello,

    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 );

    and then

    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

    Sylvain

    http://wordpress.org/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 11 months ago #

    here's another thread which may help you with this - http://wordpress.org/support/topic/events-manager-eventslocation-pages-cant-get-sidebar?replies=22

    then you can call <?php echo $EM_Event->output('#_EVENTIMAGE'); ?>

    http://wp-events-plugin.com/documentation/placeholders/

  3. cloc69
    Member
    Posted 11 months ago #

    Thanks angelo for the links and advice.

    In fact I've found what I wanted to do

    I only needed

    $imageTh = get_the_post_thumbnail($image, $thumb_size );

    then

    echo $imageTh;

    Anyway, thanks for your fast answer.

Reply

You must log in to post.

About this Plugin

About this Topic