How to create a child theme if you use Parallax One Plus

First let's talk about what your child theme should contain given that we want to modify both the theme and the plugin (Parallax One Plus is a plugin). 

Your child theme should have functions.php file, style.php file, folder named sections (if you decide to add hooks you do not need this folder)*  where you'll include the section that you want to change (parallax_one_logos_section.php) in that case. 

!important the file should have the same name as the corresponding file from the theme / plugin. 

!important The "Our Story" section can be found in both Parallax One and Parallax One Plus versions. If you're using the premium version and want to customize this section, the changes can be made via the plugin's settings.

There are two ways to modify your theme. 

1st way:

Here is the classic way where you have to create functions.php, style.css and the sections folder where you have to add the file with the section that you want to modify we'll choose "parallax_one_logos_section.php" in our case.

functions.php

Create a functions.php file and add following lines of code:

<?php
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles',99);
function child_enqueue_styles() {
    $parent_style = 'parent-style';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) );
}
if ( get_stylesheet() !== get_template() ) {
    add_filter( 'pre_update_option_theme_mods_' . get_stylesheet(), function ( $value, $old_value ) {
         update_option( 'theme_mods_' . get_template(), $value );
         return $old_value; // prevent update to child theme mods
    }, 10, 2 );
    add_filter( 'pre_option_theme_mods_' . get_stylesheet(), function ( $default ) {
        return get_option( 'theme_mods_' . get_template(), $default );
    } );
}
	

In this file, we tell to our theme to use the style from our child if there exist some modifications.

style.css

Paste these lines into your file:

/*
 Theme Name:   Parallax One Child
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Parallax One Child Theme
 Author:       Themeisle
 Author URI:   http://themeisle.com
 Template:     Parallax-One
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  parallax-one
*/

Here is where you import the existing style from your both Parallax One & Parallax One Plus.

parallax_one_logos_section.php

<?php
    echo 'Your html code goes here';
?>

And here you go

Before

After

2nd way

Another way to do that it's by adding hooks. Notice that now you can add all hooks and filters in functions.php file, which means you do not need the code from the above example so just add your code to it.

Bellow, we attached a list with the hooks that you can use on Parallax One Plus:

parallax_html_before <--- hook before <html> tag 

parallax_head_top <--- hook after <head> tag

parallax_head_bottom <--- just before </head>

parallax_body_top <--- after <body> tag

parallax_body_bottom <--- just before </body>

parallax_header_before <--- before <header> tag

parallax_header_top <--- after <header> tag

parallax_header_bottom <--- before </header> tag

parallax_header_after <--- after </header> tag

parallax_content_before <--- before <div id="content"> ( frontpage.php, page.php, template-contact.php etc. )

parallax_content_after <--- after </div> that have id="content" ( end of content of site)

parallax_content_top <--- after <div id="content"> (top of website content)

parallax_content_bottom --- before </div> that have id="content" ( bottom of content of site)

 ---- Start of sections hooks ----

/* 
Basicaly, all hooks with: 
_before -> are displayed before section
_after -> are displayed after section
_top -> are displayed at the beginning of section
_bottom -> are displayed at the end of section

All lines that contain _entry_ will be hooks for boxes -- and will comply with the same rules.
_entry_top -> will be displayed at the beginning of a box
_entry_bottom -> will be displayed at the end of a box
_entry_before -> will be displayed before a box
_entry_after -> will be displayed after a box
*/

/* Big image section, with parallax or image (before logos section) */

parallax_heading_before

parallax_heading_after

parallax_heading_top

parallax_heading_bottom

/* Logos section */

parallax_logos_before

parallax_logos_after

parallax_logos_top

parallax_logos_bottom

/* Services section */

parallax_services_before

parallax_services_after

parallax_services_top

parallax_services_bottom

parallax_services_entry_top

parallax_services_entry_bottom

parallax_services_entry_before

parallax_services_entry_after

/* About section */

parallax_about_before

parallax_about_after

parallax_about_top

parallax_about_bottom

/* Team section */

parallax_team_before

parallax_team_after

parallax_team_top

parallax_team_bottom

/* Testimonials section */

parallax_tetimonials_before

parallax_tetimonials_after

parallax_tetimonials_top

parallax_tetimonials_bottom

parallax_testimonials_entry_top

parallax_testimonials_entry_bottom

parallax_testimonials_entry_before

parallax_testimonials_entry_after

/* Ribbon section */

parallax_ribbon_before

parallax_ribbon_after

parallax_ribbon_top

parallax_ribbon_bottom

/* News section */

parallax_news_before

parallax_news_after

parallax_news_top

parallax_news_bottom

/* 

Here is a filter for selecting the category that you want to apper in Latest News section.
!important Because is a filter should be added with add_filter( $tag, $function_to_add, $priority );
 */

parallax_latest_news_cat

/* Contact section */

parallax_contact_before

parallax_contact_after

parallax_contact_top

parallax_contact_bottom

parallax_contact_entry_top

parallax_contact_entry_bottom

parallax_contact_entry_before

parallax_contact_entry_after

/* Map section */

parallax_map_before

parallax_map_after

parallax_map_entry_top

parallax_map_entry_bottom

/* Blog page -- before / after each post */

parallax_entry_before

parallax_entry_after

parallax_entry_top

parallax_entry_bottom

/* Standard page -- page.php */

parallax_page_before

parallax_page_after

parallax_page_top

parallax_page_bottom

/* Search page */

parallax_search_before

parallax_search_after

parallax_search_top

parallax_search_bottom

/* Comments */

parallax_comments_before

parallax_comments_after

parallax_comments_top

parallax_comments_bottom

/* Sidebar */

parallax_sidebar_before

parallax_sidebar_after

parallax_sidebar_top

parallax_sidebar_bottom

/* Single page -- single.php */

parallax_single_before

parallax_single_after

parallax_single_top

parallax_single_bottom

/* 404 CONTENT*/

parallax_404_content<br>