Forum Replies Created
-
AuthorPosts
-
bvagsMember
Hi Dorian,
I actually was able to register the new widget here ...
if ( function_exists('register_sidebars') )
register_sidebar(array('name'=>'Sidebar Top','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'Sidebar Bottom Left','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'Sidebar Bottom Right','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'468x60 Header Banner','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'After Post Box','before_title'=>'','after_title'=>''));... and have the site not sh*t the bed when I re-uploaded it. And then I added the new action right before the end of the file ...
add_action( 'genesis_after_post_content', 'child_after_post_box' );
/** Loads a new sidebar after the post on single pages*/
function child_after_post_box() {if( is_single() ) {
echo '';
dynamic_sidebar( 'after-post-box' );
echo '';
}
}
?>... and the new widget appeared, and I added a basic text box in there w/ sample text, and added the CSS adjustments to style.css ... but am not seeing anything new appearing anywhere.
Not sure if I'm still missing something, or this method that I have tried just doesn't work.
-Bri
bvagsMemberHi Dorian,
Tried following your link, and followed the "After Post Subscribe Box" section, adding both chunks of text to my functions.php file in my theme folder.
I added the first chunk of code, added a blank space, and then added the second chunk of code. Saved and re-uploaded. And I am getting "Fatal error: Call to undefined function genesis_register_sidebar() in /home/bvags/public_html/crossfit-competitions-com/wp-content/themes/crossfit-competitions/functions.php on line 3".
Still not sure what I am doing wrong here.
Thanks ...
-Bri
bvagsMemberHi Dorian,
Just wondering if you had any more ideas for me.
Thanks ...
-Brian
bvagsMemberhah, not sure that worked properly. I thought if I put everything inside code></code (removed the opening and closing brackets so they will show) it would show up as is, and un-parsed?
-Brian
bvagsMemberHi Dorian,
I was able to get my site back up and running, not a problem. As far as the code, yes, I copied everything that Brian had for the functions.php section. I also put in the CSS, but that shouldn't take my site down. Also installed the plugin he linked to.
This is currently what I have in my functions.php with the additional code from Brian, and the change you suggested ...
-Brian
cat_ID) { return $category->cat_name; break; }
}
}// Register newsletter widget area
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );// Add the newsletter widget after the post content
add_action( 'genesis_after_comments', 'custom_add_newsletter_box' );
function custom_add_newsletter_box() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'newsletter', array(
'before' => '',
) );
}// include the breadcrumb nav tool
include(TEMPLATEPATH."/tools/breadcrumbs.php");// include the theme options
include(TEMPLATEPATH."/tools/theme-options.php");// include the dashboard widget
include(TEMPLATEPATH."/tools/sp_dashboard_widget.php");if ( function_exists('register_sidebars') )
register_sidebar(array('name'=>'Sidebar Top','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'Sidebar Bottom Left','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'Sidebar Bottom Right','before_title'=>'','after_title'=>''));
register_sidebar(array('name'=>'468x60 Header Banner','before_title'=>'','after_title'=>''));function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);if (strlen($_GET['p']) > 0) {
echo "";
echo $content;
echo " ".__("Read More", 'studiopress')." →";
echo "";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "";
echo $content;
echo "...";
echo " ".$more_link_text."";
echo "";
}
else {
echo "";
echo $content;
echo " ".__("Read More", 'studiopress')." →";
echo "";
}
}
?>
bvagsMemberHi Dorian,
Thanks for looking into this for me. I have installed and activated the plugin, but when I make the changes to functions.php (I'm making the change to functions.php in my theme folder, right, not the WP functions.php?) I get an error when I refresh the site ...
Fatal error: Call to undefined function genesis_register_sidebar() in /home/bvags/public_html/crossfit-competitions-com/wp-content/themes/crossfit-competitions/functions.php on line 30
Is there something I have to do before I make the changes to the functions.php file?
Thanks ...
-Bri
bvagsMemberHi SoZo,
Thanks for the response. I actually already have a "Related Posts Plugin" in there, and it's showing other results in the same category, but I'd like to be able to showcase the last 5, 10 or so events that were posted in all categories.
Is there a way to copy the chunk of code that produces the "Recently Added Posts" archive page and paste it into the main template page? Really just trying to avoid continuing to add plugins to the theme. Already have a bunch in there.
-Brian
-
AuthorPosts