Title: GET FIELD / PHP ISSUE
Last modified: November 12, 2021

---

# GET FIELD / PHP ISSUE

 *  [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * (@ricktotalcool)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/)
 * Looking for guidance please.
 * I think It’s been caused by me updating to PHP 7.4 when I’ve transferred where
   the website is hosted. I’ve Googled some fixes and have found the lines in the
   file pagehome.php but haven’t felt confident making the suggested changes!
 * I think it’s causing my SSL to not load on the home page only. I also think it’s
   causing an issue when trying to update to the latest version of WordPress.
 * Images links below:
 * [https://totalcool.co.uk/wp-content/uploads/2021/11/unnamed-2.png](https://totalcool.co.uk/wp-content/uploads/2021/11/unnamed-2.png)
 * [https://totalcool.co.uk/wp-content/uploads/2021/11/unnamed.png](https://totalcool.co.uk/wp-content/uploads/2021/11/unnamed.png)
    -  This topic was modified 4 years, 6 months ago by [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/).
    -  This topic was modified 4 years, 6 months ago by [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fget-field-php-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Nitish](https://wordpress.org/support/users/takzaria/)
 * (@takzaria)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061684)
 * Hi there,
 * I checked your website issue by inspecting the code and it is not taking path
   correctly and showing error i.e
    <b>Notice</b>: Trying to access array offset
   on value of type bool in <b>/home/y91uq1j4xkgx/public_html/wp-content/themes/
   totalcool/pageHome.php</b> on line <b>168</b><br />
 *  Thread Starter [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * (@ricktotalcool)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061692)
 * Yes I’ve seen that error. I need advice on how to fix please. It’s 3 lines. 101,
   168 and 169.
 *  [Nitish](https://wordpress.org/support/users/takzaria/)
 * (@takzaria)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061728)
 * Can you send me that pageHome.php file then i can check and let you know how 
   it would be fix..
 *  Thread Starter [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * (@ricktotalcool)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061750)
 * Yes [@takzaria](https://wordpress.org/support/users/takzaria/) . Where shall 
   I send.
 *  [Nitish](https://wordpress.org/support/users/takzaria/)
 * (@takzaria)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061760)
 * you can past code here then i can check what is the issue and help you.
 *  Thread Starter [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * (@ricktotalcool)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061773)
 * **ERROR1**
 *     ```
       <section id="homeSection2" style="background-color: <?php the_field('section_2_bkg_colour'); ?>" class="clearfix position-relative homeSection">
       	<div class="container">
   
       		<div class="tcrow">
   
                   <div class="tccol twothirds">
                       <a class="videolink" onclick="openModle('https://www.youtube.com/embed/8lGJA0m9CAI','Totalcool')">
                           <img class="section2Img" src="<?php echo get_field('section_2_image')['url']; ?>">
                       </a>
                   </div>
       			<div class="tccol third homeSection2col2">
   
       				<?php if(have_rows('section_2_bullets')) : ?>
       					<ul>
       						<?php while (have_rows('section_2_bullets')) : the_row(); ?>
       							<li><?php the_sub_field('item'); ?></li>
       						<?php endwhile; ?>
       					</ul>
       				<?php endif; ?>
                       <img class="position-absolute section3Logo" src="<?php echo get_field('section_3_logo')['url']; ?>">
       			</div>
       ```
   
 * **ERRORS 2 AND 3**
 *     ```
       <section id="homeSection3" class="clearfix position-relative homeSection">
   
       	<img class="position-absolute section3Bkg" src="<?php echo get_field('section_3_bkg_image')['url']; ?>">
           <h3 class="section3Header">
                       EXPLORE OUR<br><br>
                       <span>NEW RANGE</span>   
                   </h3>
               <div class="container">
   
                   <div class="tcrow section3Top productRow" >
   
                       <div class="tccol half">
                           <a class="videolink" onclick="openModle('https://www.youtube.com/embed/TO3xLNhykw0','Totalfreeze 35')">
                           <img src="https://totalcool.co.uk/wp-content/uploads/2021/02/Mainpagenew-Slices_13-copy-3.png" alt="Totalfreeze"/>
                           </a>
       <!--                    <iframe width="560" height="315" src="https://www.youtube.com/embed/xt586wshYRQ?showinfo=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>-->
                       </div>
                       <div class="tccol half">
                           <img class="Section3ProductLogo" src="https://totalcool.co.uk/wp-content/uploads/2021/01/TotalFreeze.png" alt="Totalcool Totalfreeze Logo"/>
                           <p>Introducing the all new Totalfreeze portable 12v/24v and mains power compressor fridge freezers.<br>Manufactured from the highest quality components, the Totalfreeze range is lightweight, robust and beautifully designed. All this and an exceptionally low current draw at 40-50 watts...</p>
                           <a href="/products" class="btn btn-custom section3BtnLeft">Buy Now</a>
                       </div>
                       </div>
                       <div class="tcrow productRow" >
                       <div class="tccol half">
                           <a class="videolink" onclick="openModle('https://www.youtube.com/embed/PYI2_zQxSC8','Totalpower 500')">
                           <img src="https://totalcool.co.uk/wp-content/uploads/2021/02/Mainpagenew-Slices_17-3.png" alt="Totalpower 500"/>
                           </a>
       <!--                    <iframe width="560" height="315" src="https://www.youtube.com/embed/GKKWxxEZ9zc?showinfo=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>-->
                       </div>
                       <div class="tccol half">
   
                           <img class="Section3ProductLogo" src="https://totalcool.co.uk/wp-content/uploads/2021/01/Totalpower500.png" alt="Totalcool Totalpower 500 Logo"/>
                           <p>The Totalpower 500 is the very latest in lightweight power technology. Using the highest quality components and ergonomic design.<br>Perfect for running the Totalfreeze coolbox range, the Totalcool 3000 evaporative cooling system, laptops, mobile phones and more...</p>
                           <a href="/products" class="btn btn-custom section3BtnLeft">Buy Now</a>
                       </div>
   
                       </div>
                       <div class="tcrow productRow" >
   
                       <div class="tccol half">
                               <a class="videolink" onclick="openModle('https://www.youtube.com/embed/HAm1ly6fMYI','Totalpower 144')">
                                   <img src="https://totalcool.co.uk/wp-content/uploads/2021/02/Mainpagenew-Slices_22-copy-2.png" alt="Totalpower 144"/>
                               </a>
       <!--                    <iframe width="560" height="315" src="https://www.youtube.com/embed/f04DA8lsa4I?showinfo=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>-->
                       </div>
                       <div class="tccol half">
                           <img class="Section3ProductLogo" src="https://totalcool.co.uk/wp-content/uploads/2021/01/Totalpower144.png" alt="Totalcool Totalpower 144 Logo"/>
                           <p>Introducing the Totalpower 144 MSC Water Resistant 144 Watt Triple USB 5v & 12v, Premium Lithium-ion Power Bank. Powerful, small and ultra lightweight.<br>
                               This power bank is suitable for use with The Totalcool 3000, Totalfreeze Fridges/Freezers, Phones, Tablets, USB/12v lights, Garmin, Go Pro, 12v TVs, Drones, Motorola Radios, and much more.
                               </p>
                           <a href="/products" class="btn btn-custom section3BtnLeft">Buy Now</a>
       <!--                    <a onclick="openModle('https://www.youtube.com/embed/xt586wshYRQ','Totalfreeze 35')">Totalfreeze 35</a>-->
                       </div>
                   </div>
       	<img class="position-absolute section3Img" src="<?php echo get_field('section_3_top_image')['url']; ?>">
       	<img class="position-absolute section3Img2" src="<?php echo get_field('section_3_bottom_image')['url']; ?>">
       ```
   
 *  [Nitish](https://wordpress.org/support/users/takzaria/)
 * (@takzaria)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061896)
 * Add this for error 1
 * <?php
    $section_2_image = get_field(‘section_2_image’);?>
 *  
    “>
 * =============================
 * Add this code for ERRORS 2 AND 3
 * <?php
    $top_image = get_field(‘section_3_top_image’); $botttom_image = get_field(‘
   section_3_top_image’); ?> “> “>`
    -  This reply was modified 4 years, 6 months ago by [Nitish](https://wordpress.org/support/users/takzaria/).
 *  [Nitish](https://wordpress.org/support/users/takzaria/)
 * (@takzaria)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15061938)
 * Add this code for ERRORS 2 AND 3
 * <?php
    $top_image = get_field(‘section_3_top_image’); $botttom_image = get_field(‘
   section_3_bottom_image’); ?>
 * src=”<?php echo esc_url($top_image[‘url’]); ?>
    src=”<?php echo esc_url($botttom_image[‘
   url’]); ?>
 * Don’t know why full code is not updating in editor you can add src code like 
   this and check..
    -  This reply was modified 4 years, 6 months ago by [Nitish](https://wordpress.org/support/users/takzaria/).
      Reason: code is no updating
    -  This reply was modified 4 years, 6 months ago by [Nitish](https://wordpress.org/support/users/takzaria/).
 *  Thread Starter [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * (@ricktotalcool)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15062701)
 * Terribly sorry [@takzaria](https://wordpress.org/support/users/takzaria/)
 * Where am I putting the code?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘GET FIELD / PHP ISSUE’ is closed to new replies.

## Tags

 * [get_field](https://wordpress.org/support/topic-tag/get_field/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [ricktotalcool](https://wordpress.org/support/users/ricktotalcool/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/get-field-php-issue/#post-15062701)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
