Skip to main content
1 of 2
marctain
  • 567
  • 3
  • 8
  • 19

How to display data from custom fields I created?

I created an options page to ad gigs as custom posts in my theme. This is in my functions.php

    $config = array(
    'id' => 'gigs-info',
    'title' => 'Gig Info',
    'pages' => array('gig'),
    'context' => 'normal', 
    'priority' => 'high', 
    'fields' => array(), 
    'local_images' => false,
    'use_with_theme' => false //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
);
$my_meta = new AT_Meta_Box($config);

//Add fields to your meta box
$my_meta->addText($prefix.'where',array('name'=> 'Where is the Gig '));
$my_meta->addDate($prefix.'when',array('name'=> 'When is the Gig '));
$my_meta->addTime($prefix.'start_time',array('name'=> 'When Does it Start '));
$my_meta->addTime($prefix.'end_time',array('name'=> 'When Does it End '));
$my_meta->addText($prefix.'with_who',array('name'=> 'With Who is the Gig '));
$my_meta->addTextarea($prefix.'words',array('name'=> 'A few words on the gig '));
$my_meta->Finish();
}

How do I display the content of these various fields in my index.php?

marctain
  • 567
  • 3
  • 8
  • 19