New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to customize the one page Genesis child theme Altitude Pro. #2
Comments
Continuing---> Changing the transparent site-header to another color.Inside style.css.
The existing .site-header CSS code looks like this:
I adjusted the background color and added a box shadow.
I turned the background black color into a light blue hex code color. Adding opacity to the site header (see through header) I have two options to create a see through light blue site header:
NB! If your having a problem that the images do not go all the way to the top. To move the images a little higher up one needs to comment out some code. In the Front Page section of the style.css file.
Comment out (or remove) the border-top to get the background images to start at the top of each section. Site header during scroll I need to make changes to the site header during scroll. Inside the Site Header section.
I changed the background color to the same light blue I used above and added an opacity of 0.7.
A tip! Additional adjustments made to the site header.Inside style.css.
The header height changes on scroll. I adjusted the following title-area CSS so the padding became the same as the scrolling header.
Adjusted to:
I changed the width of the title area from 360px to 250px because it takes too much space away from the menu on the right we will soon create.
Adding a fixed footerIf you have a page or post with very little content the footer might not stay at the bottom but move further up. To tell it to stick to the bottom one option is to use the following CSS that you can add to your style.css.
I found the code here: wpbeaches.com/adding-sticky-footer-genesis-theme-flexbox/ |
— PART 2 —Creating the top primary menu. Create a new menu. Below in Menu settings. In Display location select Header Menu. Then click Custom Links to add a custom link. Give each link a name by doing so inside the Link Text box. For this example I am calling them Front page and then a number. Add the various custom links to the menu.
NB!# = anchor. An anchor is often used to link to a section on the same page. Frontend: The menu should now show up here beside the title. Adjusting the menu.Inside style.css.
The menu moved further up getting too close to the top. I adjusted by adding a margin top.
On hover/mouseover – Adjusting the bottom white border line and the link color. We are still in the Site Navigation area a little further up from the .nav-primary code.
A tip! To remove the bottom border color replace the hex color with none. Like so: border-color: none; Adjusting the menu links placement in relation to each other and the bottom border line placement.
Adjusted:
I added a padding 15px to adjust the distance between the menu links and the bottom border line. A tip! Another option to only effect the border line placement is to add a padding-bottom: 8px; Adjusting the menu padding on scroll. A few code blocks up is the following code.
We need to use the same padding as we did further above:
Adjusting the Media queries – responsive design Original: Adjust to: Next look for the following code a little further down:
I want to change the background color. I also added some height.
Background color is changed to the same light blue I have earlier added to the site header. Go to: @media only screen and (max-width: 800px) {
Adjusted to:
NB! Media queries is something you will need to experiment with to get right for your unique site. |
Creating parallax effects when scrolling the front page.I am using two files. One to create the main animation effects and a CSS file to styling the animations. “Waypoints is the easiest way to trigger a function when you scroll to an element.” Download waypoints: https://imakewebthings.com/waypoints/ Copy/move the lib/jquery.waypoints.min.js file to the child theme js folder. Create waypoints-init.js file inside the js folder of your child theme. Inside waypoints-init.js file I added the following code. It gives an idea of how it works. Experiment with it.
Inside the functions.php file in the Enqueue scripts and styles section:
I added the animate.css to my child theme root folder. So it points directly to animate.css. NB! |
Creating an inner page similar to the main parallax page.Inside functions.php Duplicate the section that says //* Register widget areas and all the code belonging to that section. Paste it just below the front-page widget areas. Then rename all mentions of the word front page. Or just copy the following code and paste it below the pre existing front page widget areas.
Duplicate front-page.php. Then rename it. I renamed mine to template_inner-page.php. Inside template_inner-page.php I renamed all mentions of the word front to become inner.
NB! Be sure to rename all mentions of the word front to inner. lib/Customize.php Control inside -> Setting. Setting inside -> Section. Duplicate:
Paste just below and adjust to become:
Duplicate:
Paste just below and adjust to become:
Duplicate:
Paste just below and adjust to become:
lib/output.php Here is the adjusted code: Duplicate: Paste just below and adjust to become:
Duplicate:
Paste just below and adjust to become:
Duplicate:
Paste just below and adjust to become:
Duplicate:
Paste just below and adjust to become:
NB! Rename template_inner-page.php to whatever name you called your template. style.css I begin from the top searching all mentions of the word front-page. Here is all of the CSS that mentions front-page as well as the inner-pages that I added:
The next area is inside the media queries:
|
Other things I have adjusted are: Made a conditional menu to only show on posts (or anywhere you choose). Showing menu depending on certain conditions. The following: One menu is the primary. Another is not connected with any menu location. Options ! = is not. I have used it below. Is not page then use the menu I named “Sub menu”. (Does not use any of the menu locations.)
https://codex.wordpress.org/Function_Reference/is_page Also see my tutorial on adding an image behind the title of the post, page or blog preview page: |
Adding a hello bar to the top area of the headerI followed the tutorial: wpbeaches.com/adding-in-a-hello-tool-bar-to-the-top-of-a-genesis-theme to add a Hello Tool Bar to the top of the Altitude Pro. This is what i looks like when scrolling. A quick run through.
Then create a left/right Tool Bar.
Add the following CSS to the style.css:
In addition I also adjusted the following CSS code:
To use the hello bar: To turn it off: |
Additional resources Adding a hello toolbar to the top of a Genesis theme: Note to myself. Test out: https://callmenick.com/post/single-page-site-with-smooth-scrolling-highlighted-link-and-fixed-navigation This tutorial will be updated on occasion. |
Transferring the tutorial: https://www.easywebdesigntutorials.com/customizing-altitude-pro-genesis-child-theme/ to this issue, as the tutorial will soon totally change.
Btw You can download my custom theme at: github.com/paaljoachim/3-Custom-Altitude-Pro-Genesis
(It also includes featured image behind the title. From this tutorial: Genesis adding a full width image behind the title )
---> #1
— Updated January 2018 based on Altitude Pro 1.1.3—
— PART 1 —
NB!
Make a duplicate/copy of Altitude Pro theme before modifying it.
I renamed the theme folder to altitude-pro-backup and then opened the style.css and renamed: Theme Name: Altitude Pro backup. Check the themes section and notice you now have a backup of Altitude Pro theme.
NB2! Sometimes Chrome can be really slow and refreshing a site. So even after changing the CSS it might show the old CSS. To help improve on seeing the new adjustments open Inspect (right click and select Inspect). Hold down the mouse button over the refresh and select “Empty Cache and Hard Reload”. This will hopefully make the new changes visible.
Update: I have a fix so that one can quicker see the CSS updates. It will force the cache to refresh. Add the following into the child theme functions file:
– Part 1 –
Add static pages. Add a home and blog page.
WordPress backend:
Why? Because we want do not want the blog on the front page (well I do not want to that is).
Change to static pages through Settings -> Reading.
Select the Front and Posts pages.
Add widgets to the Front Page widget sections so all the sections become visible.
WordPress backend:
Go to Appearance -> Widgets add a widget to each Front Page widget area. To see all 7 widget sections on the front page there needs to be a widget in each. I added a text widget where I wrote Front page 2 then a Front page 3 etc all the way up to 7. Check the site. You should now be able to see all the 7 sections. There should be an image in Front Page 1, 3, 5 and 7. Front page 2, 4 and 6 should contain a solid color.
Altitude Pro Widget sections – I used the Black Studio Visual Editor widget plugin and added a widget to each section.
Adding background images to all the Featured Sections
One can add an image for featured section 1,3,5 and 7. I will change this so one can add images for all 7 sections. 1,2,3,4,5,6 and 7. So we have the option to insert an image in any of the sections.
Inside the theme folder -> lib ->
customize.php
Look for where it says:
$images = apply_filters( ‘altitude_images’, array( ‘1’, ‘3’, ‘5’, ‘7’ ) );
(Just below the commented area in the top. It might be line 23.)
Then change it to:
$images = apply_filters( ‘altitude_images’, array( ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’ ) );
output.php
Look for where it says:
$opts = apply_filters( ‘altitude_images’, array( ‘1’, ‘3’, ‘5’, ‘7’ ) );
(Just below the commented area in the top. It might be line 27.)
Then change it to:
$opts = apply_filters( ‘altitude_images’, array( ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’ ) );
Inside the theme root folder ->front-page.php
Look for where it says: // Add markup for front page widgets. (Scroll down the page.)
Inside this area it says front-page-1, front-page-2 etc.
Notice that front-page-1 has:
and notice that front-page-2 has:
We want to change all the solid sections to become image sections.
This means copy:
inside front-page-2, 4, 6
This is what front-page-2, 4 and 6 look like after the adjustment:
Go back to the customizer. All 7 sections should now be in place.
There will be broken images on the newly added sections.
(Remove the broken images by clicking Remove or Change Image).
To add a new image click Change Image and replace the broken icon with an image you choose.
A tip!
There are some options if you want to add a color to a front page section.
Create a color jpg image and add it like any other images to the customizer featured image section.
Adding CSS. Remove the images from the Featured Sections you want to add a color to and then add CSS code to a front-page section. Inside the altitude-pro folder is style.css. Open it.
An example. In the customizer I removed the Featured Section 3 image.
In style.css.
I searched for front-page-3. I found 4-5 mentions of front-page-3:
I commented out .front-page-3, like so: /* .front-page-3, */ This means that front-page-3 will not pick up the CSS that is added here.
(One can instead remove .front-page-3. I chose to comment it so that I know where it is originally used.)
Just below I added the following CSS:
If you do not see the color try adding an background-color: orange !important;
The color looks dirty because there is a default dark gradient between the sections.
I opened Inspect element in Chrome (right click any area and select Inspect). The two sections seen on the bottom are: (left) the HTML and (right) the CSS. I use Inspect a lot to look at the html and CSS. The CSS can be adjusted by clicking into the tags and adjusting/adding new ones. It is temporary, and a good way to directly see modifications.
NB! We need to add in the new CSS front-page sections
To any place it mentions the front-page-1, 3, 5 and 7 we also need to add in 2, 4 and 6.
Adjust the following CSS:
Adjusting the grey/black gradient used as a transition between front page sections.
Inside style.css.
To change the white-grey-black gradient open your style.css and search or scroll to Front Page.
/* Front Page
——————————————— */
The following section contains the gradients I want to change.
I commented out the dark gradient background and filter code but left display, overflow, table-layout and width in place. Like so:
The background color and filter are now commented out with /* code /.
Any CSS code you place within a / code */ is hidden and not used.
As I commented out the default gradient it now looks nice and clean.
I wanted to experiment with other CSS gradients so I went online to: https://www.colorzilla.com/gradient-editor/
I made a new gradient and replaced the existing black gradient with the new.
I made a an orange -> light orange -> zero opacity.
Here is the code:
Replace the existing gradient information with the one you make. Be sure to leave display, overflow, table-layout and width in place.
Btw! If you use the same gradient tool that I did be sure and click the top arrows and change the opacity so you can see the image through the gradient. (Play with it and have fun..:) I decided not go to with any gradient. Here is an example of having a bit of orange in the sky in the first image.
Altitude Pro top orange gradient
The text was updated successfully, but these errors were encountered: