How to add new section via child theme in OnePress

OnePress Sample Child Theme

1. Download child theme in your FameThemes Dashboard

2. Or download child theme via Github: (After extract the file, please remove '-master' from folder name if you download master branch)

Add a custom section


Add this code to your file child-theme/functions.php:

 * Hook to add custom section after about section
 * @see wp-content/themes/onepress/template-frontpage.php
function add_my_custom_section(){
    <section id="my_section" class="my_section section-padding onepage-section">
        <div class="container">
            <div class="section-title-area">
                <h5 class="section-subtitle"> My section subtitle</h5>
                <h2 class="section-title"> My section title</h2>
            <div class="row">
                <!-- Your section content here, you can use bootstrap 4 elements :) -->
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>

add_action( 'onepress_after_section_about', 'add_my_custom_section'  );
You are done.