Is there a way to add a source link at the end of an article like TechnoBuffalo (scroll down to end of post) with a plugin?
If someone could find a plugin or quickly make one for me that would be great.
Is there a way to add a source link at the end of an article like TechnoBuffalo (scroll down to end of post) with a plugin?
If someone could find a plugin or quickly make one for me that would be great.
You must be logged in to post a comment.
Thats what meta_boxes are for. First you need to register the metabox within the page or post with the function add_meta_box. Then you want to get that value with get_post_meta on the page where you want the “Source”.
This goes into your functions.php file:
This code register the meta_box and stores the value in post_meta as “_source_link”.
It will look like this:
Then you want to get the value in the post, Use get_post_meta:
You should read about:
add_meta_boxes,
update_post_meta and
get_post_meta
You can use ACF,
Source: <a href="<?php echo get_field('url_field'); ?>"><?php echo get_field('link_text'); ?></a>