Parse Error with Argent theme
-
When inserting a gallery in a project page, a syntax error occurs:
Parse error: syntax error, unexpected ‘[‘ in /home/content/91/11523791/html/wp-content/themes/argent/content-portfolio-gallery.php on line 29
The defective code is:
echo ‘<div> ‘ . $image_excerpt_caption . ‘ <img src=’ ‘ . esc_url( wp_get_attachment_image_src( $image, ‘full’ ) [0] ) . ‘ ‘ /></div>’;
Can someone help me fix this?
The blog I need help with is: (visible only to logged in users)
-
Hi imjustink,
Have you tried downloading the theme again and uploading a fresh version of the content-portfolio-gallery.php file to your argent theme directory?
-
Daschultemn,
I just re-downloaded it, deleted the theme I had activated, uploaded a fresh download, and nothing changed as far a the Syntax Error.
-
Daschultemn,
I just re-downloaded it, deleted the theme I had activated, uploaded a fresh download, and nothing changed as far a the Syntax Error.
-
Try replacing that line with this new one:
echo '<div> ' . $image_excerpt_caption . ' <img src=" ' . esc_url( wp_get_attachment_image_src( $image, 'full' )[0] ) . ' " /></div>'; -
Still no luck.
The error stops when I remove the [0] but the gallery’s image links break.
-
I downloaded the Argent theme and created a sample gallery, but could not reproduce the error. What does your gallery shortcode look like?
-
Hmm, interesting.
This is the shortcode I am using for the gallery in the portfolio item page.[gallery type="slideshow" link="none" size="medium" ids="26,20,28"]
- The topic ‘Parse Error with Argent theme’ is closed to new replies.