Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Franky

    (@liedekef)

    You know that you can use shortcodes in php too, no? So if it is for wordpress, create the shortcode with the format of your liking, and then call do_shortcode(…) in your php. WordPress has many docs on that.

    Thread Starter peteincali2103

    (@peteincali2103)

    Thanks Franky, I do know that I can use shortcodes in php with do_shortcode, but I still don’t know how I would get the featured image of an event using that. Can you explain?

    Thread Starter peteincali2103

    (@peteincali2103)

    Oh, I think I get it. Thanks for the suggestion. I will try it out.

    Thread Starter peteincali2103

    (@peteincali2103)

    If anyone else is interested in this, I did this like this:

    echo do_shortcode( '[eme_event id="'.$event_id.'" template_id="1" ]' );

    And made the format of template ID of 1:

    #_EVENTIMAGETHUMB{medium}

    Plugin Author Franky

    (@liedekef)

    Thanks for sharing. You could do it a bit more simple too:

    echo do_shortcode( "[eme_event id=$event_id template_id=1]" );

    but your version works too ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Getting featured query with php code and mysql query’ is closed to new replies.