Insert php generated content into page

I’ve been trying to figure out how to do this for a few days now, and think that I’m going down a total waste of time path to get to where I think it should be simple …

I created a Pod to record a very simple ‘schedule’ for when people are working, basically records, per person:

Day of Week / Hours Working / Any Notes for that day

The problem is, how do I pull that up into the page? There is no way to ‘write php code’ to process the data and display it ( security reasons, I understand that ) … so what I’ve been play with is creating a tpl-schedule.php file within the child theme, attached that to a page and writing the code … it works as I want it to, but I’m spending alot of time trying to format things into the site itself, where BB/BB Themer already have all of that information.

There has to be an easier way … I’ve only started to use BB ( took over project from someone that designed it with it ) and have been suitably impressed … I just need to be able to extend things in ways that I seem to be outside of realm …

… long story short, I have seen some folks about about custom modules, and am not afraid to dive into that, but is this the route I should be following ( vs building tpl files in the child theme )?

Short and simple question: is custom module what I want to do for this, or is there a better way that I’m just not finding?

Thanks …

Sample of the code is as follows … its not complicated:

<?php

  $params = array (
                     'where' => 'week_starting.meta_value = date ( curdate() - weekday(curdate()) )'
                  );

  $mypod = pods( 'schedule' );
  $mypod->find( $params );

?>
  <strong><?php echo date( 'l, F jS, Y', strtotime( 'monday this week' ) ); ?></strong><p />
<?php
  while ( $mypod->fetch() ) {
    if( strlen($mypod->display( 'mon_hours' )) > 0 ) {
      $url = '<a href="/empl/' . strtolower($mypod->display( 'name_of_empl' )) . '">' . $mypod->display( 'name_of_empl' ) . '</a>';
      $hours = " : " . $mypod->display( 'mon_hours' );
      $comments = '';
      if ( strlen ( $mypod->display( 'mon_comments' ) ) > 0  ) {
        $comments = " : " . $mypod->display( 'mon_comments' );
      }
      echo $url . $hours . $comments . "<br />";
    }
  }
?>

I would suggest you read up on how shortcodes work, you can isert them anywhere.

What I ended up doing was following the instructions on how to build a module that does what I want, which seems to have worked perfectly.

Is creating a shortcode just a different method of doing the same thing? I found the Codex docs on shortcodes … haven’t tried writing one yet, but understand the concept … is one recommended over the other?