php - How to add an image in a section of a one-page website -
this question has answer here:
- php parse/syntax errors; , how solve them? 11 answers
i'm building one-page theme on wordpress.
i have text on left hand side , insert picture on right when tried add picture in through code error message:
parse error: syntax error, unexpected 'template_directory' (t_string), expecting ',' or ';' in /var/www/wordpress/wp-content/themes/cvtheme2015/front-page.php on line 21
is there forums or video tutorials me ?
<div class="indent"> <section id="meet"> <?php $query = new wp_query('pagename=about-us-single'); //the loop if ($query ->have_posts()){ while ($query->have_posts() ) { $query->the_post(); echo '<h1 class="section-title">' . get_the_title() . '</h1>'; echo '<div class="page">'; the_content(); echo '</div>'; echo '<div class="sun_and_wind">'; echo '<img src="<?php bloginfo('template_directory'); ?>/images/logo.jpg" />;' echo '</div>'; } } /* restore original post data */ wp_reset_postdata(); ?> </section> </div>
i create screenshot below:
try this..
$dir = bloginfo('template_directory'); echo "<img src='$dir/images/logo.jpg' />;"
Comments
Post a Comment