Community Forums › Forums › Archived Forums › General Discussion › Copyright Problem using Prose Theme and Simple Hooks
Tagged: copyright, footer, Prose, Simple Hooks
- This topic has 12 replies, 5 voices, and was last updated 11 years, 2 months ago by Brad Dalton.
-
AuthorPosts
-
March 26, 2013 at 10:43 am #31338consterMember
For the Prose theme, I wanted to change the copyright information in the footer so I used the Genesis Simple Hooks plugin. I unhooked genesis_do_footer() function by checking the box and added my copyright information which is coded very similar to the default copyright. The unhook did not work so I have the I have my copyright and the default copyright showing. Can anyone advice what went wrong? I have done this before and never had this problem. The link is below to my website.
March 26, 2013 at 10:55 am #31340Brad DaltonParticipantDifferent ways to fix this why not use Genesis Simple Edits to remove or customize the footer creds?
March 26, 2013 at 4:54 pm #31428consterMemberBecause we are anticipating using hooks in the near future so I would like to keep the Genesis Simple Hooks plugin.
March 26, 2013 at 6:58 pm #31433echofoxtrotMemberWell, you can use both. You can use Simple Edits to change your copyright in the footer, and use Simple Hooks to do whatever else you have in mind.
March 27, 2013 at 4:19 am #31470Christopher HarrisMemberWhen I inspected your website's code, the default Genesis footer is still being called.
Make sure that you have added your custom copyright info to the 'genesis_footer' Hook in Genesis Simple Hooks Plugin.
Also, be sure you check the 'Unhook genesis_do_footer() function from this hook?' box. By checking this box the default footer will not be called and only the custom code you add to the hook will display.
Hope this helps.
Christopher
WordPress Consultant and Genesis Developer http://wpattendant.com
March 27, 2013 at 10:05 am #31539consterMemberI tried Simple Edit and it does not work. Reading the old forum, I realized that the copyright is repositioned outside the footer. The theme developer wanted the footer outside the wrap. To fix this problem, I had to do the following to edit the init.php file (located under prose/functions/init.php) and comment out the reposition code (lines 78-84). Now under Genesis Simple Hooks, I am able to unhook the footer and added my copyright code. It now works.
March 27, 2013 at 11:17 am #31552Brad DaltonParticipantYeah its like that when adding widgets to Prose. The code needs to be added in the lib/init.php file as well and won't work if placed in the functions file.
March 27, 2013 at 7:39 pm #31640consterMemberHere is more detail on how to fix copyright:
1. Open init.php file (prose/functions/init.php)
2. Remove or comment the following code then save file:
/** Reposition the footer */
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
add_action( 'genesis_after', 'genesis_footer_markup_open', 5 );
add_action( 'genesis_after', 'genesis_do_footer');
add_action ('genesis_after', 'genesis_footer_markup_close', 15 );3. Go to Genesis Simple Hooks and scroll down to genesis_footer hook. Check "Unhook genesis_do_footer() function from this hook?". Check "Execute PHP on this hook" because I use PHP code to automatically put the year in for the copyright. Place a similar code but replace your domain name or title.
<div id="footer" class="footer">
<div class="wrap">
<div class="gototop">
<a rel="nofollow" href="#wrap">Return to top of page</a>
</div>
<div class="creds">
Copyright © <?php echo date("Y"); ?> ·
<a title="Your Title" href="http://www.yourdomain.com">Your Domain</a>
</div>
</div>
</div>March 27, 2013 at 8:03 pm #31646consterMemberI thought I had it figured but the code is not perfect in the hook. My home page looks great but the other pages don't look right. Stay tune.
March 27, 2013 at 8:15 pm #31648consterMemberOkay. I place the code in the wrong hook. Instead of genesis_footer hook, place the code in the wp_footer hook to get the copyright outside the wrap like the Prose demo. Sorry for the confusion.
March 28, 2013 at 9:48 am #31763consterMemberI finally thought about it some more and here is a better way and keep the footer below the wrap like the Prose demo theme. The previous steps left the footer divs in two places (in the wrap and after the wrap) so I wanted to clean it up. I have two different versions of step 3. One with the Genesis Simple Hooks plugin and the other without. Please note that there might be a better way of changing the copyright for the Prose theme but this works for me.
1. Open init.php file (prose/functions/init.php)
2. Comment out or delete the add_action() codes but not the remove_action() codes (see example of commenting out the add_action codes below) then save file. The 1st remove function removes the initial footer div tags. The second remove function removes the default "return to top" and default copyright. The 3rd remove function removes the ending footer div tags. All the add functions adds the footer stuff after the wrap so that is why we are commenting it out because we will add it ourselves later.
/** Reposition the footer */
remove_action( ‘genesis_footer’, ‘genesis_footer_markup_open’, 5 );
remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
remove_action( ‘genesis_footer’, ‘genesis_footer_markup_close’, 15 );
//add_action( ‘genesis_after’, ‘genesis_footer_markup_open’, 5 );
//add_action( ‘genesis_after’, ‘genesis_do_footer’);
//add_action (‘genesis_after’, ‘genesis_footer_markup_close’, 15 );3. NOT USING GENESIS SIMPLE HOOKS PLUGIN (SEE THE NEXT STEP TO USE PLUGIN). Go to WordPress admin menu and select Genesis > Theme Settings. Scroll down to and add the below code with your domain name and title to wp_footer() then click "Save" button. I don't like this because you loose the PHP code for the date. The PHP code updates the year automatically.
<div id=”footer” class=”footer”>
<div class=”wrap”>
<div class=”gototop”>
<a rel=”nofollow” href=”#wrap”>Return to top of page</a>
</div>
<div class=”creds”>
Copyright © 2013 ·
<a title=”Your Title” href=”http://www.yourdomain.com”>Your Domain</a>
</div>
</div>
</div>3. ANOTHER WAY BUT WITH GENESIS SIMPLE HOOKS PLUGIN (PREFERRED). Go to wp_footer hook. Check “Execute PHP on this hook” because I use PHP code to automatically put the year in for the copyright. Copy the below code with your domain name and title then click the "Save" button.
<div id=”footer” class=”footer”>
<div class=”wrap”>
<div class=”gototop”>
<a rel=”nofollow” href=”#wrap”>Return to top of page</a>
</div>
<div class=”creds”>
Copyright © <?php echo date(“Y”); ?> ·
<a title=”Your Title” href=”http://www.yourdomain.com”>Your Domain</a>
</div>
</div>
</div>September 5, 2013 at 5:30 pm #60962sk24iamMemberI can't seem to remove the copyright either. If I edit the init.php file will it revert back every time there is an update?
September 25, 2013 at 1:16 pm #64133Brad DaltonParticipantYes which is why its better to use a plugin or the special PHP custom code box.
-
AuthorPosts
- The topic ‘Copyright Problem using Prose Theme and Simple Hooks’ is closed to new replies.