Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to get a Home Page Widget to Display on All pages
- This topic has 11 replies, 3 voices, and was last updated 11 years, 3 months ago by Lisa at OG.
-
AuthorPosts
-
January 21, 2013 at 4:22 pm #13569Lisa at OGMember
I'd like to get one of the widgets on my home page to display on ALL inside pages as well. I tried using the plugin Display Widgets to make things quick and easy but it was unresponsive. I suspect this will require a change to PHP. Here is a link to the site in progress: http://www.englishscholar.ca/wordpress/. Any assistance would be appreciated. Thanks.
January 21, 2013 at 4:30 pm #13574SusanModeratorJanuary 21, 2013 at 5:00 pm #13589Lisa at OGMemberYes, I have registered the widget and it displays where I want it on the home page; but the tutorial link doesn't tell me how to get it to display on all pages -- not just the home page. 🙁
January 21, 2013 at 5:22 pm #13596SusanModeratorI followed the instructions, and it appears on the top of all of my pages...
January 21, 2013 at 6:05 pm #13604Lisa at OGMemberHi Susan,
I did try it myself on my own page; but, when I use the simple hooks and place the code here:
genesis_before_content_sidebar_wrap
, it doesn't include a full background width -- it is sized to 960px. I would like the welcome message to be exactly as it is now (repeating background full screen width) with text 960; but on every page. Using your suggestion, is there a way to get the background full width??January 21, 2013 at 6:40 pm #13610AnitaKeymasterLisa, which widget do you want on all the pages? What content appears in that widget? Also, can you copy/paste your code in here so we can see what you have going on?
Love coffee, chocolate and my Bella!
January 21, 2013 at 6:53 pm #13614Lisa at OGMemberSusan and Anita -- thanks for your assistance with this. Much appreciated. Here is a link again to the site in progress: http://www.englishscholar.ca/wordpress. The section I want to display on every page is the home-bottom-message directly above footer 1, 2 and 3 area (it has association logos in it with a full width gray background). Here is the CSS code I have right now:
.home-bottom-message-wrap {
background: url("http://www.englishscholar.ca/wordpress/wp-content/themes/legacy/images/home-bottom-message-bkgd.png") repeat-x scroll 0 0 transparent;
/* border-top: 1px solid #eee; */
clear: both;
color: #666;
line-height: 30px;
/* padding: 40px 0 0; */
padding: 0px 0 0;
height: 138px;
}.home-bottom-message-inner {
width: 960px;
clear: both;
color: #666;
line-height: 30px;
text-align: centre;
margin: 0 auto
}For home php the code is:
if ( is_active_sidebar( 'home-bottom-message' ) ) {
echo '<div class="home-bottom-message-wrap"><div class="home-bottom-message-inner">';
dynamic_sidebar( 'home bottom message' );
echo '</div><!-- end .home-bottom-message-wrap --></div><!-- end .home-bottom-message-inner -->';
}For functions.php the code is:
genesis_register_sidebar( array(
'id' => 'home-bottom-message',
'name' => __( 'Home Bottom Message', 'legacy' ),
'description' => __( 'This is the bottom section of the homepage right before the footer.', 'legacy' ),
) );Thanks.
January 21, 2013 at 7:01 pm #13615AnitaKeymasterYou don't have anything else in the functions.php that provides code for that area? Something that might look like this? I just modified the welcome widget code to this -
/** Add the home-bottom-message section */
add_action( 'genesis_before_content_sidebar_wrap', 'home-bottom-message' );
function custom_welcome_text() {
genesis_widget_area( 'home-bottom-message', array(
'before' => '',
) );
}
Love coffee, chocolate and my Bella!
January 21, 2013 at 7:04 pm #13617AnitaKeymasterActually it should be in the - genesis_after_content_sidebar_wrap - area, not the one I posted.
Love coffee, chocolate and my Bella!
January 22, 2013 at 9:31 am #13707Lisa at OGMemberAnita, I used Genesis Simple Hooks to try it in the -genesis_after_content_sidebar_wrap. The suggestion you make is effective to place the home-bottom-message text on every page; but the problem still remains on how to add that full width background (only to that section)?
January 22, 2013 at 9:58 am #13714AnitaKeymasterDo you mean the grey background in that widget area only? It should stay full width when you apply the code. I just checked your website. I don't see the code added there.
Love coffee, chocolate and my Bella!
January 22, 2013 at 11:30 am #13738Lisa at OGMemberSorry Anita, I removed the code when it wasn't working.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.