Algolia Wordpress plugin not indexing post content - wordpress

Just wondering if you guys could help me. I have indexed all my content from WP and when using the instant search only a few posts are showing any sort of excerpt. I have reindexed a few times to see if it resolved it to no luck.
I am looking on algolia's dashboard and when searching for specific items they have only specific attributes filled in. screenshot from algolia dashboard
Any help is appreciated.

By default the plugin will split the post's content into multiple Algolia records.
Then when displaying results, we display the most relevant matched record as the excerpt.
You could customize this behaviour by following this guide: https://community.algolia.com/wordpress/customize-search-page.html
Let us know if there is something you would like to achieve that does not seem supported or easy to implement.
Update:
It seems like some users are more satisfied with putting the post_title as last in the ranking. That way, the displayed excerpt will be relevant.
the only cases where this would not be ideal is if you want the post title to be more important as the content of your post.

Related

Wordpress: is it possible to create a sticky post that is at the top of the search results no matter the terms searched for?

Title pretty much says it all. I'd like a post to appear at the top of every search results page.
Google and their support forums turned up nothing.
Any pro's on here want to shed some light if its possible or not?
One method would be to include a custom field on your posts that would be a checkbox that allows you to mark a post as sticky. Then, in your search.php file, you could write a wp_query that would retrieve the sticky posts (http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters).
Then after that is displayed, include your search results loop. So you're calling your sticky posts prior to displaying any of your search results.

Wordpress: how to limit post-nav to specific category?

I'm setting up my first Wordpress site. I have limited knowledge and understanding of its inner working. (Bear that in mind, please)
I setup 3 different pages that show posts based on their categories.
Though, once your reading one post, from either pages, the Next Post/Previous Post navigation still cycle thru all the posts regardless of their categorie.
I would like to limit this navigation to posts within the category of the page the reader is reading from.
Is that at all feasable and if so, can you help me out understanding how to do it?
Or if there is a plugin that does that?
Thanks
That's covered in the WP docs. Set in_same_cat to true.
https://developer.wordpress.org/reference/functions/next_post_link/
If the links are already in your theme, you'll need to edit them.

wordpress similar/related posts by title

I know that there are many plugins which does this. but I am wondering why all plugins only get related post by tags and not by title?
what is an efficient way to retrieve all similar post only by title in the single.php. for example, if I have two posts whose title are "speed up wordpress loading time" and "speed up wordpress backend". then in one post, the other one should be related and shown.
I can think of a way to do that, which is to get all posts under the same category and using similar_text() to compare each title against the current one. then order the result and show the top ones from the list. is this a good and effecient way to do that?
any suggestions? please attach a snippet of code if you have a solution.
I'd suggest you don't load related posts on page load because this will dramatically hurt your website's performance.
The free WordPress plugin Related Posts for WordPress automatically finds related posts (amongst others based on title) and caches them for you, offering you real related posts without hurting your website's performance. After the automatic linking is done you can, if required, manually add, edit or delete related posts.
You can give it a try via the WordPress.org repo: http://wordpress.org/plugins/related-posts-for-wp/
It involves a bit more work, but you could add a fulltext index to the title column of the posts table and then use MATCH AGAINST in your query to retrieve similar posts ordered by relevance.
To add a fulltext index:
CREATE INDEX fulltext2 ON wp_posts(post_title(255));
To make a query using MATCH AGAINST:
SELECT ID, post_title,
MATCH(post_title) AGAINST ('$post_title') AS Similarity
FROM wp_posts
WHERE MATCH(post_title) AGAINST('$post_title')
ORDER BY Similarity DESC;
Note: I am not specially fluent in SQL, if you decide for this option perhaps someone could improve the SQL above.

Wordpress - How to limit characters to show at Feeds?

In wordpress, there is settings for the feed to show Summary or Full. I want to show only content summary at Feeds. But the default summary is still too long for me. And there's another way to add excerpt at each of the post. For that option, I can't use it either because I am running multiple author blog and most of the people don't know how to add excerpt and my posting form is custom form which is not allowed to add excerpt. I tried to search at google and wordpress plugins, but still haven't get any clue yet.
Is there anyway to limit characters at feed display ? Or is there any plugin out there ? Like at feedburner, I can activate summary feeds and limit the characters.
Please kindly help me out again. Thank you.
put the following in the theme's functions.php file:
add_filter('excerpt_length',create_function('$a','return 25;'));
Where 25 is the number of words you'd like to appear in the excerpt.
If you want the normal excerpt length on the regular page but the short one in the feed, use:
if(is_feed()){
add_filter('excerpt_length',create_function('$a','return 25;'));
}
I don't know whether that will work for sure with all feeds, so I'd suggest just using it without the is_feed() check.

Creating relationships between posts in WordPress

Is there a way to create an exlicit relationship between two posts in WordPress regarless of what categories those posts might be in?
The idea is that within the post template it would be obtain and list the related posts for the current post.
I'm guessing you could achieve this using tags to group posts together, but that seems to be a hi-jacking of the tag system for a purpose for which is wasn't designed.
Any ideas?
Would adding post IDs as meta data help? I had written a quick hack to display the Digg box for posts that were submitted to Digg. I was manually adding a digg_url meta field with the Digg URL. Perhaps you could add multiple related__post fields and add some code to iterate through all and render post links? Are you looking for a more automated solution?
Maybe I didn't catch the point, but Categories are not just there for that purpose?
I may have miss understood the question. But tags, archives and categories are there to "connect" posts, on the basis of that common connection.
Other than that, I can only see ...
Manually linking posts from with the text of a blog post or
Using plugins. Two I user are similar posts (http://rmarsh.com/plugins/similar-posts/) and SEO Smart Links (http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links)
Similar posts if highly configurable and allows the blog to automatically suggest "related posts" and SEO Smart Links, links (in post) words or phrases to related posts.
All the best
stephen

Resources