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

    (@takzaria)

    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

    (@ricktotalcool)

    Yes I’ve seen that error. I need advice on how to fix please. It’s 3 lines. 101, 168 and 169.

    Nitish

    (@takzaria)

    Can you send me that pageHome.php file then i can check and let you know how it would be fix..

    Thread Starter ricktotalcool

    (@ricktotalcool)

    Yes @takzaria . Where shall I send.

    Nitish

    (@takzaria)

    you can past code here then i can check what is the issue and help you.

    Thread Starter ricktotalcool

    (@ricktotalcool)

    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

    (@takzaria)

    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 3 years ago by Nitish.
    Nitish

    (@takzaria)

    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 3 years ago by Nitish. Reason: code is no updating
    • This reply was modified 3 years ago by Nitish.
    Thread Starter ricktotalcool

    (@ricktotalcool)

    Terribly sorry @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.