New answers tagged search
0
votes
changing behaviour of get_search_form
However if somebody is looking for methode with old good tags of HTML, here is an answer i tested and it is working:
Create file named:
searchform.php
inside Your theme directory.
Copy and paste ...
0
votes
How to Display Content from Search URLs on Permanent URLs in WordPress?
If you have registered a custom post type and have added a custom template for it to your theme, then you could do something like this.
Add a helper function to functions.php that creates a custom ...
0
votes
changing behaviour of get_search_form
IMHO it should be use "add_filter" as Liton Arefin wrote, which should be added inside functions.php of own created theme of Wordpress.
It should override all variables need to override ...
1
vote
Search with indexing and linking to PDF content
By default, you won't be able to search the pdf file unless you use some software or script to take the data out of the pdf and put it in some place that it can be indexed and searched (or use a tool ...
0
votes
Exclude in search post and include only 3 pages
you're using $query->set('post_type', 'post'); to only include posts. What you can do is make it an array to include the post type and those specific page IDs you want.
Here's an example code:
...
0
votes
Exclude multiple custom post types from search
This is because elseif doesn't work the way you think it does. You're trying to use it in a way that's closer to a switch statement or multiple if statement`
This:
if (post_type_exists('videos')) {...
0
votes
Exclude multiple custom post types from search
// Exclude custom post types from search
add_action('init', 'cdxn_remove_custom_types_from_search', 99);
function cdxn_remove_custom_types_from_search() {
global $wp_post_types;
if (...
0
votes
Custom Loop Query For Search Page
How can this be done with including an orderby for first relevance and second post date desc? Would it be inserting two orderbys above the 'order' line? Any insight into this would be greatly ...
Top 50 recent answers are included
Related Tags
search × 1823wp-query × 224
custom-post-types × 219
php × 127
custom-field × 111
query × 110
customization × 104
custom-taxonomy × 93
plugins × 82
filters × 81
posts × 68
categories × 64
woocommerce-offtopic × 60
tags × 58
pagination × 57
functions × 55
pre-get-posts × 53
ajax × 52
loop × 50
forms × 50
meta-query × 49
templates × 48
pages × 44
taxonomy × 42
theme-development × 41