Page not displaying correct information
-
I accidentally wiped out a key bit of code while trying to copy and save code so I would not wipe it out. Now the home page blog displays content from the home page video. I did not write the code for the template. Do not know who did, I did design the site.
Site is at transform-heal.comHere is the code
<?php /** * Template Name: Home Page */ get_header(); ?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <div class="banner"> <div class="ban_img"><?php the_post_thumbnail(array(536,319)) ?></div> <div class="ie_fix"></div> <div class="ban_title"><?php the_title() ?></div> <div class="ban_txt"><?php the_content() ?></div> <div class="cl"></div> </div><!--end of banner--> <div id="index_content"> <?php endwhile; // end of the loop. ?> <?php global $video_library; global $post; $latest_posts = get_posts( array('numberposts' => 1, 'category' => $video_library, 'orderby' => 'post_date', 'order' => 'DESC') ); foreach($latest_posts as $post) : setup_postdata($post); ?> <div class="see_joy"> <h2>See the Joy</h2> <div class="see_video"> <object type="application/x-shockwave-flash" width="352" height="272" data="https://www.youtube.com/v/<?php echo get_post_meta(get_the_ID(), 'Video-Library-Code', true) ?>"> <param name="movie" value="https://www.youtube.com/v/<?php echo get_post_meta(get_the_ID(), 'Video-Library-Code', true) ?>"></param> <param name="wmode" value="transparent"></param> </object> </div> <br><br> <div class="index_title"><strong><?php the_title() ?></strong></div> <?php $content = get_the_content(); if(mb_strlen($content,'UTF-8') > 200) $content = mb_substr($content,0,300,'UTF-8').'...'; ?> <p><?php echo $content; ?><a href="<?php the_permalink() ?>"> VIEW LARGER</a></p> </div><!--end of see_joy--> <br> <a href="https://www.transform-heal.com/10lessonsbook/"><img class=img class="size-full wp-image-2585" title="HP-bookLesson-but.jpg" src="https://www.transform-heal.com/wp-content/uploads/2011/10/HP-bookLesson-but.jpg" alt="Order Book" width="500" height="200" /></a> <br><br> <div class="current_blog"> <h2><?php esc_attr_e('Healing Blog','Transformational Heal') ?></h2> <div class="current_img"><?php the_post_thumbnail('home-blog-thumb') ?></div> <div class="index_title"><span><?php the_time('n') ?>.<strong><?php the_time('j') ?></strong>.<?php the_time('y') ?></span> <?php the_title() ?></strong></div> <?php $content = get_the_content(); if(mb_strlen($content,'UTF-8') > 220) $content = mb_substr($content,0,200,'UTF-8'); ?> <p><?php echo $content; ?> <a href="<?php the_permalink() ?>">MORE</a>.</p> </div><!--end of current_blog--> <div class="testimonial2"> <div class="tes_img"><img src="<?php echo get_post_meta(get_the_ID(), 'in-your-words-img', true) ?>" alt="" /></div> <div class="tes_txt"> <h2><?php esc_attr_e('In Your Words','Transformational Heal') ?></h2> <blockquote>"Every time I see Cindy I come away feeling empowered, stronger, and feeling like I can breath again to face life's challenges. Thank you Cindy." -CZ <br><br> “It's not overstatement to say that our work together was a complete game changer for me. You helped me let go of painful attachments and to open myself up to happiness. My ex and I get along better than ever and the boys have adjusted well to the new world order. You asked me to envision what a happy relationship looks like. I work every day to be a good to myself and others embrace a healthy lifestyle. Thank you for making a difference in my life ” J.P. </blockquote> <?php echo get_post_meta(get_the_ID(), 'in-your-words', true) ?> </div> </div><!--end of testimonial2--> <?php endforeach; ?> <?php get_footer(); ?>
Help please.
- The topic ‘Page not displaying correct information’ is closed to new replies.