• Resolved mxnet

    (@mxnet)


    Hello Support,

    I have built a website with a stripped down version of Zerif. I use static HTML for my content at the moment. I want to make the static content editable by WordPress page editor. WordPress is set to display the latest post, and not a static page. That is the only way I was able to achieve the one-page design. [I DO NOT USE WP-CUSTOMIZER DUE TO LIMITED FLEXIBILITY]

    Here is what code I use, which works fine to display the static content on the homepage. I’ll explain what I want to achieve with the about_us section as example.

    front-page.php

    <?php get_header();
    get_template_part( 'sections/big_title' );
    ?>
    </header
    <div id="content" class="site-content">
    <?php
    	/* OUR FOCUS SECTION */
    	get_template_part( 'sections/our_focus' );
    	/* ABOUT US */
    	get_template_part( 'sections/about_us' );
    	/* OUR TEAM */
    	get_template_part( 'sections/our_team' );
    	/* CONTACT FORM */
    	get_template_part( 'sections/contact_us' );
    	/* GET BLUEBOOK RIBBON */
    	get_template_part( 'sections/ribbon_with_right_button' );
    	/* LATEST NEWS */
    	get_template_part( 'sections/latest_news' );
    get_footer(); ?>

    sections/about_us.php

    <section class="about-us" id="aboutus">
    <div class="container">
     <div class="row mx-pad-left">
    	<div class="col-lg-12 col-md-12" >
    	<img src="logo.png"></img>
    	<h3>HERE IS MY STATIC CONTENT I WANT TO MAKE EDITABLE BY WORDPRESS</h3>
    	</div>
    </div>
    </div>
    </section> <!-- END ABOUT US SECTION -->

    Now I need your help!

    I think the easiest approach would be to setup widget areas on my front page, so I can copy each sections HTML into a widget and have that displayed on the appropriate position.
    But when reading widget documentation, it is spoken of sidebar all the time. seem to be widgets are for sidebars only. How can I add widgets to the front/home page, and not sidebar? please advise, or link me to a proper tutorial.
    Please provide me with a working widget including code example

    How do I need to change my example about-us section, so the currently static can be inserted via a dynamic text widget?

    sections/about_us.php – with widget support

    <section class="about-us" id="aboutus">
    <div class="container">
     <div class="row mx-pad-left">
    	<div class="col-lg-12 col-md-12" >
      [CODE TO DISPLAY A TEXT WIDGET SHALL BE HERE, I ASSUME]
    	</div>
    </div>
    </div>
    </section> <!-- END ABOUT US SECTION -->

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Theme Creation – Help Required.’ is closed to new replies.