Forum Replies Created
-
AuthorPosts
-
September 3, 2014 at 2:32 am in reply to: Agentpress Search drop down clips last select option #122529DigitalEssenceMember
bump
DigitalEssenceMemberHi,
You need to edit
.header-image .site-title > a {
float: left;
min-height: 100px;
width: 100%;
}
November 5, 2013 at 9:02 am in reply to: BUG: Pretty Pictures header duplicates when adding text #71045DigitalEssenceMemberHi,
Thanks for this code. I haven't got round to trying this out but will give you a shout when I do.
Thanks,
DigitalEssenceMemberDave you are a star!
I've moved it below the init.php call and it worked.
I used the locate_template as a post on StackOverflow said:
"Use locate_template() instead because a child theme can overwrite the loaded file then.
$found = locate_template( 'functions/my-custom-widget.php', TRUE, TRUE );
The first TRUE tells WordPress not only to search for the file but to load it actually. The second makes it a require_once call.The function return the path to the located file in case you need it later. If nothing is found it returns an empty string."
Again,
thank you for your help, it really is appreciated.
Hedley
DigitalEssenceMemberDavid,
I like your idea and have gone ahead and implemented it but...
I have some issues:
I thought it might be a good idea to move my edits from the functions.php file into my own custom_functions.php so they don't get overwritten in a later theme update.
I've added this to the top of my functions.php file right after the opening <?php
//Include our custom_functions.php
$found = locate_template( 'functions/custom_functions.php', TRUE, TRUE );I've got the custom file loading but it's giving me some strange results.
Firstly the following lines:
remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_nav' );
Should remove the menu that comes after the header by default and add it before the header. This worked when it was in my functions.php file but since moving it to the custom file the add function works but the remove hasn't and I now see both menus.
Also
I'm trying to register a new widget:
genesis_register_sidebar( array( 'id' => 'meet-the-team', 'name' => __( 'Home - Meet The Team', 'executive' ), 'description' => __( 'This is the slider section on the home page.', 'executive' ), ) );
Again, this worked when it was in the functions.php file but now gives me:
Fatal error: Call to undefined function genesis_register_sidebar() in E:\wamp\www\borderschiropractic.dev\wp-content\themes\executive-pro\functions\custom_functions.php on line 13
Line 13 contains:
the genesis_register_sidebar( array(
Where have I gone wrong?
Thanks.
DigitalEssenceMemberThanks David, those plugins look useful and I will be using them in the future.
How do I retain the code I added to the php files in the event of an upgrade?
Say for example I've added widgets to function.php and then the next time the theme gets updated it would overwrite my edits.
What I've done in the past is create template files with different names and place my functions in them and then call tehm from within WP.
But is this the easiest way to do it or am I missing something? It's almost as though I need a grandchild theme.
DigitalEssenceMemberFound the solution myself so here it is for anyone else looking:
//Add opening div before the post title
add_action( 'genesis_before_post_title', 'custom_post_div', 15 );
function custom_post_div() {
echo '<div class="post_body"><!-- start .post_body-->';
}
/** Customize the post meta function to add closing div */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Categories: "] [post_tags before="Tags: "] </div>';
return $post_meta;
}} -
AuthorPosts