'aldo_one_workout'); $plantext = ''; foreach(get_posts($args) as $item){ //$content .= print_r($item); $aldo_one_workout_title = $item -> post_title; $aldo_one_workout_url = $item -> guid; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '

' . $aldo_one_workout_title . '

'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= ''; $plantext .= '
'; $plantext .= '
'; $plantext .= '
    '; $plantext .= '
  • ' . get_post_meta($item->ID, 'ao_workout_type', true) . '
  • '; $plantext .= '
  • ' . get_post_meta($item->ID, 'ao_workout_intensity', true) . '
  • '; $plantext .= '
  • ' . get_post_meta($item->ID, 'ao_workout_main_goal', true) . '
  • '; $plantext .= '
  • ' . get_post_meta($item->ID, 'ao_workout_duration', true) . '
  • '; $plantext .= '
'; $plantext .= ''; $plantext .= '
'; $plantext .= '
'; $plantext .= '

' . get_post_meta($item->ID,'ao_workout_description',true) . '

'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; } $content = preg_replace("/\[aldoOne-workout\]/", $plantext, $content); } return $content; } } add_action('the_content', array(new add_aldoOne_workout(), 'aldoOne_workout_rewrite_post')); ?>