How to insert an image between 2 posts
-
I would like to insert an image between the first and second post on my homepage.
I’ve got the following index code:
<?php get_header(); ?> <div id="main_content" class="clearfix"> <div id="left_area"> <?php get_template_part('includes/breadcrumbs', 'index'); ?> <?php get_template_part('includes/entry', 'index'); ?> </div> <!-- end #left_area --> <?php get_sidebar(); ?> </div> <!-- end #main_content --> <?php get_footer(); ?>And the following loop page code:
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <article class="entry post clearfix"> <h1 class="main_title"><?php the_title(); ?></h1> <div class="post-content clearfix"> <?php $thumb = ''; $width = (int) apply_filters('et_image_width',553); $height = (int) apply_filters('et_image_height',240); $classtext = ''; $titletext = get_the_title(); $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Page'); $thumb = $thumbnail["thumb"]; ?> <?php if ( '' != $thumb && 'on' == get_option('trim_page_thumbnails') ) { ?> <div class="featured_box"> <a>"> <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?> </a> </div> <!-- end .featured_box --> <?php } ?> <div class="entry_content"> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<p><strong>'.esc_attr__('Pages','Trim').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <?php edit_post_link(esc_attr__('Edit this page','Trim')); ?> </div> <!-- end .entry_content --> </div> <!-- end .post-content --> </article> <!-- end .post --> <?php endwhile; // end of the loop. ?>What do I have to change in the code(s) to insert an image (by url)?
Hopefully somebody can help me on this.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘How to insert an image between 2 posts’ is closed to new replies.