开发者 | brokensmile.2103 |
---|---|
更新时间 | 2025年6月30日 23:40 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
<input name="s">
with a clean, intuitive search modal powered entirely by the WordPress REST API. Everything loads in real-time — with zero disruption to browsing flow.
Perfect for content-heavy blogs, WooCommerce stores, or even headless sites. Every interaction is fast, fluid, and designed to work across devices.
This plugin is part of the Init Plugin Suite — a collection of minimalist, fast, and developer-focused tools for WordPress.
GitHub repository: https://github.com/brokensmile2103/init-live-search
/wp-content/plugins/
or install via the WordPress admin panel.<input name="s">
fielddata-ils
attribute#search
or ?modal=search&term=your+keyword
[init_live_search_related_posts]
shortcode:post_type
parameter to filter related results by one or more post typespost_type="post"
) or multiple values (post_type="post,page,product"
)post
, product
, manga
, etc.)template="..."
) and theme overridespost_type
now resolved from both post_type
(string or comma-separated) and post_types
(array) in $args
[init_live_search_related_posts]
shortcodetemplate
parameter to switch between multiple layouts:default
: Row layout with thumbnail on the left (existing)grid
: Responsive grid with large image and titleclassic
: Headline with excerpt (blog style)compact
: Plain text listthumbright
: Title and date with thumbnail on the rightinit-live-search/related-posts-{template}.php
default
if template not found–
)[init_live_search_related_posts count="10"]
+
and -
search operators+keyword
: must include-keyword
: must exclude[init_live_search_related_posts]
keyword
paraminit-live-search/related-posts.php
css="0"
param to disable default stylesschema="0"
to disable JSON-LD ItemList output[init_live_search]
shortcodewp_localize_script()
/brand
, /attribute
, /variation
, and /coupon
support/coupon
returns active, usable coupons with usage info and expirationpa_...
attributes/price
slash commandsort
/ rsort
keywords[init_live_search]
shortcodeSite Name|https://example.com/
){"reaction": ["tương tác", "phản hồi"]}
/tag
and /category
slash commands (AND logic)/trending
slash command using real-time trending data from Init View Countattachment
) from selectable post types in settings for cleaner configurationuser_id
and source
for simpler and privacy-friendly analyticsdetect_language
→ detect_lang
)ils:search-started
to render custom commands from themes or pluginssea
won't match search
)init_plugin_suite_live_search_seo_meta_keys
filtersearch-core.php
get_the_excerpt()
if no relevant match is found-webkit-line-clamp: 1
)title_excerpt
and title_content
modestitle > excerpt > content
init_plugin_suite_live_search_commands
filter logicils:result-clicked
custom eventid
, url
, type
, etc.)<html lang>
with fallback map/day
, /week
, /month
(requires Init View Count plugin)/history
, /history_clear
/recent
, /related
, /popular
, etc. based on page context/popular
, /read
if supporting plugins are active/recent
, /fav
analytics.php
→ tracking.php
style-full.css
: fullscreen overlaystyle-topbar.css
: fixed top bar (like Spotlight)init-live-search/style.css
in themeinit_plugin_suite_live_search_seo_meta_keys
init_plugin_suite_live_search_weights
init_plugin_suite_live_search_filter_lang
init_plugin_suite_live_search_category_taxonomy
/product
, /on-sale
, /stock
, /sku
, /price
data-ils
attribute to trigger modal/fav
, /fav_clear
commandsils:modal-opened
, ils:modal-closed
, ils:search-started
, ils:results-loaded
/re...
)?modal=search&term=...
URL trigger/related
, /read
, /random
, /categories
, /tags
, /help
, /clear
, /reset
/read
integration with Init Reading PositionlocalStorage
/recent
, /popular
, /tag
, /category
, /date
, /id
/date
parsingsessionStorage