shortcode appears as text in the search result

There is a stray > at the end of our code above, make sure that is a ?> instead of > Try another shortcode, something simple to verify it is not shortcodes in general. Clear you caching, clear permalinks by going to the permalinks page and clicking update. Check if the search plugin has caching … Read more

search by meta field in the regular WordPress admin panel search

For regular admin panel search you should include “is_admin()” to be true. For checking for specific post type you should check from $query->get(“post_type”) Can you try to use this code add_action(“pre_get_posts”, function ($query) { if ($query->is_main_query() && is_admin() && in_array($query->get(‘post_type’), array(‘company’))) { $s = get_search_query(); $meta_query = [ ‘relation’ => ‘OR’, [ ‘meta_key’ => ‘_company_inn’, … Read more

Customize search_filter($query) function

OK. I have changed $query->set(‘orderby’, ‘type’) function search_filter($query) { if ($query->is_search && !is_admin()) { $query->set(‘post_type’, array(‘post’,’forums’)); $query->set(‘category_name’, ‘my-zen’); $query->set(‘orderby’, ‘date’); $query->set(‘order’, ‘ASC’); } return $query; } add_filter(‘pre_get_posts’,’search_filter’); Now, I don’t have any Error critical, but it doesn’t work. What is wrong in my code?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)