• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Initial landing page linking to two custom widgetized page templates

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Initial landing page linking to two custom widgetized page templates

This topic is: not resolved

Tagged: Add Widget, custom page template, landing page, new widget

  • This topic has 3 replies, 2 voices, and was last updated 5 years, 3 months ago by Amber.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 15, 2017 at 5:14 pm #214587
    Amber
    Member

    Hi Genesis geniuses! I've been working with Genesis for quite some time now but actually have something I've never done with it before on my plate.

    I'm familiar with hooks, creating new page templates, updating the functions.php file and all that jazz (although I'm no developer!).

    The first thing is:
    I'm looking to have almost like a landing page come up first where a visitor can click on one logo that would link to custom-page-template-1.php or the other logo that would link to custom-page-template-2.php. These custom page templates will be widgetized.

    The only way I know how to do this is add a index.html page but then way too many other issues arise doing it that way. Is there a quick way in Genesis to have your home page a landing page with said logos to then link where I want? I looked for some landing page plugins but I think those are for when the site in coming soon or under maintenance.

    The second thing is:
    I've tried to create my own custom page template. By either following tutorial to make sure I haven't missed anything or copying and pasting from the front-page.php file I have (using the altitude-pro theme) and renaming the widgets and calls to something unique. However nothing works. My landing-page.php doesn't even work so many there is soemthign I'm missing in my functions.php? What are some reasons a custom page template wouldn't work?

    This is my most recent attempt at a custom page template with one widget

    <?php /*
    Template Name: Special Template
    */ ?> 
     
    <?php
     
    add_action( 'genesis_meta', 'theme_name_template_name_genesis_meta' );
    /**
     * Add widget support for this template. If no widgets are active, display the default Genesis loop.
     *
     */
     
    function theme_name_template_name_genesis_meta() {
     
     if ( is_active_sidebar( 'template-name-widget-name' ) ) {
     
     remove_action( 'genesis_loop', 'genesis_do_loop' );
     add_action( 'genesis_loop', 'theme_name_template_name_widget_name' );
     add_filter( 'body_class', 'add_body_class' );
     
     function add_body_class( $classes ) {
       $classes[] = 'theme-name-template-name';
       return $classes;
     }
     
     }
    }
     
    function theme_name_template_name_widget_name() {
     
     if ( is_active_sidebar( 'template-name-widget-name' ) ) {
     genesis_widget_area( 'template-name-widget-name', array(
     'before' => '<div class="template-name-widget-name widget-area">',
     ) );
     }
     
    }
     
    genesis();

    I've made sure that I've added my widget in my functions.php and chosen the Special Template on my new page, but all that shows is the header and footer of the site and nothing else.

    This is the page but I don't think it will help much. Nothing is there.

    **On the link that was provided for the site, if you click on the left logo it will link to the rest of the site.**

    I appreciate any and all feedback. Thanks so much!

    http://ambergoodwin.com/draft/patioburger/
    December 16, 2017 at 3:59 am #214591
    Brad Dalton
    Participant

    There's 2 parts to creating widgets. You also need to register each new widget.


    Tutorials for StudioPress Themes.

    December 16, 2017 at 11:16 am #214603
    Amber
    Member

    Hi braddalto, thanks for the suggestion. I have registered each new widget. That's what I said under the code snippet (just I didn't say those exact words), I said "I've made sure that I've added my widget in my functions.php". So I'm confused as to why it wouldn't be working? I know it's not the theme as I have no troubles adding any other widgetized area in the site.

    December 16, 2017 at 2:39 pm #214611
    Amber
    Member

    So I've figured out how to do the home page. Just make it a static page and remove what you don't want. I'm still stumped on why the page-templates aren't working though.

    I've even tried another theme and it still doesn't work.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble