This is how I would code this:
$url = get_post_meta( get_the_ID(), 'mblink', true );
if ( ! empty( $url ) ) {
print '<a href="' . esc_url( $url ) . '">MBLINK</a>';
}
Related Posts:
- Reposition WooCommerce breadcrumb outside of wrapper content
- Display all values of custom a field created with ACF on a page
- How do I directly access a PHP file located in my themes folder?
- wpdb::prepare was called incorrectly
- WordPress the_content() return only one image from a specific category
- count number of user comments with a specific comment meta value
- How can I access the “description” of a menu item?
- Display all posts in current category
- file_exists() acting weird
- How do I know what variables are passed in a filter/action and what their meaning is?
- Remove “Remember Me” from login form
- Is it possible to use the featured image of a page as a css background without inlining?
- Wrap each shortcode in array to div
- How can I change WordPress domain from remote to localhost?
- Notify WordPress Site I Have Linked To Them
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Woocommerce filter cart and category specific quantity [closed]
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- items_wrap not working
- Problem adding class to body_class
- Shortcode API: How to get name that matched shortcode RegEx?
- Using shipped version of jquery
- Swapping wp_dropdown_categories function with wp_category_checklist
- How do I Add HTML to the_excerpt() & the_content() Output?
- User’s total comment count excluding comments on their own posts
- Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?
- Populate dropdown with Child Pages based on Parent Page chosen
- What’s the uses of wp_cache_set() or wp_cache_add()?
- Create Page To Count Comments For Each Post In WordPress Site
- Why my image upload button is not working in wordpress widget area?
- How does wp_enqueue_scripts work?
- How to get post’s current parent term ID?
- Problem with login form
- Use of wp_insert_post and parameters
- WordPress theme options error
- How would an if statement surrounding a custom field with two variables (holding values) look like?
- get_the_title() gets printed out twice
- Moving code from theme header to functions.php
- What does this mean in wordpress? Easy question
- Path for php file for inserting data through html form
- How to create pagination for users list using custom array?
- Add shortcode in my div
- Syntax error in a shortcode function
- Execute a function every hour in the background
- Hide a div to subscribers(user role) in one page (is_page)
- CSS change in woo commerce Place Order Text [closed]
- One account with multiple logins
- Known Issues in WordPress When Upgrading PHP to ver 7
- Can’t get url_to_postid to work
- .html end of URl affected to SEO?
- Comapare get_user_meta value
- How to get property out of image object
- Only show posts from the last trailing 12 months
- `update_post_meta` not working anymore
- Cannot modify header information – server cache
- Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin
- Filter unique custom field value based on custom taxonomy category or other custom field
- How can I restrict access to a widget to admins only?
- Create Columns with Custom Walker and CSS Classes
- Why would the child theme load in the Customize preview, but not on the site itself?
- Sending simple variable on single page to WP JSON
- Hide a div if the fiels is empty
- How to display acf field values from home page on all pages?
- Illegal string offset checkbox
- current_time function incorrect in plugin and PHP, not in WordPress admin
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- Weird fonts showing which are coming from database
- Don’t update modified post date when user add a product review or comment?
- Mysterious letters appearing at the top of a few pages
- How can i show specific Category List?
- I got big white screen when i attach main style sheet of Html in functions.php
- Using Javascript On Page – Header and Footer Now Missing
- wp_remote_request to url with port 8001 not woorking
- Change headers for one custom PHP file
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Customizer textarea with script tag won’t work in live preview
- Changable favicon
- Styling a specific post after hovering over it
- WordPress file upload
- How do you change the tag font size in the repeater-template.php [closed]
- PHP tag in post content makes wordpress go crazy
- Inline Styling a div from a Custom Metabox
- How can I turn a url with get method as a clean url with segment as the get method?
- insert thumbnail image from php script
- WordPress rating by views [closed]
- 403 (Forbidden) delete file image in themer folder
- Limit the number of successful logins
- How to call a certain object/menubar in a PHP file
- Setting pages for posts
- Dynamic Gallery
- Blog only showing code
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Get null from POST
- How to have post count after each listed category
- why is markup routinely placed in functions in wordpress?
- A better way to write this php function
- Custom taxonomy with page post type – WordPress
- Alternative to php echo within code
- Why does WordPress not send the user the email to add a password?
- How to put a class in the p tag automatically added by the_content() in the wordpress loop?