I was updating the php theme for the fist time trying to delete the related pruducts from my store, i paste these code
/* * wc_remove_related_products * * Clear the query arguments for related products so none show. * Add this code to your theme functions.php file. */ function wc_remove_related_products( $args ) { return array(); } add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);
as i undertstad it has to be done, but an error messege apper and there is nothing left. i can´t even enter to my admin panel. this is may website
guiasparatunegocio.com
Hi Daniel
Any changes like this probably need to go a new functions.php contained in a child theme. If you insert them into the main functions.php file they will be lost the next time you update Vantage.
To resolve this you’ll need to login to your server via FTP and head to /wp-content/themes/vantage and edit your functions.php. Remove the section you added.
The very first square bracket is most likely the issue. That shouldn’t be there.
Here is some info on creating a child theme: https://codex.wordpress.org/Child_Themes.
Hi Andrew!!
I´m back on my feet!!! Thank you so much, however I follow the instruction about creating a child theme and avoid loss of config with future theme updates, but these child theme loses properties on my menu, it display all the options together stead of hide the subcategories, I try creating a child theme with the traditional process and again with a plugin and in both cases the result is the same, with the child theme activated also check the config on appearance/menus and it looks ok… do you know what did I miss?
A child theme will require that you redo your Appearance > Customize and sometimes Appearance > Menus settings. So that’s most likely what’s going on here, you most likely need to head to Menus and re-save your menu.
I just redo my menu and set it as primary menu but it remove the last 3 pages, I checked some forum about it and proceed to deactivate all plugins however this makes no difference… the new menu does not work, any suggestions?
Please send me a link so I can take a look.
Tanks !! sure, here there is.
http://guiasparatunegocio.com/
all plugins deactivated.
Please also send through a set of temporary login details to [email protected]. Thanks.
done !!
Should be good now: http://guiasparatunegocio.com/. I saved the menu to the Primary Menu location.
I just tried to add some pages but still no change, feel free to add some for you self and update the menu to verify.
This possibly related to Plugins > Drop Ins > object-cache.php APC Object Cache. It’s something Go-Daddy use. We’ve had numerous issues with it. You can try deleting it from /wp-content/ just make a backup first.
Ok I´m at my filezilla panel, I went to wp-content > plugins and I was hoping to find a file named “Drop Ins” but I don’t see it, is this the right path?
It should be in wp-content/ not in plugins, just wp-content.
We are the beginning, it didn’t work either, I also try after deleting another file that was just aside from object-cache.php called index.php but no improvement so far… What if I just drop the child theme, make my customization on the vantage theme and don’t update the theme? Or modify the code with each update.
Ok… I just activate the original Vantage theme, delete the child one, activate the plugins, restore the php files on wp-content… everything as it was when all work fine without a child theme, but the same unchangeable menu follow me… :(.
I got no options left…
Let me take another look now.
Could you please check that my user account is still active? Thanks.
(The index.php file in /wp-content/ should not be deleted. If you made a backup put that file back.)
Hi Andrew!!
I just fix it by mistake, my plan was to create another menu and replace the non-function one, so I went to appearance/widget/header and add a widget menu, this new menu does not appear where I wanted it, but this action allow me to set my menu as a primary one and save it correctly. It wasn’t a technical solution I know… but it work!!. Now I got another issue, I´ll post it under a different topic in a moment once this one has been fixed.
Have a good day.
Super, glad you managed to resolve. I’ll pick up your new thread shortly.