Parse error message – cannot figure out error in code
-
Hi – we really are not understanding a parse error message we are getting.
We used the plugin code to create a table of contents on this page https://ireadlabelsforyou.com/baby-products/. But it throws an error. (I pasted the code and the error message at the end of this message).
The plugin works fine in a different page – https://ireadlabelsforyou.com/products-i-like/.
GOOD CODE HERE
[insert_php]
$args = array(
‘show_option_all’ => ”,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘style’ => ‘list’,
‘show_count’ => 0,
‘hide_empty’ => 1,
‘use_desc_for_title’ => 1,
‘child_of’ => 75,
‘feed’ => ”,
‘feed_type’ => ”,
‘feed_image’ => ”,
‘exclude’ => ”,
‘exclude_tree’ => ”,
‘include’ => ”,
‘hierarchical’ => 1,
‘title_li’ => __( ‘Browse a Category Below:’ ),
‘show_option_none’ => __( ” ),
‘number’ => null,
‘echo’ => 1,
‘depth’ => 0,
‘current_category’ => 0,
‘pad_counts’ => 0,
‘taxonomy’ => ‘category’,
‘walker’ => null
);
wp_list_categories( $args );
[/insert_php]We have reviewed your instructions regarding error messages but just can’t seem to figure out what is wrong. (We are not using visual composer).
Can you look at the code below and the error message to determine what we are doing wrond?
CODE THROWING AN ERROR HERE
[insert_php]
$args = array(
‘show_option_all’ => ”,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘style’ => ‘list’,
‘show_count’ => 0,
‘hide_empty’ => 1,
‘use_desc_for_title’ => 1,
‘child_of’ => 124,
‘feed’ => ”,
‘feed_type’ => ”,
‘feed_image’ => ”,
‘exclude’ => ”,
‘exclude_tree’ => ”,
‘include’ => ”,
‘hierarchical’ => 1,
‘title_li’ => __( ‘Browse a Category Below:’ ),
‘show_option_none’ => __( ” ),
‘number’ => null,
‘echo’ => 1,
‘depth’ => 0,
‘current_category’ => 0,
‘pad_counts’ => 0,
‘taxonomy’ => ‘category’,
‘walker’ => null
);
wp_list_categories( $args );
[/insert_php]
Error Message:
Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home/irinawebb1/public_html/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 3What is it that we are not seeing?
Thank you for your assistance,
Meagan
- The topic ‘Parse error message – cannot figure out error in code’ is closed to new replies.