how to turn a link field into a button or link text
probably using a a tag $youtube_url=”https://youtube.com”; ?> <a href=”<?php echo $youtube_url; ?>”>youtube</a> this will appear on the browser like this <a href=”https://youtube.com”>youtube</a>
probably using a a tag $youtube_url=”https://youtube.com”; ?> <a href=”<?php echo $youtube_url; ?>”>youtube</a> this will appear on the browser like this <a href=”https://youtube.com”>youtube</a>
Here’s what I use: <?php global $current_user; wp_get_current_user(); ?> <?php if ( is_user_logged_in() ) { echo ‘User ID: ‘ . $current_user->ID . “<br>”; ?> <a href=”<?php echo $current_user->favorite_url;?>”>View</a> <?php } else { wp_loginout(); } ?> You can just use the ID you have and change $current_user->ID to $current_user->user-country
Automatically Add Custom Fields Value as Tags
Automatically Add Tags Taxonomy in Post from Custom field’s value
Best way to insert a list of links into a post outside of the_content
Missing Custom Fields
On input, esc_url_raw() is the correct function to use which replaces sanitize_url Example : $custom_field = esc_url_raw( get_post_meta( get_the_ID(), ‘_custom_url’, true ) );
If you are querying all posts at once with ‘posts_per_page’=> -1 it would be easiest to get all posts as an array, update title if needed, and sort them after. The disadvantage of that approach is you would have to update your loop to use properties instead of functions i.e. instead of the_title(); you would … Read more
How to set up page fields with gutenberg instead of ACF
Search & column order by meta value in admin