-
AuthorPosts
-
September 19, 2020 at 11:41 pm #1247020
The same thing happens to me as in the topic:
https://kriesi.at/support/topic/portfolio-items-with-redirects-in-search-results/I copied/paste the code:
function remove_post_type_page_from_search() { global $wp_post_types; $wp_post_types['portfolio']->exclude_from_search = true; } add_action('init', 'remove_post_type_page_from_search');
in the Additional Css (Customization) but it didn’t work, what could I do to show only the page and / or Post but not the Portfolio Item in the Ajax search result.?
Another question I have is that WordPress is in Spanish but Search Results is shown in English (as well as the Enfold menu on the dashboard)
September 20, 2020 at 1:50 pm #1247115Hey Gustavo,
The code should be added to the functions.php file, not the Additional Css (Customization). Please try to put it there and see if the issue gets resolved.
Best regards,
VictoriaSeptember 21, 2020 at 8:13 pm #1247452Great!
I already added it to the child’s function.php … but it doesn’t work … :(
The “add action” also goes in the function.php?
I attach a photo
Genial!
Ya lo agregue al function.php del child….pero no funciona…:(
El “add action” también va en el function.php ?September 23, 2020 at 12:42 pm #1247831Hi,
Thank you for the inquiry.
You should only add the snippet in the functions.php file, only css code should go into the Quick CSS field. If it doesn’t work, please post the login details in the private field so that we could check the site.
Best regards,
IsmaelSeptember 29, 2020 at 2:00 am #1249197It is the only function that I add in function.php of the child Theme. I cannot pass code. It is not an online server I work with.
I am then going to disable this search engine. Do you recommend any way to put the classic search engine in the menu?
Thank you again
October 2, 2020 at 4:36 am #1249962Hi,
Thank you for the update.
Do you recommend any way to put the classic search engine in the menu?
Would you like to add the Google search in the menu? If that is what you are asking, then this plugin might be able to help.
// https://wordpress.org/plugins/wp-google-search/
We could create a new widget area, name it header, insert the Google search widget inside the widget are, then add the following snippet in the functions.php file to render the widget inside the header.
add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); }
For more info, please check the documentation.
// https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.