| 开发者 | sanju-shankar |
|---|---|
| 更新时间 | 2026年10月23日 00:23 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[likenook] shortcode in their shortcode or text module.<?php likenook_buttons(); ?> anywhere in a template, or do_shortcode().interactionStatistic (LikeAction and DislikeAction). They join your existing Article or WebPage entity instead of adding a competing one, and work with Yoast SEO, Rank Math, All in One SEO, and themes or plugins that print their own JSON-LD.<button> elements that work with a keyboard, with a visible focus ring.GET /wp-json/likenook/v1/state and POST /wp-json/likenook/v1/vote, plus an likenook_votes field on post endpoints.likenook_buttons(), likenook_get_buttons(), likenook_get_counts().likenook_vote_recorded. Filters: likenook_buttons_html, likenook_can_vote, likenook_icon_sets, likenook_visitor_ip, likenook_rate_limit, likenook_schema_statistics, likenook_current_post_id.wp likenook stats, wp likenook recount, wp likenook import <source>, wp likenook reset.--likenook-like, --likenook-dislike and --likenook-radius.likenook folder to /wp-content/plugins/.Check that the post type is ticked under Likenook → Settings → Placement, and that Position isn't set to "Only where I place them". Some themes don't use the standard post content. In that case, add the Likenook Buttons block, the [likenook] shortcode, or <?php if ( function_exists( 'likenook_buttons' ) ) { likenook_buttons(); } ?> to your template.
Yes. Elementor has its own Likenook Buttons and Most Liked Posts widgets. In Divi, Bricks, Beaver Builder, WPBakery, Oxygen, Breakdance and other builders, add [likenook] or [likenook_most_liked] to a shortcode or text module. Buttons placed without an ID belong to the post being viewed.
Add the Likenook Buttons block to a widget area (or the Likenook Buttons widget in classic themes). It shows the buttons for the post being viewed, and hides itself on blog and archive pages, where there is no single post to vote on. To keep the automatic buttons out of the content at the same time, set Position to "Only where I place them".
Add the Most Liked Posts block or widget to the sidebar, or use [likenook_most_liked number="5" period="month"]. Choose the post type, the period (all time, 7 days, 30 days or 12 months) and whether to show featured images.
[likenook] accepts id, icons (thumbs, hearts, arrows, smileys, checks, flames, emoji, none), style (soft, outline, pill, minimal, solid, glass), size (sm, md, lg), align, layout (row, stack), counts (show, hide, after_vote, percent, score), labels (yes, no), like_label, dislike_label, bar (yes, no), question and thanks. Anything you leave out uses your settings.
[likenook_most_liked] accepts number, post_type, period (all, week, month, year), show_count and show_thumbnail.
Yes. Call <?php if ( function_exists( 'likenook_buttons' ) ) { likenook_buttons(); } ?> in any template file, for example next to the post title or in the author box. Pass a post ID to show the buttons for a different post: likenook_buttons( 42 ).
Yes. Tick Products under Placement and the buttons appear in the product summary. The Most Liked Posts block, widget and shortcode can list products too.
Yes, by default. Each visitor gets one vote per item, recognised by a cookie or by a hashed IP address. To allow only logged-in users, or only certain roles, change "Who can vote" under Voting.
No noticeable effect. The front end adds one small stylesheet and about 9 KB of JavaScript (no jQuery), only on pages that show buttons, plus one small request to load live counts. Totals are cached, so lists and sorting never count votes on the fly.
It adds like and dislike counts to your page's structured data (schema.org interactionStatistic), alongside the Article markup from your SEO plugin or theme. This describes engagement to search engines and AI crawlers. Counts are only added when visitors can see the results, and you can turn this off under Advanced. It does not create star ratings in search results, and no plugin can promise rankings.
Yes. The page can be cached as usual. Counts and the visitor's own vote load through a small request after the page loads.
In block themes, add the Likenook Buttons block inside the Post Template of a Query Loop. In classic themes, turn on "Also show on blog and archive pages" under Placement.
Yes. Click the "Was this helpful?" preset. It adds the question, Yes / No labels and a thank-you message, and hides the counts.
Yes. Under Placement → Which buttons, choose "Like only". The Hearts preset does this too.
You chose "Per IP address" tracking, and your office shares one IP. Switch to "Per browser" under Voting.
Your site is probably behind Cloudflare or a proxy. Under Voting, set "Visitor IP comes from" to the matching header.
Go to Likenook → Tools and click Import next to the plugin. You can run it again safely: it updates rather than doubles. On very large sites, use wp likenook import wp-ulike.
Yes. The buttons are real buttons that work with a keyboard and screen readers, report their pressed state, announce vote results, and respect the reduced motion setting.
Yes. Everything uses CSS custom properties, so a few lines change the colours and shape everywhere, for example .likenook { --likenook-like: #16a34a; --likenook-radius: 4px; }. Each style, size and icon set also adds its own class to the wrapper.
Yes. All text uses the likenook text domain and a translation template is included, so it can be translated on translate.wordpress.org or with a plugin like Loco Translate.
Use the support forum. Feature ideas are very welcome, and you can also open an issue on GitHub.
They are kept, unless you switch on "Delete all votes and settings when the plugin is deleted" under Advanced first.