shortcodes.php 658 Bytes
<?php

add_shortcode( 'firstname', 'firstname' );

function firstname(){
    $user = get_userdata( get_current_user_id() );
    return "<h1>Hi ".$user->first_name."</h1>";

}


add_shortcode( 'event_list_tz', 'event_list_tz' );

function event_list_tz(){
    ob_start(); ?>
<div id="events_list_con">
<table id="events_list">
<tbody>
[events_list ]

<tr>
<td class="date_col"> 
<div class="date">
<span class="month">#M</span>
<span class="day">#d</span>
</div>
</td>
<td>
#_EVENTLINK <br>
<span class="location">#_LOCATION</span>
</td>
</tr>

[/events_list]
</tbody>
</table>
</div>
<?php
    $output = ob_get_clean(); 
    return do_shortcode($output);

}