Just write a if statement using the get_post_meta
like this
<?php if(get_post_meta($post->ID, '_url', true)){?>
<p> Display some stuff.</p>
<?php } ?>
There is an example here http://codex.wordpress.org/Function_Reference/get_post_meta
Related Posts:
- Display a query with multiple post types and same relationship on a single page
- WordPress Custom Post Types with a page as a parent?
- List page for custom post type?
- Limit Authors to their Own Posts on front-end excluding admins
- How to redirect all pages of a custom post type [duplicate]
- Show ACF field from custom taxonomy and display on the single template
- Display children and grandchildren of a custom post type
- is_page_template not working as expected
- Return array of categories to php function for current post
- Create a random unique 6 digit number as custom field for custom post type
- Loading all files within a directory
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Get Post Primary Category
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- How to make sure content doesn’t display if selection is empty
- How to customize a permalink (URL) structure?
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- I’d like to cycle through existing posts in a post type, showing one per day ordered by title, and starting over when the last is reached
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- How to Create Columns with WordPress and CPTUI display page ?
- How can I move (or create another) publish button?
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Category.php template for custom posts
- Custom post type causes php-error in php version 5.2.17
- WP_Query Custom Post Type if Category ID Equals
- Assign category a default post type
- Control content before and after custom post type loop
- How to use a variable as a function name?
- Check IF single OR multiple custom data has been entered
- Displaying custom post types as a gallery
- Is there a way to create two template for single custom post type page?
- Different options per post type in WP_Query
- Pagination hitting 404 page on /page/4
- Get posts from Custom Taxonomy
- How do I create a new post upon registration with the users first and last name as title
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Shortcode is displaying the content on top of the page [duplicate]
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- I’m trying to create a custom version of the wp_list_authors function that includes custom post types
- Using Wp_Query, Json to add Highcharts series data
- How do I show my containing my custom field ONLY if there is a set value on that custom field? [closed]
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Function to erase every post from a taxonomy
- Using page title as a link to term archive
- How to display custom post type only on a certain page?
- Setup page template array in a custom post type
- Group episodes by seasons
- pagination for custom post type archive page
- How to get post count of specific taxonomy that have store name & category
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- CPT loop doesn’t seem to account for post date?
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Is it possible to get the specific content on the search page?
- How to change Elementor Template for Single Page Post on Load
- Alike Shortcode using in Custom Shortcode
- Action on Custom Post publish
- Why it doesn’t create a custom post type after form submitting
- Persist meta box choices throughout all posts of same post type
- Do not show child pages within a file page
- Search result based on URL
- Filter Custom Post Type Posts by Taxonomy
- Using WordPress custom post type to display StoryMapJS
- Change Search display for Custom Post Type
- Custom search for a custom post type in WordPress
- Stored meta from attachment, video length?
- tax_query not working?
- Add active class to foundation 6 tabs while looping categories
- How to make a shortcode for my WP_Query Loop? [duplicate]
- WordPress query posts by custom post type not workng
- WP_Query return highest number only
- Show custom taxonomy not in submenu
- Can’t pick up a field created with Advanced Custom Fields
- Pods pagination erases my sub menu
- Loop carousel slider in wordpress
- Why is my custom post type slider only displaying the latest slide?
- Custom post tag images not displaying with ACF
- Function not pulling image or text from custom post type
- using ACF datepicker to filter posts on a page
- WordPress multi-query not returning as expected
- How to loose the image ‘alt’ attribute in my custom post type?
- Looping taxonomy in taxonomy?
- Permalink of Custom Post Type
- posting twice from an array?
- Pagination not working on homepage
- Custom Loop for custom post type. Compare by meta_value?
- Query Custom Post Type by Tag
- Order custom post type is beign ignored
- How do I filter a custom post type loop by a field?
- How to manage wordpress knowledge base/wiki/posts collections
- How to string lines from the_content() hook in WordPress?
- Get custom post fields and display them
- PHP Button Custom link [closed]
- Getting ACF relationship field information
- How to dynamically register custom post type
- How to I add count of custom posts listed in a post as a prefix to its title
- how to display custom taxonomies in front page