{"action":"opened","issue":{"url":"https://api.github.com/repos/algolia/algoliasearch-wordpress/issues/211","repository_url":"https://api.github.com/repos/algolia/algoliasearch-wordpress","labels_url":"https://api.github.com/repos/algolia/algoliasearch-wordpress/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-wordpress/issues/211/comments","events_url":"https://api.github.com/repos/algolia/algoliasearch-wordpress/issues/211/events","html_url":"https://github.com/algolia/algoliasearch-wordpress/issues/211","id":175081749,"number":211,"title":"Template Overriding not working","user":{"login":"rahilwazir","id":1818941,"avatar_url":"https://avatars.githubusercontent.com/u/1818941?v=3","gravatar_id":"","url":"https://api.github.com/users/rahilwazir","html_url":"https://github.com/rahilwazir","followers_url":"https://api.github.com/users/rahilwazir/followers","following_url":"https://api.github.com/users/rahilwazir/following{/other_user}","gists_url":"https://api.github.com/users/rahilwazir/gists{/gist_id}","starred_url":"https://api.github.com/users/rahilwazir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahilwazir/subscriptions","organizations_url":"https://api.github.com/users/rahilwazir/orgs","repos_url":"https://api.github.com/users/rahilwazir/repos","events_url":"https://api.github.com/users/rahilwazir/events{/privacy}","received_events_url":"https://api.github.com/users/rahilwazir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-05T14:22:50Z","updated_at":"2016-09-05T14:22:50Z","closed_at":null,"body":"### What did you expect to happen?\r\n\r\nWanted to override the autocomplete [templates](https://github.com/algolia/algoliasearch-wordpress/tree/master/templates), by copying them under theme `mytheme/algolia`. E.g:\r\n\r\n- `mytheme/algolia/autocomplete-empty.php`\r\n- `mytheme/algolia/autocomplete-footer.php`\r\n- ...\r\n\r\nReference [Docs#Customization](https://community.algolia.com/wordpress/customization.html#customizations)\r\n\r\n### What happened instead?\r\n\r\nIt didn't work.\r\n\r\n### How can we reproduce this behavior?\r\nFollow the [Docs#Customization](https://community.algolia.com/wordpress/customization.html#customizations), copy files from `templates` directory to `mytheme/algolia` and modify the templates, it won't reflect changes to autocomplete view.\r\n\r\nCan you provide a link to a page which shows this issue?\r\n- Not available at the moment\r\n\r\n### Technical info\r\n* WordPress version: 4.6\r\n* Algolia Search plugin version: 0.5.0\r\n\r\n\r\nAs far as I see the method `Algolia_Public()->inject_autocomplete_templates()` is using hardcoded `plugin_dir_path( __FILE__ )` plugin directory path to locate templates. It would always load the plugin templates unless we change the location using the filter `algolia_autocomplete_templates`.\r\n\r\nAnd yes after hook to the filter (`algolia_autocomplete_templates`) working."}}
{"actor":{"display_login":"rahilwazir"}}