$post should be a post ID (so $post->ID if you’ve got the global $post object in scope)
the function call parameters are:
$id
: the id of the post (integer)
$keyname
: a string containing the name of the custom field
$single
: boolean – true means return a string for the first value, false means an array of all values for the key
The codex page is here: http://codex.wordpress.org/Function_Reference/get_post_meta
You can also try get_post_custom_values($key, $post_id)
Where $key
is the ‘name’ of the custom field you want to retrieve. $post_id
is optional, and defaults to the current post.
Related Posts:
- What is the difference between “SMS Push” and “WAP Push”?
- Proper usage of wp_is_mobile()?
- How do I make my blog iPad / iPhone / Android friendly?
- WordPress REST endpoint with JSON for Mobile App integration
- WordPress on WP7
- Developing mobile version of WordPress site
- How can i disable a plugin for a mobile phone?
- How can I make a wp site in a mobile application?
- Why I am getting Parse error: syntax error when I use ‘wp_is_mobile’?
- Mobile Menu Not Showing
- Is there any mobile application for WordPress? [closed]
- detect screen width in functions
- A URL that links specifically to the mobile version of my site?
- How to disable/enable specific plugins for a mobile theme?
- Elements floating on top of each other when Resizing or checking site on mobile. Twenty Twelve
- Mobile theme not showing correct page after custom re-writes
- My website is not responsive on mobile devices
- Best method for loading content on mobile – issue with wp_is_mobile
- Why is only one page responsive? [closed]
- Strategy for making a mobile version of an existing site? [closed]
- How can I redirect mobile users to diff url, but also allow them to come back to full site
- Open Menu is not working in Mobile view [closed]
- WordPress website loads fine on desktop browsers but Safari for iOS cannot load it completely [closed]
- Static page for desktop or mobile
- $is_iphone – to redirect a page
- Quick login from mobile phone
- How can I use my blog page as the homepage but only for mobile/tablet visits?
- Dropdown menu not displaying in handheld slide menu effect
- create a button in the header of the mobile menu in the middle of the logo and the menu accordion
- How to disable the topbar in mobile? [closed]
- WordPress mobil will not scroll
- Disable rendering of objects on mobile/above certain screen resolution
- Adapting “wide with” Gutenberg blocks for mobile
- Close Mobile Slide Menu on Click
- How can I hide/show text only for mobile users?
- Different Home page for Mobile without changing URL
- App in wordpress doesnt fit to mobile screen
- Add audio post from smartphone
- Display posts on a map
- responsive website
- Mobile Menu not working on TwentyThirteen child theme
- change theme when on mobile and also on Ipad portrait view
- Subdomain for WP Mobile Edition and Cloudfare
- How can I stop Jetpack mobile theme from using full size featured images?
- website is viewing as mobile, how do I turn this off?
- Work on two different themes at the same time in wordpress
- How to disable fancybox on small screens
- Add exception to WP Mobile Detector
- Using WordPress as a Mobile App Backend
- WordPress Mobile Edition not working with WP v3.5
- Why doesn’t the mobile version of my website take updates?
- Links not showing up on “AMPforWP”
- Viewing a WordPress website in landscape [closed]
- different startsite for IOS and change menu
- wordpress fancybox responsive mobile or pc version [closed]
- Separate Mobile site
- How to print to the console in Android Studio?
- Is wp_is_mobile() effective?
- wordpress json custom taxonomy problem
- How can I have two different urls for the same page that load two different templates?
- Change the default number of posts to show on mobile version
- Disable Linked Gallery Images If Mobile Browser
- How to switch css files according to devices and button click?
- Styleswitcher or themeswitcher to allow user to switch back to standard view from mobile device
- TwentyTwelve child theme mobile menu not working
- How to set different settings for a mobile theme?
- Free starter theme to make mobile websites? [closed]
- Convert WP Menu to a Drop Down for Mobile browser
- Mobile version issue when domain forwarding with masking
- How Do I Use A Custom Mobile Theme?
- Multiple amp-image overlays. How to properly do this in wordpress?
- PowerPress mobile media player
- Issue with loading mobile specific custom single page layout in mobile
- WP page 404 error only on mobile
- Disable wp_is_mobile()
- Content not shown on some older browsers and mobile devices (SGS3)
- How do I provide for multiple crops of the same image in a theme?
- Contact form submit, having to click twice
- Mobilepress fails to translate short codes
- First Image not loading on Mobile Version of Website
- (Mobile) Hamburger menu disappeared from a page (only one)
- Top bar menus not showing on mobile
- Jump to Footer On Scroll – Woocommerce Pages Phones Only
- Mobile menu displays submenus on top of parent. Need it to display right below on an own line
- Forms cut off when on mobile
- WordPress mobile version is not responsive anymore after installing varnish
- Remove metatag from a particular page
- Unable to login to a https website via the app after changing from http
- How to display different blocks for mobile and desktops
- show desktop version of website if button is submited
- Reliable method to detect mobiles
- Making a custom CSS per mobile
- Make a paginated article (for easier reading on mobile)
- Getting error when trying to redirect WP site to mobile site
- get_the_excerpt on mobile still displays continue reading
- Theme files and imagesnot loading on a mobile device
- Redirect to other page when mobile
- Font size on image captions on mobile
- Bootstrap 4 mobile menu not working for WordPress Development
- How can I only show one responsive menu on mobile devices?