Copyright Problem using Prose Theme and Simple Hooks

Community Forums Forums General Discussion Copyright Problem using Prose Theme and Simple Hooks

This topic is: resolved

This topic contains 12 replies, has 5 voices, and was last updated by  braddalton 10 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #31338

    conster
    Participant
    Post count: 11

    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.

    http://greenrideco.wpengine.com/

    #31340

    braddalton
    Participant
    Post count: 8794

    Different ways to fix this why not use Genesis Simple Edits to remove or customize the footer creds?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31428

    conster
    Participant
    Post count: 11

    Because we are anticipating using hooks in the near future so I would like to keep the Genesis Simple Hooks plugin.

    #31433

    echofoxtrot
    Participant
    Post count: 33

    Well, 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.

    #31470

    Christopher Harris
    Participant
    Post count: 46

    When 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

    #31539

    conster
    Participant
    Post count: 11

    I 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.

    #31552

    braddalton
    Participant
    Post count: 8794

    Yeah 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.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31640

    conster
    Participant
    Post count: 11

    Here 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 &copy; <?php echo date(“Y”); ?> ·
    <a title=”Your Title” href=”http://www.yourdomain.com”>Your Domain</a>
    </div>
    </div>
    </div>

    #31646

    conster
    Participant
    Post count: 11

    I 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.

    #31648

    conster
    Participant
    Post count: 11

    Okay.  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.

    #31763

    conster
    Participant
    Post count: 11

    I 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 &copy; 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 &copy; <?php echo date(“Y”); ?> ·
    <a title=”Your Title” href=”http://www.yourdomain.com”>Your Domain</a>
    </div>
    </div>
    </div>

     

    #60962

    sk24iam
    Participant
    Post count: 2

    I 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?

    #64133

    braddalton
    Participant
    Post count: 8794

    Yes which is why its better to use a plugin or the special PHP custom code box.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Copyright Problem using Prose Theme and Simple Hooks’ is closed to new replies.