Parse Error
-
Parse error: syntax error, unexpected ‘<‘ in /storage/content/
Did some changes in the meta-boxes.php code
When I saved it did not accept. When I did undo it would not savePlease help!
-
This is the site now
https://www.sj?lvklart.nu/Try:
– switching to the default theme by renaming your current theme’s folder inside wp-content/themes and adding “-old” to the end of the folder name using FTP or whatever file management application your host provides.– resetting the plugins folder by FTP or phpMyAdmin.
– re-uploading all files & folders – except the wp-content folder and the wp-config.php & root .htaccess files – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.
Sometimes you have to edit a file outside the WordPress theme editor (because the web site is screwed up). Use FTP to download the file and edit it in a text editor on your computer, then upload the edited file via FTP. Some text editors do the FTP for you. I never use the WordPress editors.
Look at the full error message. It should have the file and line number in it. Look at that line and correct it or show us the code. The error may be above or below that line.
When showing the code, add a few lines from above that line number and a few lines from below it.
For example, if the error is on line 100, show lines 90 through 110. Place code between back ticks (which is on the upper left side of an American keyboard). Or highlight the code and press the
code
button in the editor.In the future, show the entire error message when asking for help and show the code.
the problem is that i cannot even log inn to the site
I only get this message
Parse error: syntax error, unexpected ‘<‘ in /storage/content/76/150276/xn--sjlvklart-w2a.nu/public_html/wp-content/themes/IncredibleWP/meta-boxes.php on line 170I am not to technical person. I can accces the WP but I cannot do anything
Thanks for that What FTP editdor should i use? I am not very technical sorry for this
CharlesClarkson canI send you the full code?
Do you know how to connect to your web site and download a file?
If so, download the
/wp-content/themes/IncredibleWP/meta-boxes.php
file.Do you know how to edit a text file on your local computer?
If so load the file into the text editor. Note: Microsoft Word is not a text editor. Microsoft Notepad is a text editor.
If you send the file to me, no one else with a similar error will be able to see the solution.
Instead, add line 160 through line 180 in a reply so everyone can see the problem and the solution.
The only way I know how to connect to the site is through WP so the answer is I do not know any other way. Could you guide me?
Hereis the full code
<?php /** * Initialize the meta boxes. */ add_action( 'admin_init', '_custom_meta_boxes' ); /** * Meta Boxes demo code. * * You can find all the available option types * in demo-theme-options.php. * * @return void * * @access private * @since 2.0 */ function _custom_meta_boxes() { /** * Create a custom meta boxes array that we pass to * the OptionTree Meta Box API Class. */ $sidebars = ot_get_option('incr_sidebars'); $sidebars_array = array(); $sidebars_array[0] = array ( 'label' => "Default sidebar", 'value' => 'sidebar' ); $sidebars_k = 1; if(!empty($sidebars)){ foreach($sidebars as $sidebar){ $sidebars_array[$sidebars_k++] = array( 'label' => $sidebar['title'], 'value' => $sidebar['id'] ); } } $my_meta_box = array( 'id' => 'incr_metabox_sidebar', 'title' => 'Layout', 'desc' => 'If you chose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.', 'pages' => array( 'post','page' ), 'context' => 'side', 'priority' => 'high', 'fields' => array( array( 'id' => 'incr_sidebar_layout', 'label' => 'Layout', 'desc' => '', 'std' => 'right-sidebar', 'type' => 'radio_image', 'class' => '' ), array( 'id' => 'incr_sidebar_set', 'label' => 'Sidebar', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => $sidebars_array ) ) ); $my_meta_box2 = array( 'id' => 'incr_metabox_featue', 'title' => 'Post options', 'desc' => 'Select post display options.', 'pages' => array( 'post' ), 'context' => 'side', 'priority' => 'high', 'fields' => array( array( 'id' => 'incr_feattype', 'label' => 'Display type', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => array( array( 'label' => 'Show thumbnail', 'value' => 'show_thumb' ), array( 'label' => 'Hide thumbnail', 'value' => 'hide_thumb' ), array( 'label' => 'Show video', 'value' => 'show_video' ), array( 'label' => 'Show Gallery (from attachments)', 'value' => 'show_gallery' ) ) ), array( 'id' => 'incr_video_link', 'label' => 'Link to Video', 'desc' => 'Just link, not embed code, this field uses oEmbed.', 'std' => '', 'type' => 'text', 'class' => '', ) ) ); $my_meta_box3 = array( 'id' => 'incr_metabox_subtitle', 'title' => 'Subtitle', 'desc' => '', 'pages' => array( 'page', 'portfolio' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'id' => 'incr_subtitle', 'label' => 'Subtitle', 'desc' => 'Set subtitle for page.', 'std' => '', 'type' => 'text', 'class' => '', ) ) ); $my_meta_box4 = array( 'id' => 'incr_metabox_slider', 'title' => 'Slider settings', 'desc' => 'If you want to use Revolution Slider on this page, select page template "Revlution Page" and put here Alias of slider you want to display', 'pages' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'id' => 'incr_page_revolution', 'label' => 'Revolution Slider Alias', 'desc' => 'Check it in settings of your slider.', 'std' => '', 'type' => 'text', 'class' => '', ) ) ); /** * Register our meta boxes using the * ot_register_meta_box() function. */ ot_register_meta_box( $my_meta_box ); ot_register_meta_box( $my_meta_box2 ); ot_register_meta_box( $my_meta_box3 ); ot_register_meta_box( $my_meta_box4 ); }
[Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]
The only way I know how to connect to the site is through WP so the answer is I do not know any other way. Could you guide me?
Read the glossary definition of FTP and follow the links there.
Are you sure that is the correct file? There is only 165 lines in it. So, there is no line 170.
Perhaps this is the file before you edited it?
Yes this was before I mistakenly edited it.
Then I did undo and tried so save the original version
Then it would not acceptYour hosts should be able to assist you with using FTP. You may have to re-upload a fresh copy of your theme (or at least its meta-boxes.php file).
I downloaded filezilla FTP client. Tryed to log in with the same credentials as with the WP. It will not connect
Sorry for having a novise (economist only)in this forumThen it would not accept
By “it” I assume you mean the WordPress Theme Editor. It probably will not accept the file save because of the parse error.
We need to see the file that is on the web server to fix the error.
I realize you are not technical, but you need to become technical enough to do this. Especially if you are going to be editing files. This error will happen again (it happens to me almost daily) and you need to know how to fix it yourself.
Follow the link above to the FTP definition and the links there to get an FTP client and to download this file.
Note: You can also upload the file you showed (using FTP) to replace the file on your web server. It will delete any changes you made, but it will probably fix the problem.
- The topic ‘Parse Error’ is closed to new replies.