I think you can better use get_post_meta();
Your code will look like this:
<?php $site = get_post_meta(get_the_ID(), 'projLink', true); ?>
<?php if(isset($site) && $site != "") : ?>
<span><p><a href="https://wordpress.stackexchange.com/questions/38943/<?php echo $site; ?>">Visit the Site</a></p></span>
<?php else : ?>
<p><em>Live Link Unavailable</em></p>
<?php endif; ?>
You use var_dump only for testing purposes (http://php.net/manual/en/function.var-dump.php).
Related Posts:
- How to display by default only published posts/pages in the admin area?
- Find out who deleted a page or post?
- Post/Page Preview Template
- using wp_update_post on save_post
- Replace image attributes for lazyload plugin (data-src)
- Exclude drafts in all() view of edit.php
- WordPress plugin to publish to multiple remote WordPress blogs
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- How to display comments and comment form on custom post type?
- adding a custom css class to post
- Prevent duplicate posts in wp_insert_post using custom fields
- How to wrap every image in a post with a div?
- Show One Category on Post
- WordPress Delete hook with wp_delete_post function?
- Custom post type single (permalink) throws a 404 error
- Order post by year DESC and month ASC
- Do I use custom post type or something else?
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- Delete Post From Front-End and attachment permanently
- same template for multiple custom post type single
- if custom post type exist
- Custom post type permalinks breaking due to 3.1 bug fix
- ‘Invalid post type’ error when importing from one site to another
- Blogroll – Different layout for first post
- How to delete old posts’ edits to save space?
- Get post id in wordpress action?
- Run a function when post is deleted?
- Remove slashes (both before and after) in relative post url
- Edit custom post type admin menu link
- How to include a post type in the admin/backend?
- Get posts of ONE taxonomy term of custom post type
- WordPress Custom Fields (Checkboxes with multiple values)
- How to make number of blog posts a custom field?
- WordPress blog or WordPress website
- Using custom post template
- Custom Post Archive Page not working
- Hiding Draft Post In Admin
- Adding custom fields to bbpress reply form
- Adding buttons to Add New Post and Add New Page
- Making a custom Pagination for multi page blog post
- Permission issue with custom post type – not added to menu – by plugin
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Thumbnail & Category link aside post
- Custom post types related to same custom post type?
- Is it possible to customize the post according to post format in single.php?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- WordPress custom post type with folder structure in slug
- Check if a custom post type has already been created
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- Show custom post with custom categories with specific slug
- Display the 2nd category name of a custom post type without error if its null?
- How to call posts under a specific category on static front page?
- Querying another post category to match current post and display in loop
- datepicker value in mysql
- Optimize CPT-function with a loop
- Add post tags to previously created custom post type
- Simple Custom Metabox Not Saving
- How to display only one category in a custom post type?
- How to restore deleted post related with deleted users
- Custom Post Type Single Loop Outputting Wrong Post
- WordPress Post Deletion Issue
- How Can I Always Display A Particular Post First Using WP_Query?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Change modified date to current date when title updated automatically
- Turn off display for custom sidebar post widget when on the post it’s displaying
- How to bulk Update URLs to new values?
- How to put the author of the post in the comments?
- How to add a custom class attribute into code wrapper? [duplicate]
- Redirecting wordpress search query to archive page
- Include Recent Post in Category
- Pagination Not Working With Custom Post Type Category
- How to create custom search form function including post “tags”
- Hide or remove custom post status
- Please I want to prefix my WP posts title according to each category
- insert post fails after multiple postings
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Show custom post category for single post
- How can change header text in post careate/edit form
- How to get meta data from custom category name
- Difference between modified post and new post
- Creating widget – ask for selecting a post in the admin panel
- wp query custom orderby not custom field
- Custom Post Type doesn’t use single.php or single-{custom_post_type}.php
- Customizing individual images on posts
- How to retrieve custom field values and save again as array
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- How to modify specific parts of a post content in WordPress
- Include post on external custom site
- Run Jquery Script after delete post in front end
- Checking if some condition is matched before inserting post into database
- How to only allow post to be deleted if custom field doesn’t exist
- Successive creation of over 1000 posts causes 404?
- How can I allow users (subscribers) to download selected posts into a single PDF? (RESOLVED)
- adding custom meta as well as looping through posts
- Best way to enable sorting by 3 criteria on a page of listings
- How remove “recent comments” title without modifying code? [closed]
- How edit footer copyright info? [closed]
- How do I get content of custom post type through post ID
- WordPress Custom Post type csv exporter
- Edit Page button is gone