{"id":19774376,"url":"https://github.com/wpperformance/wp-performance-algolia","last_synced_at":"2026-05-14T04:41:25.322Z","repository":{"id":171049971,"uuid":"602022353","full_name":"wpperformance/wp-performance-algolia","owner":"wpperformance","description":"Plugin for connect Algolia search with WP","archived":false,"fork":false,"pushed_at":"2023-02-15T13:21:17.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T01:26:26.195Z","etag":null,"topics":["algolia","algolia-instantsearch","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpperformance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-15T10:34:17.000Z","updated_at":"2023-02-15T14:31:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee04582f-360e-4fbe-b2d5-7c3822b4942b","html_url":"https://github.com/wpperformance/wp-performance-algolia","commit_stats":null,"previous_names":["wp-performance/wp-performance-algolia","wpperformance/wp-performance-algolia"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-algolia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-algolia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-algolia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-algolia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpperformance","download_url":"https://codeload.github.com/wpperformance/wp-performance-algolia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241105158,"owners_count":19910576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algolia","algolia-instantsearch","wordpress","wordpress-plugin"],"created_at":"2024-11-12T05:12:47.399Z","updated_at":"2026-05-14T04:41:20.287Z","avatar_url":"https://github.com/wpperformance.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Algolia implementation for WordPress\n\n## WP-CLI\n\nThis plugin add a wp-cli command for save all post\n\n```\nwp algolia reindex_post\n```\n\n## Hook\n\nUpdate index of algolia when a post has added, updated or deleted\n\n\n## Config\n\nAdd in wp-config.php :\n\n```\ndefine('ALGOLIA_APP_ID', 'XXX');\ndefine('ALGOLIA_APP_PUBLIC', \"XXX\");\ndefine('ALGOLIA_APP_SECRET', \"XXX\");\n```\n\n## JS\n\nThe vars ```ALGOLIA_APP_ID```,  ```ALGOLIA_APP_PUBLIC``` and ```ALGOLIA_APP_INDEX``` are shared across the page for use in javascript script.\n\nExample of use :\n\n```html\n\u003cdiv id=\"searchbox\"\u003e\u003c/div\u003e\n\u003cdiv id=\"hits\"\u003e\u003c/div\u003e\n\u003cdiv id=\"tags-list\"\u003e\u003c/div\u003e\n```\n\n\n```js\nimport algoliasearch from 'algoliasearch/lite'\nimport instantsearch from 'instantsearch.js'\nimport { searchBox, hits, refinementList } from 'instantsearch.js/es/widgets'\n\nconst search = instantsearch({\nindexName: ALGOLIA_APP_INDEX,\nsearchClient: algoliasearch(ALGOLIA_APP_ID, ALGOLIA_APP_PUBLIC),\nsearchFunction(helper) {\n    // Ensure we only trigger a search when there's a query\n    if (helper.state.query \u0026\u0026 helper.state.query !== '') {\n    document.getElementById('hits').removeAttribute('hidden')\n    helper.search()\n    } else {\n    document.getElementById('hits').setAttribute('hidden', true)\n    }\n},\n})\n\nsearch.addWidgets([\nsearchBox({\n    container: '#searchbox',\n}),\nrefinementList({\n    container: '#tag-list',\n    attribute: 'tags',\n    limit: 5,\n    showMore: true,\n}),\nhits({\n    container: '#hits',\n    templates: {\n    item: `\n    \u003carticle\u003e\n    \u003ca href=\"{{ url }}\"\u003e\n        \u003cstrong\u003e\n        {{#helpers.highlight}}\n            { \"attribute\": \"title\", \"highlightedTagName\": \"mark\" }\n        {{/helpers.highlight}}\n        \u003c/strong\u003e\n    \u003c/a\u003e\n    {{#content}}\n        \u003cp\u003e{{#helpers.highlight}}{ \"attribute\": \"excerpt\", \"highlightedTagName\": \"mark\" }{{/helpers.highlight}}\u003c/p\u003e\n    {{/content}}\n    \u003c/article\u003e\n`,\n    },\n}),\n])\n\nsearch.start()\n\n```\n\n## Doc\n\n- [https://www.algolia.com/doc/integration/wordpress/search/building-search-ui/?client=php](https://www.algolia.com/doc/integration/wordpress/search/building-search-ui/?client=php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpperformance%2Fwp-performance-algolia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpperformance%2Fwp-performance-algolia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpperformance%2Fwp-performance-algolia/lists"}