Title: Extra Meta Data Fields shortcode
Last modified: April 11, 2025

---

# Extra Meta Data Fields shortcode

 *  Resolved [NoWe](https://wordpress.org/support/users/nowe/)
 * (@nowe)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/extra-meta-data-fields-shortcode/)
 * I have added some extra Meta Data fields like email and url
   this all works fine
   using wpsl_meta_box_fields’email’ => array(‘label’ => __( ‘Email’, ‘wpsl’ ))
 * I was wondering if it is possible to turn these extra meta fields into shortcodes
   
   This would make it possible to place them anywhere on the page

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/extra-meta-data-fields-shortcode/#post-18411347)
 * Hi there, thanks for writing.
 * I’m afraid that is not possible out of the box. However, it could be possible
   to [build your own shortcodes](https://developer.wordpress.org/reference/functions/add_shortcode/)
   in your functions.php file to retrieve those metadata fields from the WordPress
   database, but that is outside the scope of our support and it is something you
   should try and do yourself, sorry about that.
 * Best regards,
 *  Thread Starter [NoWe](https://wordpress.org/support/users/nowe/)
 * (@nowe)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/extra-meta-data-fields-shortcode/#post-18412177)
 * function display_wpsl_phone_number() {
 *     global $post;
 *     $phone = get_post_meta( $post->ID, ‘wpsl_phone’, true );
 *     if ( $phone ) {
 *         return ‘<i class=”fas fa-id-badge”></i> <a href=”tel:’ . esc_attr( $phone).‘”
   >’ . esc_html( $phone ) . ‘</a>’;
 *     }
 *     return ”;
 * }
 * // Register shortcode
 * add_shortcode(‘wpsl_phone_number’, ‘display_wpsl_phone_number’);
   which gives 
   the following shortcode[wpsl_phone_number]
    -  This reply was modified 1 year, 1 month ago by [NoWe](https://wordpress.org/support/users/nowe/).
      Reason: solution
    -  This reply was modified 1 year, 1 month ago by [NoWe](https://wordpress.org/support/users/nowe/).
      Reason: red

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Extra Meta Data Fields shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [NoWe](https://wordpress.org/support/users/nowe/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/extra-meta-data-fields-shortcode/#post-18412177)
 * Status: resolved