Hide theme credits

Tagged: 

This topic contains 11 replies, has 4 voices, and was last updated by  Niklas Högefjord 1 year, 9 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #287

    daniel
    Member

    Hi niklas
    I would like to ask you if its possible to remove the theme´s credits underneath the footer
    (Swedish Greys – a WordPress theme from Nordic Themepark.)
    In case it is, would you mind telling me where is the file that I would have to modify?
    Thank you very much in advance

    #291

    Niklas Högefjord
    Participant

    Hi Daniel,
    Sorry for the delay. You can remove the theme credits if you use a child theme. Read more about about how to create a child theme here: http://docs.nordicthemepark.com/create-a-child-theme/

    After you have set up your child theme you can use the code example from the section Default Actions on this : http://docs.nordicthemepark.com/hook-reference/

    Good luck!
    /Niklas

    #354

    bee happy
    Member

    This didn’t work for me. I was able to add to the credits, but not remove any. I copied this code into a new functions.php and uploaded to the child folder.

    #357

    Niklas Högefjord
    Participant

    Hi,
    So now you can see two credit texts, the default and your own?

    Did you include the line:
    remove_action(‘ntp_framework_after’,’ntp_framework_about_text’);

    Cheers / Niklas

    #358

    bee happy
    Member

    Yes I did. And yes, there are two credits. I want to leave the credit to you, but would like to change the way it looks, so I have mine and then the original.

    #359

    Niklas Högefjord
    Participant

    Hi again, sorry for the late reply.

    Perhaps you can provide a link to your site and create a temporary login so I can have a closer look. You can email us via the contact form on the Contact page.

    Kind regards
    /Niklas

    #489

    chefrix
    Member

    Hi niklas, i have the same problem as bee happy. Take a look on my page (http://skatewords.com) and i can’t take off the credits. (Your theme is really great but i want a cleaner look) Hope you can help me! Thanks

    #490

    Niklas Högefjord
    Participant

    Hi Chefrix,
    Strange that it’s not working. I’ll try do describe the process step by step.

    1. Create a child theme to Swedish Greys.

    2. In your functions.php file wrap your changes in a function called something like childtheme_setup(). This function will hook into the WordPress action hook after_setup_theme(). Like this:

    add_action( 'after_setup_theme', 'childtheme_setup' );
    // Child theme custom functions
    function childtheme_setup() {
     // Your changes goes here
    }

    3. To remove the original credits, add the following:

    remove_action('ntp_framework_after','ntp_framework_about_text');

    4. To add your own credits, add the following:

    add_action('ntp_framework_after','childthemeprefix_about_text');
    	function childthemeprefix_about_text() {
    		?>
     		<div id="site-info">
     		<p>Your own text goes here.</p>
     		</div><!-- #site-info -->
     		<?php
    	}

    The complete code should look like this:

    add_action( 'after_setup_theme', 'childtheme_setup' );
    
    // Child theme custom functions
    function childtheme_setup() {
    
    	remove_action('ntp_framework_after','ntp_framework_about_text');
    
    	add_action('ntp_framework_after','childthemeprefix_about_text');
    	function childthemeprefix_about_text() {
    		?>
     		<div id="site-info">
     		<p>Your own text goes here.</p>
     		</div><!-- #site-info -->
     		<?php
    	}
    
    }

    I hope that solves the issue :)

    Thanks /Niklas

    #499

    chefrix
    Member

    Sorry but it’s not working :( Copy and paste your code in my functions.php in my childe theme and it produce an error.

    #500

    Niklas Högefjord
    Participant

    What does the error message say?

    #501

    chefrix
    Member

    Errore HTTP 500 (Internal Server Error)

    #505

    Niklas Högefjord
    Participant

    Well, I did copy and paste this code myself just to test it before I posted it here. It works for me. The error probably has something to do with opening and/or closing of php tags (<?php ?>).

    If you doesn’t have anything else in your childthemes functions.php the entire file should look like this:

    <?php
    add_action( 'after_setup_theme', 'childtheme_setup' );
     
    // Child theme custom functions
    function childtheme_setup() {
     
        remove_action('ntp_framework_after','ntp_framework_about_text');
     
        add_action('ntp_framework_after','childthemeprefix_about_text');
        function childthemeprefix_about_text() {
            ?>
            <div id="site-info">
            <p>Your own text goes here.</p>
            </div><!-- #site-info -->
            <?php
        }
     
    }
    ?>
Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.