Title: Linkrel &amp; Custom Post Meta
Last modified: August 31, 2016

---

# Linkrel & Custom Post Meta

 *  [longvo55](https://wordpress.org/support/users/longvo55/)
 * (@longvo55)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/linkrel-custom-post-meta/)
 * Hi guys,
    I want to add prerender and prefetch to the footer.php and these links
   depend on which page is being loaded.So the prerender/prefetch links are chosen
   individually from particular page/post
 * So far I have figure what to put in footer.php and my theme metaboxes.php file
 * **footer.php:**
 * $link_prefetch = (get_post_meta($id, ‘link_prefetch’, true) !== ” ? get_post_meta(
   $id, ‘link_prefetch’, true) : false);
 * <link rel=”prefetch” href=”<?php echo $link_prefetch ; ?>”>
 * and
 * $link_prerender = (get_post_meta($id, ‘link_prerender’, true) !== ” ? get_post_meta(
   $id, ‘link_prerender’, true) : false);
 * <link rel=”prefetch” href=”<?php echo $link_prerender ; ?>”>
 * **metaboxes.php:**
 * array(
    ‘label’ => ‘Link Rel Prefetch’, ‘id’ => ‘link_rel_prefetch’, ‘type’ =
   > ‘list-item’, ‘settings’ => array( array( ‘label’ => ‘Link Prefetch’, ‘id’ =
   > ‘link_prefetch’, ‘type’ => ‘page_select’, ), ) )
 * The only thing is I don’t know how to write the proper php line to make it keep
   adding new link_rel to the footer.php as I add more in each page via post meta.

The topic ‘Linkrel & Custom Post Meta’ is closed to new replies.

## Tags

 * [footer.php](https://wordpress.org/support/topic-tag/footer-php/)
 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [prefetch](https://wordpress.org/support/topic-tag/prefetch/)

 * 0 replies
 * 1 participant
 * Last reply from: [longvo55](https://wordpress.org/support/users/longvo55/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/linkrel-custom-post-meta/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
