Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getResults() {
- $.getJSON('http://localhost:3000/wp-json/wp/v2/posts?search=' + this.searchField.val(), posts => {
- this.resultsDiv.html(`
- <h2 class="search-overlay__section-title">General Information</h2>
- <ul class="link-list min-list">
- ${posts.map(item => `<li><a href="${item.link}">${item.title.rendered}</a></li>`).join('')}
- </ul>
- `);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement