• 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

Add new widgetized area in Prose

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 › Add new widgetized area in Prose

This topic is: resolved

Tagged: Prose, widgetized area

  • This topic has 21 replies, 3 voices, and was last updated 8 years, 9 months ago by FutureExpat.
Viewing 20 posts - 1 through 20 (of 22 total)
1 2 →
  • Author
    Posts
  • August 9, 2013 at 1:47 pm #55310
    FutureExpat
    Participant

    OK, I'm stumped. Quite a while ago I was able, with some help and coaching, to add a widgetized area on the homepage for a slider.

    Now I'm working on a new site, also using Prose. I cut/pasted exactly what I had from site 1 into site 2 and it didn't work.

    Here's what I added to Custom Code:

    add_action('genesis_before_loop', 'add_home_widget_area',5); 
    function add_home_widget_area() { 
    if( is_home()) 
    dynamic_sidebar('Home Widget Area'); 
    } 
    
    //Adds a widget area to home page before content 
    genesis_register_sidebar(array( 
    'name'=>'Home Widget Area', 
    'id'=>'home1', 
    'description' => 'Widget area displays before content area on the home page', 
    'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>', 
    'before_widget' =>'<div id="home-widget">', 'after_widget' => '</div>' 
    )); 
    

    When that didn't work I tried another version supplied by an active member of this forum. That didn't work either.

    I know that Prose is "different," but seriously? And I have no idea why it would work on one Prose site and not the other?

    Appreciate any and all help as I'm not a programmer.

    http://local
    August 9, 2013 at 3:03 pm #55324
    RobG
    Member

    On the second website what theme are you using?


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 9, 2013 at 3:17 pm #55329
    FutureExpat
    Participant

    Prose. Prose on both. It's on a test site right now, at http://bjmann.shewblogs.com/

    August 9, 2013 at 3:26 pm #55336
    RobG
    Member

    Unable to access the link you provided.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 9, 2013 at 3:53 pm #55350
    FutureExpat
    Participant

    Sorry, that's the link. Not sure why it's throwing an error right now, but the code I added is exactly what I posted above.

    August 9, 2013 at 4:10 pm #55354
    RobG
    Member

    Do you have a working link were I can see the widget in action?


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 9, 2013 at 4:36 pm #55358
    FutureExpat
    Participant

    Well, I can show it to you where it's working -- http://futureexpats.com.

    Susanna

    August 9, 2013 at 4:44 pm #55361
    RobG
    Member

    Susanna were did you get this code from that you added to your site did you get it from StudioPress's website?
    The reason I'm asking I would like to view the codes un touched.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 9, 2013 at 4:52 pm #55363
    FutureExpat
    Participant

    Rob, I'm not sure what you mean by viewing the codes untouched. This was a chunk of code that I worked out with some help from StudioPress tech support a while back. what I pasted here is copied / pasted exactly from the custom php area on my dashboard.

    August 9, 2013 at 5:26 pm #55369
    RobG
    Member

    The reason I'm asking about the codes you posted is because it looks like there might be something missing from it at the beginning.

    I have the same theme you have installed on my test site and was going to try the code you provided but I'm not sure the codes you posted are complete. I was thinking maybe you got it from StudioPress's main site I was going to take a look.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 9, 2013 at 8:18 pm #55390
    FutureExpat
    Participant

    Well, the code is working on my Future Expats site, but not on the new site. Same code, same theme.

    August 10, 2013 at 1:13 am #55409
    Brad Dalton
    Participant

    You can do this by installing the Genesis Prose extra's plugin with the Genesis Layout Extra's plugin.

    Or you can use code:

    I'd add the code to the init.php file


    2700 Genesis Tutorials

    August 10, 2013 at 10:20 am #55476
    RobG
    Member

    Hey Brad, from what I understand she is using the code for one website and it working just fine, but also has it added to a second website and it's not working. I was trying to see what was being use for the widget.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 10, 2013 at 10:26 am #55480
    Brad Dalton
    Participant

    Hi Rob.

    Yes, understand. Its not the code but more where the code goes to make it work as Prose is different.

    I know the code she is using because i wrote it and pasted it on Pastebin last year. http://pastebin.com/u/braddalton


    2700 Genesis Tutorials

    August 11, 2013 at 5:37 am #55610
    RobG
    Member

    Hi Brad thanks so much I hope this will help her with the problem. Have a great day


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    August 11, 2013 at 6:33 am #55615
    Brad Dalton
    Participant

    Just tested the code in Prose locally and it works.

    Here's the screencast.

    Sometimes the Apostrophes can turn around causing errors of you don't copt it from the view raw link and paste it at the end of the file using a code editor like Notepad++.

    If you copy from the embedded code, this can cause errors.


    2700 Genesis Tutorials

    August 12, 2013 at 11:31 am #55822
    FutureExpat
    Participant

    Brad and Rob, thanks so much. I also got a suggestion from Nick at StudioPress support suggesting I create a plugin using code like:

    <?php
    /*
    Plugin Name: Prose Custom Code
    Plugin URI: http://example.com
    Description: Loads customizations for my site
    Version: 0.1.0
    Author: Susanna Perkins
    Author URI: http://example.com
    License: GPLv2 or later
    */
    

    and then adding the custom code since thecustom code in Prose doesn't run on the admin side. Ideas about this?

    Susanna

    August 12, 2013 at 12:30 pm #55834
    Brad Dalton
    Participant

    You can place that content in a new PHP file and add the custom PHP code below it then zip it up and install it as a plugin.

    You can then add all your custom PHP code to the file in that plugin rather than use the Prose Custom code box on the admin side.

    I would test this locally before using it on a live site.

    The code i provided is tested and works in Prose if placed in the lib/init.php file however a plugin is a good idea for Prose.


    2700 Genesis Tutorials

    August 12, 2013 at 12:50 pm #55836
    FutureExpat
    Participant

    Thanks, Brad.

    August 13, 2013 at 7:16 pm #56214
    FutureExpat
    Participant

    Just wanted to let you both know it's set 🙂 Really appreciate your help.

    Susanna

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 22 total)
1 2 →
  • The topic ‘Add new widgetized area in Prose’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 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