Custom template in genesis + widget area

Community Forums Forums Design Tips and Tricks Custom template in genesis + widget area

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  SoZo 1 year, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1896

    Bader
    Participant
    Post count: 25

    Hi everyone,

    I was trying to create a custom about-page template with a widget area (like the home title area) so I can put the genesis tabs widget in it.

    After a week of try & error, I gave up as I´m new to the whole thing (plz be gentle) and I need help.

    I already created an about-page (about.php) with the following code in it (an placed it in the theme directory):
    <?php
    /*
    Template Name: about
    */
    remove_action(‘genesis_loop’, ‘genesis_do_loop’);
    add_action(‘genesis_loop’, ‘about_loop’);

    function childtheme_about_loop() {

    if ( is_active_sidebar( ‘about’ ) ) {

    dynamic_sidebar( ‘about’ );
    }
    }

    genesis();

    Additionally, I ´ve placed the following code to the functions.php to register the widget area:

    /** Register about widget area */
    genesis_register_sidebar( array(
    ‘id’ => ‘about’,
    ‘name’ => __( ‘about’, ‘minipress’ ),
    ‘description’ => __( ‘This is a widget area that can be placed before the post’, ‘minipress’ ),
    ) );

    Can you help me please?
    Thank you for your time in advance :)


    “Whether you think you can, or you think you can’t–you’re right.”
    ― Henry Ford

    #1902

    SoZo
    Moderator
    Post count: 1573

    Your function names don’t match up here
    add_action(‘genesis_loop’, ‘about_loop’);
    function childtheme_about_loop() {

    should be
    add_action(‘genesis_loop’, ‘about_loop’);
    function about_loop() {

    or
    add_action(‘genesis_loop’, ‘childtheme_about_loop’);
    function childtheme_about_loop() {


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #1908

    Bader
    Participant
    Post count: 25

    That´s awesome SoZo!

    Now it looks exactly how I imagined it =)

    Thanks a lot!

    Bader


    “Whether you think you can, or you think you can’t–you’re right.”
    ― Henry Ford

    #1915

    SoZo
    Moderator
    Post count: 1573

    You’re welcome :)


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.