Manual Related Articles is a WordPress plugin that allows you to manually select related posts for each post. This plugin provides an easy-to-use interface in the post editor and offers flexible options for displaying related posts on your site.
- Manually select related posts from the post editor screen.
- Display related posts using a function or a shortcode.
- Option to use a custom template from your theme folder.
- Import related posts from the BAW Manual Related Posts plugin.
- Reset all manually related posts.
- Download the plugin and upload it to your WordPress site's
wp-content/plugins
directory, or install it directly from the WordPress plugin repository. - Activate the plugin through the 'Plugins' menu in WordPress.
- Edit a post in the WordPress admin.
- Use the "Related Posts" meta box to search and select related posts.
- Save the post.
You can display related posts using either a function or a shortcode.
Add the following code to your theme's template files (e.g., single.php
):
if (function_exists('mra_display_related_posts')) {
mra_display_related_posts(get_the_ID());
}
Add the following shortcode to your post content or template files:
echo do_shortcode('[mra_related_posts post_id="' . get_the_ID() . '"]');
- Copy the file includes/related-posts/mra-related-posts-template.php from the plugin directory.
- Paste it into includes/related-posts/mra-related-posts-template.php in your theme directory.
- Modify the template as needed.
- Go to the "Manual Related Articles" settings page in the WordPress admin.
- Click the "Start Import" button to import related posts from the BAW Manual Related Posts plugin.
- Go to the "Manual Related Articles" settings page in the WordPress admin.
- Click the "Reset Related Posts" button to reset all manually related posts.
To set up the plugin for local development:
- Clone the repository: git clone https://github.com/pedrocandeias/manual-related-articles.git
- Navigate to the plugin directory: cd manual-related-articles
- Install dependencies: npm install (if you have any npm dependencies)
- Start developing!
Contributions are welcome! Please submit pull requests for any features, bug fixes, or enhancements. License
This plugin is licensed under the MIT License.
- Pedro Candeias - https://pedrocandeias.net