How to Add Linked List Posts to The GeneratePress Theme

How to Add Linked List Posts to The GeneratePress Theme

If you’ve been reading News47ell from the beginning, or you are a new reader who checked older posts, then I’m sure that you’ve noticed that I link to other sites Daring Fireball style.

Meaning, the title of specific posts in my RSS feed is actually a link to a site that I recommend you visit.

This has been done by many other sites that mainly cover Apple-related news such as MacStories and Brooks Review for example.

Today, I will teach you How to Add Linked List Posts to The GeneratePress Theme using the Daring Fireball-style Linked List WordPress Plugin By Yinjie Soon so you can have the same style of linking to other sites in your RSS feed as well as on your website.

How to Add Linked List Posts to The GeneratePress Theme

Linking to other sites is a great way to recommend great content by others on your website. Think of it like tweeting an article you’ve enjoyed and want to share with others. But by linking to it from your site:

  1. You will get to share your thoughts no matter how long they are.
  2. And get more readers to your site which help you build an audience.

In order to add Linked List Posts to the GeneratePress Theme, we need to the WordPress plugin and along with it, you must be comfortable with editing either your main theme or a child theme which is how I do it.

If you’re not comfortable editing your site’s theme, then you can become a Patron and you will get access to a pre-made GeneratePress child theme that works with this plugin.

Here’s my step by step guide on How to Add Linked List Posts to Your GeneratePress Theme.

Plugin Installation

Step 1

Go to Plugins > Add New

WordPress-Dashboard-Plugins-Add-New

Step 2

Search for Daring Fireball-style Linked List Plugin. Install & Activate it.

n47_Daring_Fireball-style_Linked_List_WordPress_Plugin

Step 3

On the left sidebar, under settings, click on DF-Style Linked List. Here, you will be able to change the plugin’s settings which are all explained very well. I personally only changed the Text for permalink option to / Permalink.

n47_DFLL_WordPress_Plugin_Settings

GeneratePress Theme Modification

Step 4

You can become a Patron today and download the pre-made version of the GeneratePress theme that works with this plugin and skip to Step 8.

Or,

Download this un-touched GeneratePress child theme from GeneratePress.com.

Step 5

Double-click on the file you’ve just downloaded to unzip it and you will have a folder called generatepress_child.

Step 6

Using your favorite text editor, create two new .php files inside the generatepress_child folder and name them content-single.php and content.php.

Step 7

Click here and copy everything you see and paste it inside your empty content-single.php file.

Then replace the following code

    
    if ( generate_show_title() ) {
    the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' );
    }

With

    
    if (is_linked_list()): ?>
        <h1 class="entry-title linked-list-single"><a href="<?php the_linked_list_link() ?>" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> →</a></h1>
    <?php else: ?>
        <h1 class="entry-title" itemprop="headline"><?php the_title(); ?></h1>
    <?php endif;

Step 8

Click here and copy everything you see and paste it inside your empty content.php file.

Then replace the following code

    
    the_title( sprintf( '
        <h2 class="entry-title" itemprop="headline"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );

With

    
    if (is_linked_list()): ?>
        <h2 class="entry-title linked-list-item"><a href="<?php the_linked_list_link(); ?>" title="<?php printf( esc_attr__( 'Link to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?> →</a></h2>
        <div class="linked-list-permalink"><?php the_permalink_glyph(); ?></div>
    <?php else: ?>
        <h2 class="entry-title"  itemprop="headline"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <?php endif;

Step 9

Make sure you modified the files correctly and saved them inside the generatepress_child folder. Now that you’re done, compress the folder.

Step 10

Go to Appearance > Themes > Add New > Upload Theme > Choose File > Browser, select the generatepress_child compressed file, click on Install Now and then Activate.

That should be it. Now your theme should have support for the Linked List that you’ve always been seeing on other sites that you read.

Please remember that if you disabled the plugin, you have to re-activate your main GeneratePress theme since keeping the modified version activated while the plugin is disabled will break your site.

First Linked List Post

Now that your theme support Linked List posts, it’s time for you to create your first post that takes advantage of this new feature.

Step 11

Go to Posts > Add New

Step 12

Make sure that Custom Field is ticked under Screen Options.

n47_WordPress_Screen_Options

Step 13

Scroll down until you find the Custom Field and under Name, click on Enter new and type linked_list_url and under Value, paste the link that you want to recommend to your site’s reader and click on Add Custom Field.

n47_Add_New_Custom_ Field_WordPress

Step 14

Fill in all the other info like you do with other posts like Title, Tags, Categories… etc.

Write your comment or reply to whatever it is that you linked to in the area where you write your post normally and hit Publish

And that’s all.

Conclusion

You just configured your site’s RSS feed as well as your GeneratePress Theme to have Linked Lists and posted your first Linked List post. You should be so proud of yourself. Go ahead and give yourself a pat on the back.

If you implemented this on your own site, make sure to leave a comment below with a link to your site so I can check it out and see all the cool links that you share.

And while you are at it, make sure to subscribe to News47ell RSS feed to see all the links that I share here.

Enjoyed this article?

Consider becoming a member, It will help keep the site up and running and me awake to write more articles.

It can be as little as $1 and take only 1 minute. Thank you.

Become a Member