Add Code to Another Page
-
I’d like to display the table that shows what a user has signed up for to a template page but can’t seem to get it to display correctly. Any ideas? Here’s the complete code if anyone has any ideas:
<?php /* Template Name: Template History * * @package Swift * @subpackage Template * @since 6.0 */ get_header(); ?> <div id="content" role="main"> <div class="div-content"> <?php swift_before_content() ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'display/post', 'page' ); ?> <?php $signups = apply_filters( 'pta_sus_user_signups', $this->data->get_user_signups($current_user->ID) ); if ($signups) { $return .= apply_filters( 'pta_sus_before_user_signups_list_headers', '' ); $return .= '<font size="3" face="arial"><strong>'.apply_filters( 'pta_sus_public_output', __('You Signed Up for These Positions', 'pta_volunteer_sus'), 'user_signups_list_headers_h3' ).'</strong></font></br>'; $return .= '<font size="2" face="arial"><i>'.apply_filters( 'pta_sus_public_output', __('IMPORTANT: Email the <a href="mailto:'.esc_attr($sheet->chair_email).'">Committee Head</a> if you Need to be Remove from a Position', 'pta_volunteer_sus'),'user_signups_list_headers_h4' ).'</i></font>'; $return .= apply_filters( 'pta_sus_before_user_signups_list_table', '' ); $return .= ' <table class="pta-sus-sheets" cellspacing="0"> <thead> <tr> <th class="column-title" bgcolor="#EEEEEE">'.esc_html($title_header).'</th> <th class="column-date" bgcolor="#EEEEEE">'.esc_html($date_header).'</th> <th class="column-task" bgcolor="#EEEEEE">'.esc_html($this->task_item_header).'</th> <th class="column-time" bgcolor="#EEEEEE" style="text-align:right;">'.esc_html($this->start_time_header).'</th> <th class="column-time" bgcolor="#EEEEEE" style="text-align:right;">'.esc_html($this->end_time_header).'</th> <th class="column-details" bgcolor="#EEEEEE" style="text-align:left;">'.esc_html($this->item_details_header).'</th> </tr> </thead> <tbody>'; foreach ($signups as $signup) { $clear_args = array('sheet_id' => false, 'task_id' => false, 'signup_id' => (int)$signup->id); $clear_url = add_query_arg($clear_args); $clear_text = apply_filters( 'pta_sus_public_output', __('Clear', 'pta_volunteer_sus'), 'clear_signup_link_text'); $return .= '<tr> <td>'.esc_html($signup->title).'</td> <td>'.(($signup->signup_date == "0000-00-00") ? esc_html($this->na_text) : date_i18n(get_option("date_format"), strtotime($signup->signup_date))).'</td> <td>'.esc_html($signup->task_title).'</td> <td style="text-align:right;">'.(("" == $signup->time_start) ? esc_html($this->na_text) : date_i18n(get_option("time_format"), strtotime($signup->time_start)) ).'</td> <td style="text-align:right;">'.(("" == $signup->time_end) ? esc_html($this->na_text) : date_i18n(get_option("time_format"), strtotime($signup->time_end)) ).'</td> <td style="text-align:left;">'.((" " !== $signup->item) ? esc_html($signup->item) : esc_html($this->na_text) ).'</td> </tr>'; } $return .= '</tbody></table>'; $return .= apply_filters( 'pta_sus_after_user_signups_list_table', '' ); } ?> <?php //swift_content_nav( 'nav-below' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> <?php swift_after_content() ?> </div> <!-- #content --> </div> <!-- #primary --> <?php get_sidebar(); ?> <?php get_sidebar('bbPress'); ?> <?php get_footer(); ?>
https://www.ads-software.com/plugins/pta-volunteer-sign-up-sheets/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add Code to Another Page’ is closed to new replies.