Tagged: DeBug Mode
-
AuthorPosts
-
January 12, 2016 at 11:21 pm #564213
I just intended to set up debug mode – If successful I was going to review the selection criteria code for enfold’s portfolio grid so I could maybe put an ‘AND’ function in instead of just selecting ‘OR’ against categories. Probably should have come to the forum first to discuss my requirement – NEXT TIME!
Really messed up though – site shows 500 and I cab’t get to Dashboard or Normal site from outside browser
The only page I can see is the editor and only when I click back to it (and only because I am still logged in!)
http://www.highlandvisitor.com/wp-admin/theme-editor.php?file=functions.php&theme=enfold
I think I may have put in an error but thought I had re-edited correctly – in the end I went to another Enfold site (I have several) and copied the entire content of the un edited functions.php file in case I was missing something – still not working – a bit lost now.
The instant I saved the first edit the site url delivered an empty screen till I clicked back to http://www.highlandvisitor.com/wp-admin/theme-editor.php?file=functions.php&theme=enfold
I have an Updraft Plus backup and would be happy to use this but I can’t even get to the software – if no solution I may have to re-install WP and go to these backups – I can wait a day or two as this is my own website and just a background development – is there a better way?
January 13, 2016 at 9:03 am #564426Sorry forgot some of the login information – see private content
January 14, 2016 at 3:45 am #565176Hi,
If you haven’t made any customisations to the file then I would suggest you download a fresh copy from your Themeforest account and simply replace the old file with the new version via FTP. Otherwise you can navigate to the file via FTP and select to edit the file and remove the faulty code.
Thanks,
RikardJanuary 14, 2016 at 9:36 am #565265Hi, Many Thanks Rikard,
No – no cutomisations. I did try and resore the file to it’s original state as a first activity – failed somehow so I had better go for your first suggestion – reinstall theme by FTP. This is new for me but as I understand from the support information it I am just going to do the following:
1.download just the ‘installable files for wordpress’ from my themeforest account – DONE
2.unzip it at my PC
3.On Hosting Server rename /wp-content/themes/enfold/ /wp-content/themes/enfold-old/
4.FTP Copy Enfold folder for PC to /wp-content/themes/ to make new /wp-content/themes/enfold/ with the files I have just downloaded from Themeforest.Does this all look OK to you?
I started by dowloading the files from Themeforest this morning and noticed I have bought 10 copies of Enfold – do I get a special badge!?
Thanks again – good support is one big reason I keep buying Enfold
Tony
January 14, 2016 at 2:01 pm #565381NO NEED to reply to this – I was just being VERY careful – it is quite alarming getting into the situation I managed to before!
Anyway it worked.- AND MANY THANKS AGAIN
The reason this happened was becuse I tried to enter ‘debug mode’ to do the following
I weanted to see if I could try to edit the code producing the portfolio grid so I could select a logical AND against categories instead of the OR which you get if you just select a range of categories – in other words – to present portfolio items for Places to Eat in Larig I want to select CATEGORY ‘Places to Eat’ AND CATEGORY ‘Lairg’
Was this OK? sensible? is there a better way maybe?
Last question (honest)
Cheers, Tony
January 14, 2016 at 5:20 pm #565576January 14, 2016 at 8:19 pm #565755Hi Yigit,
I didn’t get very far at all before I broke it.
The best I can remember is trying to follow these instructions:
Fix to open debug mode
To do this, you need to enable the debug field for the Advanced Layout Builder. Adding the following to your child theme functions.php will do that:
//set builder mode to debug
add_action(‘avia_builder_mode’, “builder_set_debug”);
function builder_set_debug()
{
return “debug”;
}If you are not using a child theme you need to add the above function after this line in the theme functions.php:(this applied to me)
if(isset($avia_config[‘use_child_theme_functions_only’])) return;
AFTER A ‘MISS COPY’ (copied across somethin erroneous) I thought I had returned the file to this proper state with the debug code under this line as I have succesfully done before on an another Enfold site
Refused to work after this even when I copied the entire file contents from another site (getting desparte by then )
All I wanted to do was see the lines of code used to control the portfolio grid so maybe I could try to edit the code to select a logical AND against categories instead of the OR which you get as standard – not even sure if this was the best way – just seemed a good idea !
Anyway thanks for your interest Yigit – if you can point me to a way of doing this that would be super – there is an example in my last reponse.
January 18, 2016 at 4:04 am #566875Hey!
You will not see those query because the debug mode will only display the portfolio grid shortcode. You have to modify the config-templatebuilder > aviashortcodes > portfolio.php if you want to alter the query. Where did you find the “AND” or “OR” terms and what do you intend to do with it?
Best regards,
IsmaelJanuary 18, 2016 at 2:11 pm #567218Thanks Iamael,
It was just a hunch – I got myself into a whole heap of trouble following it up! I didn’t actually find the logical operators AND and OR but I have now decided to abandon the operation and use intellegent naming and siort instead.
Also – like to keep within the standard Enfold as far as possible for support.
Thanks anyway!
Cheers
Tony
-
AuthorPosts
- The topic ‘Editing the Theme Functions (functions.php) to set up de-bug mode I've messed up’ is closed to new replies.