Community Forums › Forums › Archived Forums › Design Tips and Tricks › Altitude Pro Footer – Changing from one widget footer to the flexible footer
Tagged: Altitude Pro, Flexible Footer, footer
- This topic has 3 replies, 3 voices, and was last updated 8 years, 2 months ago by 1cHrisWs01.
-
AuthorPosts
-
January 10, 2016 at 2:37 am #1761171cHrisWs01Participant
Hi,
I’ve been checking out the options for using more than one widget in the footer of the Altitude Pro Theme.
It seems finding the right code to do this to some was a bit hit and miss so I dug round and implemented the flexible footer model.
I’m using the Workstation Pro for a client and realised it had most of what I wanted.
The code worked fine, and the CSS has inherited the other CSS related to the flexible widgets. So it means I didn’t have create any special CSS for the Flexible Footer.
I went through the code, examined it only deleted the Screen Reader accessibility H2. (It seems Altitude Pro was created pre-screen reader, so I did it to be consistent with the code.) The mod seems to have worked well.
Please Note! Do this at your own risk, Save a copy of functions.php before proceeding.
Here’s the code I changed in functions.php
Step 1
Find the following…
//* Add support for 1-column footer widget area add_theme_support( 'genesis-footer-widgets', 1 );
Replace it with the following code...
//* Add the flexible footer widget area add_action( 'genesis_before_footer', 'altitude_footer_widgets' ); function altitude_footer_widgets() {genesis_widget_area( 'flex-footer', array('before' => '<div id="footer" class="flex-footer footer-widgets"><div class="flexible-widgets widget-area wrap' . altitude_widget_area_class( 'flex-footer' ) . '">','after' => '</div></div>',) );}
Step 2
Go to
//* Register widget areas
After this code …..
genesis_register_sidebar( array( 'id' => 'front-page-7', 'name' => __( 'Front Page 7', 'altitude' ), 'description' => __( 'This is the front page 7 section.', 'altitude' ), ) );
Add this code...
genesis_register_sidebar( array( 'id' => 'flex-footer’, 'name' => __( 'Flexible Footer', 'altitude' ), 'description' => __( 'This is the footer section.', 'altitude' ), ) );
It should now look like this….
genesis_register_sidebar( array( 'id' => 'front-page-7', 'name' => __( 'Front Page 7', 'altitude' ), 'description' => __( 'This is the front page 7 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'flex-footer', 'name' => __( 'Flexible Footer', 'altitude' ), 'description' => __( 'This is the footer section.', 'altitude' ), ) );
You will now have a new Widget Area called "Flexible Footer” and you can add the new widget areas found in the Front Page Layout Configurations (http://my.studiopress.com/setup/altitude-pro-theme/front-page-setup/front-page-layout-configurations/)
If there are any further mods you can see need to occur on this code, happy for you to add a further comment.
I hope this assists
Chris
Chris Mundy
Canberra, AustraliaJanuary 11, 2016 at 4:15 am #176196forensiceyeMemberThanks I was looking for that, but to me seems that I've made somthing wrong while I'm having an error :
Parse error: syntax error, unexpected 'name' (T_STRING), expecting ')' .........public_html/wp-content/themes/altitude-pro/functions.php on line 271
Any help will be appreciate
ThanksJanuary 14, 2016 at 4:20 pm #176523chrisjeubParticipantI have the same issue as @forensiceye. And I'm not able to change the Functions back to normal. It totally crashed my site. I had to manually override my functions.php file to fix it. It is giving me the exact same syntax error:
Parse error: syntax error, unexpected 'name' (T_STRING), expecting ')' in /home1/jeubfami/public_html/monumentsourcebooks/wp-content/themes/altitude-pro/functions.php on line 257
January 17, 2016 at 1:00 am #1767341cHrisWs01ParticipantHi Chris,
Sorry for not getting back to you and '@forensiceye' sooner I 've been away. I checked my code with the code I put up and can't find any discrepancies.
When I did it, I just worked through code methodically using a spreadsheet examining the relevant chunks of code between the the two functions.php files column by column and using a new column as the final code to put into the final functions.php.
Anything more than that I can't help you. Possibly someone with PHP skills can assist.
Chris
Chris Mundy
Canberra, Australia -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.