Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] Lost functionality after edit


  #1  
Old Oct 10, 2014, 03:43 AM
SiaRa
 
19 posts · Aug 2012
Netherlands
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

}
  #2  
Old Oct 10, 2014, 04:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you are missing a closing '}' at the very end to close the opening '{' in this code
HTML Code:
if ( strpos($header_items,'%image') !== FALSE ) {
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 11, 2014, 02:18 PM
SiaRa
 
19 posts · Aug 2012
Netherlands
Thank you!
It worked (but you already knew that )

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Upgraded and lost all widget functionality blueprairie Sidebars & Widgets 1 Oct 28, 2011 02:19 PM
WP Multisite - ATO functionality vCopia New Versions, & Updating 3 Apr 19, 2011 08:47 AM
[SOLVED] I'm Missing Something... Menu Functionality Seems Less, not More, vs. older StevenLevy Page & Category Menu Bars 2 Nov 6, 2010 09:06 AM
Remove all comment functionality? blueprairie Forum How-To 4 Mar 26, 2009 01:09 PM


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


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