Have you ever wanted to allow users to subscribe to specific authors on WordPress? If you have a multi-authored WordPress site, your users may want to subscribe to their specific author. In this tutorial, we will show you how to allow users to subscribe to individual authors on WordPress.
Why add a subscription feature on WordPress?
Most large multi-author blogs like "Huffington" allow users to follow their favorite authors. You can offer this feature to your WordPress blog also.
WordPress generates an RSS feed for all authors, categories, tags, custom post formats, and comments on your site. However, users can not easily access these links.
As a site owner, you will just need to add links and subscription options so that users can subscribe to the authors.
That said, let's take a look at this method that will allow you to allow author subscriptions on your WordPress blog.
How to add an authoring subscription feature on WordPress
All authors on your WordPress site have a unique RSS feed. This RSS feed is located in a URL similar to the following:
http://www.example.com/author/herve/feed/
Remember to replace 'herve' with the name of an existing author on your site.
Many WordPress themes features a section that displays author biographical information at the end of the article. You can add this HTML code in the author's bio section to display a link to their RSS feed.
Subcribe Tom's Posts
You can also automatically generate the link and use a shortcode to manually insert it into the articles.
First you need to add this code to your WordPress Plugin.
// Function to generate author's RSS feed link function bpc_author_feed () {$ authorfeed = get_author_feed_link (get_the_author_id (), ''); $ authorfeedlink = ' Subscribe to articles from'. get_the_author_meta ('display_name'). ''; return $ authorfeedlink; } // Create a shortcode to display the link add_shortcode ('authorfeed', 'bpc_author_feed'); // Enable shortcode execution in WordPress text widgets add_filter ('widget_text', 'do_shortcode');
You can now simply use the [authorfeed] shortcode in your articles, and it will automatically generate a link to the author's RSS feed. Feel free to customize the text you want to display for the link.
How to add a subscription link on the sidebar
We are going to use the shortcode method we showed above to display an author's subscription on WordPress. Just go to the location " Appearance> Widgets , And add a text widget to your sidebar.
You will need to add the [authorfeed] shortcode in the widget text box. After that, don't forget to save your widget. You can now visit your site to see the subscribe button in action.
The problem with this method is that it displays the widget on every page, including homepage, category and archive, etc.
You need to install and activate the plugin ยซ Display Widgets ". For more details see our step by step guide on how to install a WordPress Plugin. After activation, you need to visit Widgets location and edit widget โ Feed And choose where you want to display the widget.
You will notice new options to control the widget display on different pages of your site. Now you have to select " Show is checked pages Then check the single item.
Do not forget to click on the button ยซ save ยป to save the widget settings. That's all for this tutorial. I hope you can display a subscribe button on your WordPress blog.
Have a good day!
Interesting, but would it also be possible to generate code via CSS or similar - without an additional plugin - that would allow visitors to my website to subscribe to comments (all comments, only replies to my comments - the option should be available).
Everything must be GDPR compliant. All of the plugins I found are untested with my WordPress version 6.1.1 so they don't work and the Reloaded Subscribe to Comment appears to be broken a long time ago. So it had to be disabled. All attempts to get it working again have failed. I would be happy to hear back.
LG Sandra!
Hello, when I test your that I have this
Fatal error: Uncaught Error: Call to undefined function add_shortcode () in /var/www/vhosts/โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ./wp-includes/functions.php:7203 Stack trace: # 0 / var / www / vhosts / โฆโฆโฆโฆ ../ demo.dizalty.tv/wp-settings.php(111): require () # 1 /var/www/vhosts/โฆโฆโฆโฆโฆ./wp-config.php (94): require_once ('/ var / www / vhostsโฆ') # 2 /var/www/vhosts/โฆโฆโฆโฆโฆโฆโฆโฆโฆ/wp-load.php(37): require_once ('/ var / www / vhostsโฆ ') # 3 /var/www/vhosts/โฆโฆโฆโฆโฆ..wp-admin/admin.php(34): require_once (' / var / www / vhostsโฆ ') # 4 / var / www / vhosts / โฆโฆโฆโฆโฆโฆโฆ / wp-admin / options-general.php (10): require_once ('/ var / www / vhostsโฆ') # 5 {main} thrown in / var / www / vhosts /โฆโฆโฆโฆโฆโฆโฆโฆ./Wp-includes/functions.php on line 7203
Fatal error: Uncaught Error: Call to undefined function load_default_textdomain () in /var/www/vhosts/โฆโฆโฆโฆ./wp-includes/class-wp-fatal-error-handler.php:41 Stack trace: # 0 [ internal function]: WP_Fatal_Error_Handler-> handle () # 1 {main} thrown in /var/www/vhosts/โฆโฆโฆโฆโฆโฆโฆ/wp-includes/class-wp-fatal-error-handler.php on line 41
Hi,
Have you tried to disable some plugins?
Hello,
This article describes exactly what I want to do but where do I enter the code '// Function to generate author's RSS โฆโฆ'?
Thanks in advance for the reply.
Eric
Hi,
In the function.php file