Forum Replies Created
-
AuthorPosts
-
EZEaracheMemberApril 16, 2015 at 6:44 pm in reply to: Include after_entry widget area in the site-container structural area #148166EZEaracheMember
O.K. So this is resolved.
The proper way to do this is not so much with a Genesis Structural Wrap as I originally thought. The correct way to do this is with an echo function which then wraps the two widget areas in your functions.php file like so:
//* Contact Widget genesis_register_sidebar( array( 'id' => 'contact-widget', 'name' => __( 'Contact Widget', 'genesis' ), 'description' => __( 'Contains Contact Information under the Content Area' ), ) ); //* Events Widget genesis_register_sidebar( array( 'id' => 'events-widget', 'name' => __( 'Events Widget for Home Page', 'genesis' ), 'description' => __( 'Contains Events Widget under the Content Area' ), ) ); add_action( 'genesis_after_entry', 'add_genesis_widget_area' ); function add_genesis_widget_area() { if ( is_page('006') && is_active_sidebar('contact-widget') ) { echo '<div class="two-widget-container">'; //This Opens the widget-container genesis_widget_area( 'contact-widget', array( 'before' => '<div class="contact-widget-wrapper one-half first">', 'after' => '</div>', ) ); genesis_widget_area( 'events-widget', array( 'before' => '<div class="events-widget-wrapper one-half">', 'after' => '</div>',// Ends Home Widget Container ) ); echo '</div>'; //Closes the widget-container } }
I would like to thank Sure Fire Web for showing me the light here. Now I understand echo Whoop Whoop!
EZEaracheMemberI used this code on a site a while back to do something similar, but it was a non-genesis theme so I don't know how well it will apply to your site.
The following code went into a custom page template
<div id="recentPostContainer"> <?php $temp_query = $wp_query; ?> <?php query_posts('category_name=Living on Currents &showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="entry-summary"> <?php the_excerpt(); ?> <?php endwhile; ?> </div> </div> >!--Ends Entry-summary--> </div> <!-- Ends recentPostContainer --> </div><!-- #home-recent-posts-->
This code went into the functions file.
<?php function custom_excerpt_length( $length ) { return 80; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); ?> <?php function new_excerpt_more( $more ) { return '<a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>'; } add_filter( 'excerpt_more', 'new_excerpt_more' ); ?>
The function allows you to edit the length of the excerpt by characters in this case 80.
Theoretically you would then be able to edit the "read-more" class to look like a button.
Here's a link to the site in action.
Hope this points you in the right direction. I'm not much of a programmer, yet, so I won't be able to give you much help with bug fixes.
EZEaracheMemberTo solve this problem I purchased a calendar plugin that allowed me to place short code onto a page rather than use a post-type archive page.
EZEaracheMemberThanks Brian,
Position Relative Saved My Night also!
EZEaracheMemberHi,
Thanks for pointing me in the right direction here. I found two of your blog posts extremely helpful in understanding the functions and hooks!
I was able to get widget areas to display on my site following these directions.
http://wpsites.net/web-design/widget-genesis/
http://wpsites.net/web-design/add-widget-area-before-content/
http://genesistutorials.com/visual-hook-guide/I still would love to know if these links get indexed?
EZEaracheMemberO.K.,
I tried that and it still didn't work.
//* Events Slide Show
genesis_register_sidebar( array(
'id' => 'events-page',
'name' => __( 'Events Page Slideshow', 'genesis' ),
'description' => __( 'Events Page Slideshow', 'childtheme' ),
) );
add_action( 'genesis_before_content', 'add_genesis_widget_area_events-page' );
function add_genesis_widget_area_events_page() {
if ( is_post_type_archive('tribe-events') && is_active_sidebar('events-page') ) {
genesis_widget_area( 'events-page', array(
'before' => '<div id="events-page">',
'after' => '</div><div class="before-content" class="widget-area"></div>',
) );
}
}Did I do something wrong?
I'm looking into those themes now.
April 11, 2015 at 10:45 am in reply to: after_content widget area not wrapping in site-container #147521EZEaracheMemberCool Thanks!
That seems to fix the problem for now.
I take it there's no way to get this to go into the "site-container" that you cab think of though?
April 11, 2015 at 10:09 am in reply to: after_content widget area not wrapping in site-container #147515EZEaracheMemberHi,
Yes, I want it left aligned, below the content and above the footer. I assumed that the footer widgets would go into the footer. So I figured I needed a custom widget. Is that not the case, Also, the widget areas I'm creating will only be visible on the home page. I'm also guessing that the footer widgets would be global across the site. Maybe my assumptions are incorrect.
Your help is greatly appreciated, so I'm happy to answer your questions.
April 11, 2015 at 9:19 am in reply to: after_content widget area not wrapping in site-container #147500EZEaracheMemberSeems like my link didn't work before.
April 11, 2015 at 9:00 am in reply to: after_content widget area not wrapping in site-container #147495EZEaracheMemberHi Julia,
Thanks for your response.
I'm creating a custom Genesis Child Theme.
I've played around with it some more so the function I'm using at the moment is:
//* Creates a Widget for the Contact area
genesis_register_sidebar( array(
'id' => 'contact-widget',
'name' => __( 'Contact Widget', 'genesis' ),
'description' => __( 'Contains Contact Information under the Content Area' ),
) );add_action( 'genesis_entry_footer', 'add_genesis_widget_area' );
function add_genesis_widget_area() {
if ( is_page('006') && is_active_sidebar('contact-widget') ) {
genesis_widget_area( 'contact-widget', array(
'before' => '<div id="contact-widget">',
'after' => '</div>',
) );
}
}I've been styling it with:
#contact-widget {
max-width: 970px;
max-height: 510px;
position:relative;
margin: 0 auto 0 auto;
}#text-2.widget.widget_text {
display: block;
position: relative;
float: left;
max-width: 450px;
max-height: 500px;
border: 20px solid transparent;
border-radius: 40px 40px 40px 40px;
background-color: #C7B299;
-webkit-box-shadow: 3px 15px 43px 3px rgba(0,0,0,0.8);
-moz-box-shadow: 3px 15px 43px 3px rgba(0,0,0,0.8);
box-shadow: 3px 15px 43px 3px rgba(0,0,0,0.8);
-webkit-border-image: url(http://www.kayakwappingers.com/awayadventures/wp-content/themes/genesis-sample/images/content-border.png) 30 30 30 30;
-o-border-image: url(http://www.kayakwappingers.com/awayadventures/wp-content/themes/genesis-sample/images/content-border.png)30 30 30 30;
border-image: url(http://www.kayakwappingers.com/awayadventures/wp-content/themes/genesis-sample/images/content-border.png) 30 30 30 30;
padding: 10px;
margin: 0px auto 0px auto;
overflow: hidden;}
The float left is what's making it go into the footer, but I would really like the whole widget to get wrapped by site-container.
EZEaracheMemberHi Braddalton,
Thanks soooo much for getting back to me.
More like this, no sidebar with two of the widgets on the bottom stacked on top of each other.
http://i225.photobucket.com/albums/dd110/ortnergr/genesis-page-template.png
Also, do links to URLs get indexed here?
-
AuthorPosts