Family Encyclopedia >> Electronics

How to allow users to subscribe to authors in WordPress

Have you ever wanted to allow users to subscribe to specific authors in WordPress? If you run a multi-author WordPress site, users may want to subscribe to their favorite author. In this article, we will show you how to allow users to subscribe to individual authors in WordPress.

How to allow users to subscribe to authors in WordPress

Why add subscribe to authors in WordPress?

Most of the big multi-author blogs like Huffington Post allow users to follow their favorite authors. You can also offer this feature on your multi-author WordPress site.

WordPress generates RSS feeds for all authors, categories, tags, custom post types, and comments on your site. However, your users cannot see the link to these sources without knowing where to look.

As the site owner, you just need to add links and subscription options so that users can subscribe to authors.

With that said, let's take a look at how to easily allow users to subscribe to authors in WordPress.

Addition of the Subscribe to Authors function in WordPress

All authors on your WordPress site have their own RSS feed. This RSS feed is located at a URL like this:

http://www.example.com/author/tom/feed/

Don't forget to replace 'tom' with the name of an existing author on your site.

Many WordPress themes come with a section that displays the biographical information of the author at the end of the article. You can add this HTML code to an author's bio section to display a link to their RSS feed.

 Subcribe las publicaciones de Tom 

How to allow users to subscribe to authors in WordPress

You can also automatically generate the link and use a shortcode to manually insert it into posts.

You must first add this code to your theme's functions.php file or a site-specific plugin.

 // Función para generar la función de enlace del feed RSS del autor wpb_author_feed () $ authorfeed = get_author_feed_link (get_the_author_id (), "author authorlinklink = 'Suscribirse para obtener más publicaciones de'. Get_the_author_meta ('display_name')."; devuelve $ authorfeedlink; // Crea un shortcode para mostrar el enlace add_shortcode ('authorfeed', 'wpb_author_feed'); // Habilitar la ejecución de shortcode en widgets de texto de WordPress add_filter ('widget_text', 'do_shortcode'); 

Now you can only use the shortcode [feed] in your posts, and it will automatically generate a link to the RSS feed of the post's author. Feel free to customize the text you want to display for the link.

How to allow users to subscribe to authors in WordPress

Add a Subscribe to Author link in the sidebar

We will use the shortcode method shown above to display a link to subscribe to the author in the sidebar of your WordPress blog. Simply go to Appearance »Widgets page and add a text widget to your sidebar.

How to allow users to subscribe to authors in WordPress

You will need to add [feed] shortcode in the widget textarea. After that, don't forget to click the Save button to store the widget settings.

You can now visit your website to see the sidebar in action.

The problem with this method is that it will display the widget on every page including home page, category and tag files etc.

You need to install and activate the Display Widgets plugin. For more details, check out our step-by-step guide on how to install a WordPress plugin.

After activation, you need to visit the Widgets page and edit the author feed widget you added earlier.

How to allow users to subscribe to authors in WordPress

You'll notice new options to control the display of widgets on different pages of your site. Now you need to select 'Show on bookmarked pages' , and then check the single post option.

Don't forget to click the Save button to store your widget settings.

That's all you can now visit your website to see your author's subscription link in action. You can use some CSS to create a button, or add an image icon like the subscription.

We hope this article helped you learn how to allow users to subscribe to authors in WordPress. You may also want to see our guide on how to fix the most common RSS feed errors in WordPress.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.