Title: Create a link box
Last modified: August 22, 2016

---

# Create a link box

 *  Resolved [rookdesigns](https://wordpress.org/support/users/rookdesigns/)
 * (@rookdesigns)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/)
 * Hello, great plugin, by the way. I am using your plugin to display four content
   blocks on a page, one of which I want to be a link. How would I use the blocks
   in the page template to create two one liners, one which is the title of the 
   link and one which is the link itself? so the admin input will be two boxes one
   title “link title” and one titled “link”, the user would paste their link into
   the “link” box and choose a custom title for the “link title” box. On the front
   end this would display as just the title.
 * cheers for the plugin and for any help in advance.
 * All the best
 * Harry
 * [https://wordpress.org/plugins/multiple-content-blocks/](https://wordpress.org/plugins/multiple-content-blocks/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Harold Angenent](https://wordpress.org/support/users/harold-angenent/)
 * (@harold-angenent)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/#post-5408498)
 * I would advice you to create your own meta box for something like this. That 
   would be faster and more reliable.
 * If you really want to use MCB, I would probably do something like this:
 *     ```
       <a href="<?php
           the_block( 'link', array(
             'label' => __( 'Link', 'text-domain' ),
             'type'  => 'one-liner',
           ) );
         ?>">
         <?php
           the_block( 'link-title', array(
             'label' => __( 'Link title', 'text-domain' ),
             'type'  => 'one-liner',
           ) );
         ?>
       </a>
       ```
   
 * You can find some more documentation over here: [https://github.com/trendwerk/multiple-content-blocks](https://github.com/trendwerk/multiple-content-blocks)
 *  Thread Starter [rookdesigns](https://wordpress.org/support/users/rookdesigns/)
 * (@rookdesigns)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/#post-5408512)
 * Hi Harold
 * Cheers, been trying to get my head around meta boxes for too long now, can’t 
   seem to do it. What you gave me nearly works except that you can’t have a php
   block inside the quotation marks, it doesn’t get read properly.
 * Thanks for your help
 * All the best
 * Harry
 *  Plugin Author [Harold Angenent](https://wordpress.org/support/users/harold-angenent/)
 * (@harold-angenent)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/#post-5408515)
 * Hi Harry,
 * I could give you an example here: [http://pastebin.com/UrtmeMQp](http://pastebin.com/UrtmeMQp)
   
   This has three fields and is assigned to the post type ‘testimonials’. Edit however
   you like.
 * For MCB you could use the options `'apply_filters' => false` in the array.
 * Regards,
    Harold
 *  Thread Starter [rookdesigns](https://wordpress.org/support/users/rookdesigns/)
 * (@rookdesigns)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/#post-5408526)
 * Brilliant, the apply_filters worked a charm, and also thank you for the pastebin
   link, I will have a look through that, see if I cant get my head around it.
 * cheers for all your help.
 * All the best
 * Harry

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Create a link box’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multiple-content-blocks.svg)
 * [Multiple content blocks](https://wordpress.org/plugins/multiple-content-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-content-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-content-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-content-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-content-blocks/reviews/)

## Tags

 * [box](https://wordpress.org/support/topic-tag/box/)
 * [content](https://wordpress.org/support/topic-tag/content/)
 * [href](https://wordpress.org/support/topic-tag/href/)
 * [link](https://wordpress.org/support/topic-tag/link/)

 * 4 replies
 * 2 participants
 * Last reply from: [rookdesigns](https://wordpress.org/support/users/rookdesigns/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/create-a-link-box/#post-5408526)
 * Status: resolved