• Resolved z-247

    (@z-247)


    I’m guessing I’m missing something obvious with this, but I’d like to use information from one of the placeholders (say, #l or #_{l}) in a php function as a variable. I’ve tried things like

    <?php $testVar = EM_Events::get(array('limit'=>1,'format'=>'#l')) ?>

    in my Default event list formatting, and that’s not working. the #l ends up being outputted or echoed, rather than added to my variable. What am I overlooking?

    Thanks,

    Z-247

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • hi,

    here’s a sample snippet

    function em_test(){
     global $post;
     $pid = $post->ID;
     $events = EM_Events::get( array( 'post_id' => $pid ) );
     foreach( $events as $EM_Event ){
      echo $EM_Event->output('#l');
     }
    }
    add_action('wp_head','em_test');
    Thread Starter z-247

    (@z-247)

    Thanks, aglonwl,

    Although I’m realizing that my original question may not have really addressed my goal well enough (or I’m missing how to connect what you gave me to what I’m doing.)

    I’ve got my events-list page grouped Daily, and I’m just trying to plug in an anchor with the name of each day of the week next to each day’s title. Something like this:

    <h2>Wednesday</h2><a name="Wednesday"></a>

    On the Events Page formatting options, I started with <a name="#l"></a> in the “Default event list format header” section, but the placeholder doesn’t convert. I just get <a name="#l"></a> again. Is this because when it’s loading the format header, there’s no event to pull a day from, even though the day for the daily grouping is already there?

    The code you gave me worked on the individual event posts, of course, outputting the name in the head. But can it be applied to the events list somehow as well? I couldn’t get it to show up anywhere there, even with a few modifications (like just having it echo it’s results.)

    I’ve looked in the templates/events-list.php file, and I see references to

    $args['mode'] = get_option('dbem_event_list_groupby');
    	        echo em_events_list_grouped($args, get_option('dbem_event_list_groupby_format',''));

    I’m not seeing where that gets to specific elements (like why the daily grouping titles are <h2> instead of <h3>, for instance.)

    Thanks for your help,

    Z-247

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Events Manager] get a placeholder instead of output?’ is closed to new replies.