# Help with PHP code please

**URL:** <https://www.phphelp.com/t/help-with-php-code-please/27594>\
**Category:** General PHP Help\
**Created:** [November 14, 2018, 4:03pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594 "2018-11-14T16:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianzzz](https://www.phphelp.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@ianzzz](https://www.phphelp.com/u/ianzzz)\
**Post date:** [November 14, 2018, 4:03pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594/1 "2018-11-14T16:03:06Z")

</div>

I am a complete novice and would like to remove an image from my website. my website address is [swallowdale](https://www.swallowdale-brundall.co.uk)  
The image is of the overlay of the people on the second pic on the page under the Cottage Facilities heading. The image is called old\_family.png  
Below is the php code.  
Any advice on what I need to alter to do this would be great.

\<?php /\* Template name: Home page \*/ get\_header();?\>

```
<main>

<?php 

$postid = get_the_id();

// $aboutus_title = get_post_meta($postid,"_cmb_aboutus_title",true);
// $about_para = get_post_meta($postid,"_cmb_about_para",true);
$about_read_more = get_post_meta($postid,"_cmb_read_more_url",true);
$about_img = get_post_meta($postid,"_cmb_aboutus_img",true);	

$to_do_heading = get_post_meta($postid,"to_do_heading",true);
$ser_sm_para = get_post_meta($postid,"service_small_para",true);

$work_part_one_heading = get_post_meta($postid,"work_part_one_heading",true);
$work_part_two_heading = get_post_meta($postid,"work_part_two_heading",true);

$brundall_heading = get_post_meta($postid,"brundall_heading",true);

$home_gallery_heading = get_post_meta($postid,"home_gallery_heading",true);
$gallery_book_now_link = get_post_meta($postid,"gallery_book_now_link",true);
$home_gallery_view_more = get_post_meta($postid,"home_gallery_view_more",true);
$home_gallery_short_code = get_post_meta($postid,"home_gallery_short_code",true);

$home_more_reviews_link = get_post_meta($postid,"home_more_reviews_link",true);

$cottage_view_more_link = get_post_meta($postid,"cottage_view_more_link",true);
$cottage_book_now_link_here = get_post_meta($postid,"cottage_book_now_link_here",true);

?>

	    <div class="about_cover">
	      <div class="container">
            <div class="about_box_text">
              <!-- <div class="sec_heading">
              	<h2><?php // echo $aboutus_title; ?></h2>
              </div> -->

              <!-- <p><?php // echo $about_para; ?></p> -->
              <div class="row">
              <?php
			      while ( have_posts() ) : the_post();

			        get_template_part( 'template-parts/page/content', 'page' );

			        // If comments are open or we have at least one comment, load up the comment template.
			        if ( comments_open() || get_comments_number() ) :
			          comments_template();
			        endif;

			      endwhile; // End of the loop.
			   ?>
			   </div>

              <a class="custom_button" href="<?php echo $about_read_more ?>">Book Now <i class="fa fa-angle-double-right"></i></a>
            </div>

	        <!-- <div class="col-sm-5 pull-left">
	          <div class="about_img">
	            <img class="img-responsive" src="<?php //echo $about_img; ?>" alt="">
	          </div>
 			</div> -->
	      </div>
	    </div>
	    <div class="works_cover">
    	 <img class="old_couple img-responsive" src="<?php echo bloginfo("template_url") ?>/assets/images/old_family.png" alt="old_family.">
    	 

	      <div class="container">
	        <div class="sec_heading"><h2><?php echo CFS()->get( 'title' ); ?></h2></div>	   
	        	<div class="row">
		          <div class="works_right_side col-sm-6">
		          	 <div class="fac_list_box">	
		          		<ul class="works_box_cover">
		          		  <li><h4> <?php echo $work_part_one_heading; ?> </h4></li>
		          		   <?php 
				        		$loop = CFS()->get('work_part_one');
								foreach ( $loop as $row ) {	
				        	?>
					          <li>
				                <i class="fa fa-circle-o"></i><?php echo $row['paragraph_box']; ?> 
				              </li>
				         <?php } ?>
		          		</ul>
		          		<div class="some_btn_box">
		          			<a class="custom_button bkl" href="<?php echo $cottage_view_more_link ?>"> View More <i class="fa fa-angle-double-right"></i></a>
		          			<a class="custom_button" href="<?php echo $cottage_book_now_link_here ?>"> Book Now <i class="fa fa-angle-double-right"></i></a>
		          		</div>
					  </div>			          	
		          	</div>
		        </div>
	      </div>
	    </div>
	    <div class="servive_cover">
	      <div class="container-fluid">
	        <div class="sec_heading"><h2><?php echo $to_do_heading ?></h2></div>
	        
	        <?php if($ser_sm_para!=""){ ?>
	        <p class="simple_para"><?php echo $ser_sm_para ?></p>
	        <?php } ?>
	        <div class="row">
	        	<?php 
	        		$num = 0;
	        		$loop = CFS()->get('services');
					foreach ( $loop as $row ) {	
					$num ++;
	        	?>
	        			        	
	          <div class="col-sm-4">
	       	      <div class="inner_ser_box">		
		            <img class="img-responsive" src="<?php echo $row['service_image']; ?>" alt="<?php echo $num;?>">
		            <h3><a href="<?php echo $row['link']; ?>"><?php echo $row['service_heading']; ?></a></h3>	
		       	  </div>	
	          </div>
	          <?php } ?>

	        </div>  
	      </div>
	    </div>
	    <div class="holiday_home_cover">
	    	<div class="container">
		      <div class="sec_heading"><h2><?php echo $brundall_heading ?></h2></div>
				<div class="row">
		      <?php 

		      $some = CFS() -> get('brundall_loop_box');

		      foreach ( $some as $row ) {

		      	?>

		      		<div class="col-sm-6">
		      			<div class="brundall_box_text">
			      			<?php if ( $row['brundall_para_heading'] !="" ): ?>
				      			<h3><?php echo $row['brundall_para_heading'] ?></h3>
			      			<?php endif ?>

			      			<?php if ($row['brundall_para'] !="" ): ?>
				      			<p><?php echo $row['brundall_para'] ?></p>
			      			<?php endif ?>

			      			<?php if ($row['brundall_link'] != ""): ?>
				      			<a class="custom_button" href="<?php echo $row['brundall_link'] ?>">Book Now <i class="fa fa-angle-double-right"></i></a>
			      			<?php endif ?>
			      		</div>
		      		</div>
	      		
		      	<?php
		      }

		      ?>
		      </div>
	    	</div>
	    </div>

	    <div class="home_gallery_cover">
	    	<div class="container">
	    		<div class="sec_heading"><h2><?php echo $home_gallery_heading ?></h2></div>
	    		<div class="home_gallery_inner">

	    			<?php echo do_shortcode($home_gallery_short_code); ?>

	    			<a class="custom_button bkl" href="<?php echo $home_gallery_view_more ?>">View More <i class="fa fa-angle-double-down"></i></a>
	    		</div>
	    		<div class="home_gallery_box">
	    			<h3><?php echo CFS()->get( 'book-swallowdale-holiday' ); ?></h3>
	    			<p><?php echo CFS()->get( 'book-swallowdale-holiday-sub_title' ); ?></p>
	    			<a class="custom_button" href="<?php echo CFS()->get( 'book-swallowdale-holiday-button_link' ); ?>">Book Now <i class="fa fa-angle-double-right"></i></a>
	    		</div>
	    	</div>
	    </div>
	    <div class="home_testimonial_cover">
	    	<div class="container">
			  <div class="row">	
				<div class="col-sm-8">
					<div id="testimonial_cover" class="owl-carousel owl-theme">
						<?php 
							$args = array(
								'post_type' => 'testimonials',
								'post_status' => 'publish'
							);
							$testimonials = new WP_Query($args);

							if( $testimonials->have_posts() ){

								while ( $testimonials->have_posts() ) {
									$testimonials -> the_post();
									 ?>
									<div class="item">
							          	<div class="test_box">
											<p><?php echo get_the_content(); ?></p>
							          		<span><?php echo get_the_title(); ?> </span>
										</div>	
									</div>

								 <?php
								}
							}else{

								?>
								  <h3>No Testimonials ...!</h3>
								<?php

							}
						?>
						</div>
				</div>
				<div class="col-sm-4">
					<a class="custom_button" href="<?php echo $home_more_reviews_link ?>">More Reviews <i class="fa fa-angle-double-right"></i></a>						
				</div>
			  </div>	
	    	</div>	
	    </div>
	  </main>

```

\<?php get\_footer(); ?\> 

Thanks.

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [November 14, 2018, 5:13pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594/2 "2018-11-14T17:13:51Z")

</div>

If you log into the admin section, you will likely find the image you want to remove there. There is no point in looking at the PHP code for a wordpress site for your issue.

---

<div class="post-metadata">

**Author:** ![ianzzz](https://www.phphelp.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@ianzzz](https://www.phphelp.com/u/ianzzz)\
**Post date:** [November 14, 2018, 5:32pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594/3 "2018-11-14T17:32:28Z")

</div>

Thankyou for your reply.

Yes I could delete the image but when the page loads surely it will still look for the image to load it and not be able to find it. Don’t I need to delete the reference to it in the php file?

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [November 14, 2018, 6:16pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594/4 "2018-11-14T18:16:05Z")

</div>

That image is there because it is in a plugin. You need to removed it from the plugin.

---

<div class="post-metadata">

**Author:** ![ianzzz](https://www.phphelp.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@ianzzz](https://www.phphelp.com/u/ianzzz)\
**Post date:** [November 14, 2018, 7:02pm UTC](https://www.phphelp.com/t/help-with-php-code-please/27594/5 "2018-11-14T19:02:49Z")

</div>

Thank you.  
I deleted the image and it’s gone. But now on a computer screen there is a large white space so I now need to work out how to move the image of the property nearer the middle of the screen.

I have put the image of the people back on temporarily.

Thanks.
