Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Lost functionality after edit (http://forum.bytesforall.com/showthread.php?t=22864)

SiaRa Oct 10, 2014 03:43 AM

[SOLVED] Lost functionality after edit
 
I've updated to the newest Atahualpa, but we have a custom rotating header image depending on the time and I always adjust that in the bfa_header_config file.
It's never given me any problems, until now. When I have adjusted the code, the upper side of the website stops functioning (i.e. links and buttons cannot be clicked on).
Can anyone tell me what is going wrong?
I probably have to adjust the code, but I would not know where.
Any help would be much appreciated!

I change this (original code):
Code:

// Header Image
        if ( strpos($header_items,'%image') !== FALSE ) {

                // force 'top left' alignment if rotating and fading is on
                if (($bfa_ata['header_image_javascript'] !== "0") AND
                ($bfa_ata['crossslide_fade'] !== "0")) {
                        $bfa_ata['headerimage_alignment'] = 'top left';
                }
               
                ob_start();
                $bfa_header_images = bfa_rotating_header_images();
               
                echo '<div id="imagecontainer-pre" class="header-image-container-pre">';

                echo '    <div id="imagecontainer" class="header-image-container" style="background: url(' .
                $bfa_header_images[array_rand($bfa_header_images)] . ') ' . $bfa_ata['headerimage_alignment'] .
                ' no-repeat;">';
                echo '</div>';
                if ( $bfa_ata['header_image_clickable'] == "Yes" ) {
                        echo '<div class="clickable"><a class="divclick" title="';
                        bloginfo('name'); echo '" href ="' . $homeURL . '/">&nbsp;</a></div>';
                }

Into this:
Code:

    // Header Image
        if ( strpos($header_items,'%image') !== FALSE ) {

date_default_timezone_set("CET"); // Wel handig als het de Nederlandse tijd is ;)


$hour = date( "H" ); // Stop het huidige uur in een variable.

if ( $hour >= 0 && $hour <= 6 )
{
    // als het tussen 0 uur en 5:59 uur is
    ?>
    <img src="http://www.kemet.nl/wp-content/uploads/2013/03/bg_top_met_logo_1200px.jpg" />
    <?php
}
elseif ( $hour >= 7 && $hour <= 11 )
{
    // als het tussen 6 uur en 11:59 uur is
    ?>
    <img src="http://www.kemet.nl/wp-content/uploads/2013/03/bg_top_day_met_logo_1200px.jpg" />
    <?php
}
elseif ( $hour >= 12 && $hour <= 18 )
{
    // als het tussen 12 uur en 17:59 uur is
    ?>
    <img src="http://www.kemet.nl/wp-content/uploads/2013/03/bg_top_day_met_logo_1200px.jpg" />
    <?php
}
elseif ( $hour >= 19 && $hour <= 23 )
{
    // als het tussen 18 uur en 23:59 uur is
    ?>
    <img src="http://www.kemet.nl/wp-content/uploads/2013/03/bg_top_met_logo_1200px.jpg" />
    <?php
}
else
{
    // als het geen van allen is.
    ?>
    <img src="http://www.kemet.nl/wp-content/uploads/2013/03/bg_top_met_logo_1200px.jpg" />
    <?php

}


juggledad Oct 10, 2014 04:07 AM

you are missing a closing '}' at the very end to close the opening '{' in this code
HTML Code:

if ( strpos($header_items,'%image') !== FALSE ) {

SiaRa Oct 11, 2014 02:18 PM

Thank you!
It worked (but you already knew that :) )


All times are GMT -6. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.