Syntax Error ( unexpected ‘user_url’ (T_STRING), expecting ‘,’ or ‘;’)
-
Hey there, I’m customising a theme for a client. I want to an element in a theme.
Original, If you clicked the name of the author in the slider, it would like to the author page. I want to change that to the URL the Author filled in when setting up his/her account.This is the code i need to change:
echo '<div class="grav-wrap"><div class="text"><span>'.__('Sponsored by',NECTAR_THEME_NAME).'<a href="<?php echo get_the_author_meta('user_url'); ?>">'.get_the_author().'</a></span><br><div style="margin-top:20px"><span> '.__('for ',NECTAR_THEME_NAME).'</span> '. trim( $cat_output) . '</div></div></div>'; ?>
And this is the string where it goes wrong:
<?php echo get_the_author_meta(‘user_url’); ?>For some reason I get a Syntax Error:
Your PHP code changes were rolled back due to an error on line 3746 of file wp-content/themes/salient/nectar/tinymce/shortcode-processing.php. Please fix and try saving again.syntax error, unexpected ‘user_url’ (T_STRING), expecting ‘,’ or ‘;’
Can someone please help me
- The topic ‘Syntax Error ( unexpected ‘user_url’ (T_STRING), expecting ‘,’ or ‘;’)’ is closed to new replies.