i feel stupid now...YES! It works...
Best posts made by Webwerkplaats
Latest posts made by Webwerkplaats
-
WPFTS does not index files NOT uploaded with Media Library
I use Simple File List Pro from Mitchel Bennis. Files are uploaded to a directory structure in wp-content/uploads/simple-file-list.
In the wp-content/uploads/simple-file-list there are folders, used as categories. For Example wp-content/uploads/simple-file-list/newsletters.
Newsletters are PDFs in that directory.But when i do a search on a certain word in 1 of the newsletters, the PDF does not show up in search results.
When i simply upload it to the wp-content/uploads/ with the Media manager from Wordpress, the newsletters does show up in search results.Am i right in thinking that WPFTS does not index files NOT uploaded with Media Library?
Can i make WPFTS index the /uploads/simple-file-list/ ?Your help will be appreciated
-
RE: Number of search results
I'm sorry, no, it doesn't help.
This site is weird. I have made prototype on 1 server. Then copied it 1:1 to another server. There some links don't work. Previous page, Next page pagination and the Divi Theme builder only work when i set permalinks in Wordpress to "Simple". When i change permalinks to "Post Name" or any other, the site misbehaves. Can't figure it out. Maybe this is also the reason the site doesn't "listen" to my code or your code to expand the number of search results.
Thanks for the help but it seems the error is not in your plugin. -
Number of search results
Does WPFTS limit number of search results?
I have set Settings>Read to 100 posts (in WP Admin)
i have added to my child theme's functions.php:
function change_wp_search_size($query) {
if ( $query->is_search ) // Make sure it is a search page
$query->query_vars['posts_per_page'] = 50; // Change 10 to the number of posts you would like to show
return $query; // Return our modified query variables
}
add_filter('pre_get_posts', 'change_wp_search_size'); // Hook our custom function onto the request filterBut i only get 5 results (always, for any keyword, even if there are more results)
Kind regards, Marco