Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add new widgetized area in Prose
Tagged: Prose, widgetized area
- This topic has 21 replies, 3 voices, and was last updated 10 years, 7 months ago by FutureExpat.
-
AuthorPosts
-
August 9, 2013 at 1:47 pm #55310FutureExpatParticipant
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://localAugust 9, 2013 at 3:03 pm #55324RobGMemberOn 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/robgossAugust 9, 2013 at 3:17 pm #55329FutureExpatParticipantProse. Prose on both. It's on a test site right now, at http://bjmann.shewblogs.com/
August 9, 2013 at 3:26 pm #55336RobGMemberUnable 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/robgossAugust 9, 2013 at 3:53 pm #55350FutureExpatParticipantSorry, 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 #55354RobGMemberDo 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/robgossAugust 9, 2013 at 4:36 pm #55358FutureExpatParticipantWell, I can show it to you where it's working -- http://futureexpats.com.
Susanna
August 9, 2013 at 4:44 pm #55361RobGMemberSusanna 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/robgossAugust 9, 2013 at 4:52 pm #55363FutureExpatParticipantRob, 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 #55369RobGMemberThe 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/robgossAugust 9, 2013 at 8:18 pm #55390FutureExpatParticipantWell, 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 #55409Brad DaltonParticipantYou 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
August 10, 2013 at 10:20 am #55476RobGMemberHey 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/robgossAugust 10, 2013 at 10:26 am #55480Brad DaltonParticipantHi 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
August 11, 2013 at 5:37 am #55610RobGMemberHi 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/robgossAugust 11, 2013 at 6:33 am #55615Brad DaltonParticipantJust tested the code in Prose locally and it works.
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.
August 12, 2013 at 11:31 am #55822FutureExpatParticipantBrad 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 #55834Brad DaltonParticipantYou 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.
August 12, 2013 at 12:50 pm #55836FutureExpatParticipantThanks, Brad.
August 13, 2013 at 7:16 pm #56214FutureExpatParticipantJust wanted to let you both know it's set 🙂 Really appreciate your help.
Susanna
-
AuthorPosts
- The topic ‘Add new widgetized area in Prose’ is closed to new replies.