Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5928481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:17:50+00:00 2026-05-22T14:17:50+00:00

im using this WordPress Metabox framework: http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html here is the code array( ‘name’ =>

  • 0

im using this WordPress Metabox framework: http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html

here is the code

array(
        'name' => '<strong>Robots Meta</strong>',           
        'desc' => '',                           
        'id' => $prefix . 'robot',               
        'type' => 'radio',                       
        'options' => array(                       
            'if' => 'index, follow',
            'in' => 'index, nofollow',
            'nf' => 'noindex, follow',
            'nn' => 'noindex, nofollow'
        ),       
    ),

how do i call the value of each of the radio values in the template?

i tried doing this but it only checks if it is set or not:

$metas = get_post_meta(get_the_ID(), 'hiro_robot', false);


foreach ($metas as $meta) {
    echo $meta;
}


if (in_array($val, $metas)) {
    echo "$val is set";
} else {
    echo "$val is not set";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:17:50+00:00Added an answer on May 22, 2026 at 2:17 pm

    I like to use a short helper function for grabbing meta values.

    function c3m_get_field($key, $echo = FALSE) {
    global $post;
    $custom_field = get_post_meta($post->ID, $key, true);
    if ($echo == FALSE) return $custom_field;
    echo $custom_field;
    }
    

    When using this anytime you want to echo the value of a meta key you can use:

    c3m_get_field('key', TRUE);
    

    If you want to return the value:

    c3m_get_field('key', FALSE);
    

    Also in your answer you don’t need to use the get_the_ID() function just use $post->ID

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried to move WCF to NetDataContractSerializer using the code in this post: http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate
I want to use this function: http://www.frankmacdonald.co.uk/php/post-to-wordpress-with-php.html Its used to post to Wordpress using
Im using this code http://platinumdogs.wordpress.com/2008/10/30/net-c-impersonation-with-network-credentials/#comment-770 to connect from a machine in the domain to
I'm using this piece of code I found ( http://impnerd.com/wordpress-hack-add-post-images-to-your-homepage ) to display the
I'm using this zoom script on my site: http://www.gcmingati.net/wordpress/wp-content/lab/jquery/minizoompan/ At present, the default setup
I am using this plugin in Wordpress http://www.iwebix.de/front-slider-wordpress-plugin-demo/ As you can see in the
I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/ But I saw that it has already been built into
I'm using this android calendar http://w2davids.wordpress.com/android-simple-calendar/ and attempting to populate it with events. In
In WordPress I am using this code in my functions echo <script type=\text/javascript\> which
I am using this code in wordpress to display different content when different pages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.