Forum Replies Created
-
AuthorPosts
-
jtintner
MemberCan anyone please gice me some guidence? This seems pretty straight forward yet i cant seem to wrap my head around this
jtintner
MemberI'm still stuck on this can anyone help?
jtintner
MemberBrad
I was actually running the 1.92 version of the Genesis framework but now I think I have everything figured out. I was about 2 seconds away from even going down this endeavor 🙂 but thanks for all your help honestly!
one last question what does the '5' do?
add_action( 'genesis_before_content_sidebar_wrap', 'wpsites_home_widget', 5 );
jtintner
MemberYou are 100% correct in that it does work, I downloaded the sample Genesis theme and stuck your code on there and it worked. For some reason it didn't work in my functions.php file that I created, I'm not really sure why but it didn't.
Something on the top of my functions file was making it not function properly, not to sure why since as I said PHP has never really been my strong suite. In any case, I never doubted you more or less trying to trouble shoot with some help. I will just use the sample theme and modify this functions.php file instead of creating my own, but this did work now
jtintner
MemberI've been fumbling with this for the last several hours this morning, I'm starting to get frustrated with why I can't register a new sidebar as you have shown here.
I have been watching numerous videos and have read quite a few blog posts in the last 2 hours with little success. While I was able to play around a bit with adding some stuff to specific areas on the page I want to do some more of this dynamic stuff you are talking about.
It seems that when I add any of the
genesis_register_sidebar anything the site bombs out. Here is what I have added to my functions.php file
https://github.com/jtintner/routinechaos/blob/master/functions.php
I've been trying to debug this for hours with little success.
For some reason I cant even register the sidebar at all. I can do other simple minded tasks like trying to add in some echo text and point it to above or below content no problem.
Am I missing something on how to register a new sidebar? Is there an added step I'm missing?
Sorry for all the random flusterd posts, I will try to keep those to a minimum
P.S I actually created a live site, (which right now wont work unless I remove the registering of the sidebar in my github code) Which I have done temporarily just so you can see the site.
jtintner
MemberI can't seem to get this code to work so I'm not really sure where the problem is 🙁 DOHH!!!
jtintner
Member@branddalton
Check the github link I sent, for some reason when I copied and pasted it into the response window it removed some of the PHP so take a look at that instead of what I posted in the comment I will go ahead and delete it
jtintner
Membersorry don't know how to copy and paste the block in from github so here is the direct link to the file
https://github.com/jtintner/routinechaos/blob/master/functions.php
line 41 appears to be where your code starts.
normally I'm pretty good with php massaging but actually building PHP from scratch is not my strong suite, hence why I'm taking this challenge on 🙂
P.S since I'm building this on local host its going to be really hard to provide a URL but if it works best to move this to a URL I can do so and share links if your willing to help me along with some of this
jtintner
MemberI get an error when I add this code above to my functions.php file in my child theme
Fatal error: Call to undefined function genesis_register_sidebar() in C:\xampp\htdocs\routinechaos\wp-content\themes\blueeel\functions.php on line 41
here is my functions file
`
<?php
/**
* Functions
*
* @package BlueEel
* @author Josh Tintner
* @copyright Copyright (c) 2031, Josh Tintner
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*//**
* Theme Setup
*
* This setup function attaches all of the site-wide functions
* to the correct actions and filters. All the functions themselves
* are defined below this setup function.
*
*/add_action('genesis_setup','child_theme_setup', 15);
function child_theme_setup() {// Add Nav to Header
add_action('genesis_before_header', 'be_nav_menus','genesis_header' ,'genesis_after_header' ,'be_nav_menues_seconday' );}
/**
* Add Nav Menus to Header
*
*/function be_nav_menus() {
echo '';
wp_nav_menu( array( 'menu' => 'Primary' ) );
echo '';
}
genesis_register_sidebar( array(
'id' => 'custom-widget',
'name' => __( 'Home Columns', 'wpsites' ),
'description' => __( 'Adds Home Page Widget For 3 Columns', 'wpsites' ),
) );
/**
* @author Brad Dalton - WP Sites
* @learn more http://wp.me/p1lTu0-a0y
*/
add_action( 'genesis_before_content_sidebar_wrap', 'wpsites_home_widget', 5 );
function wpsites_home_widget() {
if ( is_home() && is_active_sidebar( 'custom-widget' ) ) {
echo '';
dynamic_sidebar( 'custom-widget' );
echo '';}
}
`
But I have no errors in the PHP file, any thoughts here? -
AuthorPosts