Use make_clickable()
function:
add_action( 'genesis_entry_footer', 'custom_comments_field' );
function custom_comments_field() {
if ( is_single() && genesis_get_custom_field('Comments link text') ) :
echo '<div class="comments-link">'. make_clickable( genesis_get_custom_field('Comments link text') ) .'</div>';
endif;
}
UPDATE:
In that case, try this:
add_action( 'genesis_entry_footer', 'custom_comments_field' );
function custom_comments_field() {
if ( is_single() && genesis_get_custom_field('Comments link text') ) :
global $post;
echo '<div class="comments-link"><a href="'. get_permalink( $post->ID ) .'">'. genesis_get_custom_field('Comments link text') .'</a></div>';
endif;
}
Related Posts:
- How to enable custom fields for pages (if not a bad practice)?
- Add a Jquery Datepicker to custom field in post edit
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Using wordpress post data as input for google visualisations
- Custom per-page sidebar widgets .. possible?
- Does wordpress have something like content-type?
- Order Posts by Closest Numeric Values
- How to get and edit custom fields if in Quick Edit
- Order posts by custom field and if custom field is empty return remaining posts
- Unable to save datetime custom meta field using update_post_meta() function
- Guest Author – How can I use custom fields to create guest author link?
- Create additional short URL with custom field and 301 redirect
- Create custom field on post draft or publish?
- enabling custom fields in admin?
- get_post_meta fields don’t show up on posts page
- Using custom fields in a filter hook
- Add a post meta key and value only if it does not exist on the post
- Function to change meta value in database for each post
- Sorting posts by multiple values, combined
- How to Identify the Source of a Custom Field?
- Include woocommerce custom field value in front-end search result
- WP_Meta_Query causing long-running MySQL queries
- trim custom field text value and show (…)
- Duplicate posts being displayed when querying Custom Fields
- How to validate custom field on lost password form before the user id field?
- Json api does not return all metadata
- Use custom field as a variable
- MySQL Query that looks for post with Custom Field, then changes Category
- ACF: How to get the full field name (meta_key) by a field key?
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Tweak Meta for Post to work it for Pages also
- How to show a gloabl message on a user profile page (in back end)?
- Create Pop-Up Box with Custom Field Content Inside the Loop
- Adding an editable field to template?
- Transferring author information from a custom field to a proper author
- How to select posts from multiple categories and metavalues?
- Custom Meta Box (SELECT) Not Saving
- modify wordpress caption shortcode
- jQuery – Automatic event trigger does not **really** check my form
- Display URL in a Custom Field
- Linking Custom Fields to Database Records
- Stop sending email everytime I updates my post
- Best way to store everyday post views?
- Plot location on Google map using full address specified in custom field
- Display custom field value as a hyperlink
- pre_get_posts : only get posts by wp_usermeta value
- Display list of terms having the same custom field value
- How to display custom field in woocommerce email orders? [closed]
- Custom meta is not being saved
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- IF Custom field value equals ZERO
- Custom Field Repeating When Using foreach
- How can I activate custom fields checkbox in pages?
- Can I save post meta programatically without setting metaboxes?
- How to add a css class to custom field value?
- Show custom field on attachment page?
- Help setting up a sql query
- Advanced Custom fields not available yet during publish_page action
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- Sort posts by custom field value
- WP Insert post with post_thumbnail
- Help with this custom field conditional if no field is set display nothing
- if statement display content even though no data
- How to pass custom field value to shortcode?
- custom comment_form fields not displaying
- WP_Query () using taxonomy, custom post types
- Ordering by ‘Title’ OR ‘Custom Field’
- How can I add/update post meta in a admin menu page?
- Get custom post fields from multiple metaboxes
- Get author total post votes from post meta
- use custom field value as post category in loop
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Save custom field types with this function…?
- Compare ACF date field (if exists) and post date and order DESC
- Add WordPress user custom meta to chartjs vertically stacked chart in Divi theme
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- non-unique #_ajax_nonce id in browser console
- Delete a custom field in mysql for all posts with specific category id
- Trying to get custom field data in a simple plugin
- submitting form to admin-panel.php returns 500 error
- Sort columns in the ‘Pages’ dashboard overview
- Create Meta boxes dynamically
- Outputting custom field on home.php not outside of blog list
- I have a form with a custom button ,i want to add the field data to an database when clicking the custom button
- Add Image With Changeable Link in Custom Field [closed]
- change attachment custom field onChange event
- Custom field in external Javascript
- How to filter post using custom feild value in shortest and longest duration?
- Analyze uploaded images to get colour values
- Turn Current Date in Custom Field Ouput Green or Red
- list pages by custom_field?
- Get custom field from page, in a post?
- show custom field content in jquery tabs
- Make Custom Fields Public in JSON – API
- Advenced custom fields auto fill problem
- Custom Fields after update to WordPress 6
- How to apply Local Business Google Schema dynamically on a Custom Post single template?
- Add CSS class to posts with certain meta key
- Match submitted array fields with the MYSQL database fields to update them correctly in PHP
- Best way for managing images of ads banners