Linux 软件免费装
Banner图

Manual Related Posts

开发者 mpol
更新时间 2024年11月15日 20:27
PHP版本: 7.0 及以上
WordPress版本: 6.7
版权: GPLv2 or later

标签

related posts related related post linked posts linked post

下载

3.3.0 3.1.1 3.1.4 3.1.5 3.2.0 3.0.0 3.1.0 3.4.0 3.1.2 3.1.3 3.4.1 3.0.1 3.0.2

详情介绍:

A simple 'related posts' plugin that lets you select related posts manually. Supports any post types in WordPress, including custom ones. Features: The plugin was written to have the option to add related posts to each blog post using a simple but functional plugin. You can select the related posts yourself manually. To display the related posts, there are three options: For advanced options, see the installation docs. Compatibility This plugin is compatible with ClassicPress. Contributions This plugin is also available in Codeberg.

安装:

Option 1 - Automatic install Use the plugin installer built into WordPress to search for the plugin. WordPress will then download and install it for you. Option 2 - Manual install
  1. Make sure the files are within a folder.
  2. Copy the whole folder inside the wp-content/plugins/ folder.
  3. In the backend, activate the plugin. You can now select related posts when you create or edit blog posts, pages etc.
How to display the related posts on your website The related posts are displayed by adding show( $post_id ); ?> to your template. Replace $post_id with a post ID. If you call it within the WordPress loop, you can use show( get_the_ID() ); ?> You have the option of either outputting a pre-formatted list or returning a PHP array of related posts to customise the markup yourself. Examples Example 1: Using the default output show( get_the_ID() ); ?> This can be called within the WordPress loop. It will output a <ul> list with links. Example 2: Returning an array show( get_the_ID(), true ); ?> Example 3: Using a simple foreach loop With the second argument set to true, it will return an array of post objects. Use it to generate your own custom markup. Here is an example: show( get_the_ID(), true ); // Display the title of each related post if( is_array( $rel ) && count( $rel ) > 0 ) { foreach ( $rel as $r ) { if ( is_object( $r ) ) { if ($r->post_status != 'trash') { echo get_the_title( $r->ID ) . ''; } } } } ?> Example 4: Using a WordPress loop If you want to run it with a real WordPress loop, then use it as follows. You can then use functions like the_content or the_excerpt. But make sure you don't use the content filter for related posts, because you might get an endless stream of related posts that are related to each other :). show( get_the_ID(), true ); // Display the title and excerpt of each related post if( is_array( $rel ) && count( $rel ) > 0 ) { foreach ( $rel as $r ) { if ( is_object( $r ) ) { if ($r->post_status != 'trash') { setup_postdata( $r ); echo get_the_title( $r->ID ) . ''; the_excerpt(); } } } wp_reset_postdata(); } ?> Example 5: Using Related_du plugin Using the default output from the Related (Doubled Up) plugin: show( get_the_ID() ); ?> This can be called within the WordPress loop. It will output a <ul> list with links.

屏幕截图:

  • Widget with Related Posts in the frontend, together with Related Posts in a content filter.

升级注意事项:

Either let WordPress do the upgrade or just overwrite the files.

常见问题:

Who should use this plugin?

People who want to list 'related posts' in their blog posts or pages, and want to choose the related posts manually themselves.

Where does the plugin store its data?

Data is stored in the existing postmeta table in the WordPress database. No additional tables are created.

How many related posts can I add?

As many as you like, there's no limit.

I have many posts, how can I deal with that in the best way?

There are 2 things that are done or possible. The Javascript Chosen.js is being used so you can easily navigate through the select-box. Also, you can select on the Options page to not list all post types. This will trim down the number of posts that are listed. For each posttype a maximum of 500 posts will be listed.

My admin dashboard gives error about reaching the memory limit.

Probably all post types are shown in the dropdown lists in the metabox. You want to go to Settings > Related > Form-tab and only enable the post types you really want in the dropdown. For me this made a difference from 100MB to 29MB memory usage.

How do I delete all related posts data?

On the Settings page there is an uninstall tab. If you want post relations and settings removed, use this page to remove them completely.

Are there compatibility issues

This plugin is not compatible with the Kleo theme.

更新日志:

3.4.1 3.4.0 3.3.0 3.2.0 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.2 3.0.1 3.0.0 2.3.2 2.3.1 2.3.0 2.2.3 2.2.2 2.2.1 2.2.0 2.1.3 2.1.2 2.1.1 2.1.0 2.0.9 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.7.0 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4 1.3.2 1.3.1 1.3 1.2.1 1.2 1.1.1 1.1 1.0