开发者 | magadanski_uchen |
---|---|
更新时间 | 2022年7月7日 22:28 |
捐献地址: | 去捐款 |
PHP版本: | 5.0 及以上 |
WordPress版本: | 6.0.0 |
版权: | GPLv2 |
版权网址: | 版权信息 |
[magadanski-similar-posts id="" post_type="" taxonomy="" limit=""]
You can use the attributes as follows:
It checks the categories assigned to this and other posts. The most similar post is considered the one with the most common categories.
Yes, when inserting the widget you are allowed to chose between categories, tags or any custom taxonomy you have.
Yes, this works for pages, posts or any custom post type you have.
No, currently similarity is calculated only by shared taxonomy terms (categories, tags, etc).
The plugin is originally distributed in English and is also translated in Spanish and Bulgarian. In case you need it in some other language you can help with this on https://translate.wordpress.org/
msp_allowed_post_types
filter to add back any post types that may now be gone, but you consider them needed (for example some private post types for any reason).
1.3.2
i18n enhancements for the Gutenberg block.
1.3.1
Fix the issue where after updating the plugin to 1.3.0 the newly developed features and Gutenberg block were not available.
Plase update to 1.3.1 to get all these benefits.
1.3.0
Add Gutenberg support. The included options allow you to chose a taxonomy and set a limit (upper boundary set to 10).
The block will appear as a plain unordered list. Future roadmaps can include the option to show is as a grid, also listing a featured thumbnail for the matching entries and/or an excerpt.
1.2.4
VisualComposer icon update to match latest branding of http://magadanski.com/
Tested against WordPress version 4.6.1.
1.2.3
Updates to allow translation via https://translate.wordpress.org/
1.2.2
Tested compatibility with WordPress 4.5 -- no issues registered.
1.2.1
Bugfix: added missing return statement for public functions.
This is an absolutely safe to install update -- it won't break any of the existing functionality and you are encouraged to do so.
1.2
Dev: The following filters have been added for some control over the generated list markup:
msp_similar_posts_list_tag
-- by default this is ul
but you can set it to ol
.
There are two more similar filters for this: msp_similar_posts_shortcode_tag
and msp_similar_posts_widget_tag
. As you may guess by the name, those allow to set the tag for only either the shortcode markup or the widget markup.
These secondary filters are executed after the main msp_similar_posts_list_tag
, so they can overwrite the value.
msp_similar_posts_list_classes
-- this allows you to add/edit/remove classes for the list tag. By default only one class is present: "msp-list".
There are two secondary filters for this as well: msp_similar_posts_shortcode_classes
and msp_similar_posts_widget_classes
.
1.1.6
Dev: fix for notice -- missing "global" keyword for variable.
1.1.5
Fix for widget bug to allow support for custom post types.
1.1.4
Fix for improper regular expression for request SQL query modification.
1.1.3
Dev: added msp_get_similar_posts()
shortcut function.
1.1.2
Bugfix for showing the plugin widget on pages if necessary.
Fix for other potential issues.
1.1.1
Internationalization updates.
Feel free to submit patches for updating Spanish translation or adding a new one.
1.1
Added WPBakery Visual Composer integration.
Fix: set_similar_id
uses current post's ID only if $id
argument is 0 AND similar_id
property is 0 too.
Dev: externalized get_post_types
and get_taxonomies
methods for Magadanski_Similar_Posts_Widget
widget as global helper functions prefixed msp_
:
msp_get_post_types
msp_get_taxonomies