Tagged: 

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #83780
    towerlexa
    Member

    Hi @All,

    i’am new here and i try to add a additional link to the website https://logopaedie-zahn.de

    Of course i read some (not all) of the posts wich are talking about to change the links or remove them.

    Please, don’t misunderstand my idea! Id don’t want to remove your credits like the guy in this post: http://catchthemes.com/support-forum/topic/how-to-replace-the-footer-credits/ !

    I would easily add a link for the data, cookie and security guidings at my site and the idea was to add it into the footer, so it could displayed very easy on every page.

    Maybe you could help me a little bit?
    Unfortunately i’am not a PHP Developer, so that it is not easy for me to understand all the functions and the places where they would be defined and why.
    I’ve created a child theme, and deactivated some search boxes, which i don’t need.

    Kind regards,

    Axel

    #83784
    Mahesh
    Keymaster

    Hi @towerlexa,

    Thank you for the consideration.
    Assuming you have already created the child theme. Add following codes in your child theme’s functions.php.

    function catchresponsive_child_footer_content() {
    	//catchresponsive_flush_transients();
    	if ( ( !$catchresponsive_footer_content = get_transient( 'catchresponsive_footer_content' ) ) ) {
    		echo '<!-- refreshing cache -->';
    
    		$catchresponsive_content = catchresponsive_get_content();
    
    		$catchresponsive_footer_content =  '
        	<div id="site-generator">
        		<div class="wrapper">
        			<div id="custom-links">
        			    <a title="Data Link" href="#" target="_self">Data Link</a> |
        			    <a title="Cookie Link" href="#" target="_self">Cookie Link</a> |
        			    <a title="Security Link" href="#" target="_self">Security Link</a>
        			</div>
        			<div id="footer-content" class="copyright">'
        				. $catchresponsive_content['left']
        				. ' | '
        				. $catchresponsive_content['right'] .
        			'</div>
    			</div><!-- .wrapper -->
    		</div><!-- #site-generator -->';
    
        	set_transient( 'catchresponsive_footer_content', $catchresponsive_footer_content, 86940 );
        }
    
        echo $catchresponsive_footer_content;
    }
    
    add_action( 'init', 'catchresponsive_child_add_links_in_footer' );
    
    function catchresponsive_child_add_links_in_footer() {
    	remove_action( 'catchresponsive_footer', 'catchresponsive_footer_content', 100 );
    	add_action( 'catchresponsive_footer', 'catchresponsive_child_footer_content', 100 );
    }

    Note: Please change the title and href attributes of the anchor tags to your desired title and links. If you want the link to open link in the save window/tab leave the target attribute as it is but if you want it to open in new tab, replace “_self” with “_blank”.

    Regards,
    Mahesh

    #83785
    towerlexa
    Member

    Hi Mahesh,

    thank you very much for your really fast answer. I will try this in the next time. I hope i’ve some time this evening.

    Kind regards,

    Axel

    #83786
    Mahesh
    Keymaster

    Hi @towerlexa,

    Thank you for your appreciation.
    Have a nice day!

    Regards,
    Mahesh

    #83827
    towerlexa
    Member

    Thank you very much once again. It works like a charm. I appreciate your help very much, and i’am happy now. I waste a lot of hours with searching on google and trying out a lot of tips and hints.

    I would like to send you many greetings to nepal, right?

    Kind regards,

    Axel

    #83862
    Mahesh
    Keymaster

    Hi @towerlexa,

    Thank you very much.
    Yes, its Nepal. We welcome you here.
    Have a nice day!

    Regards,
    Mahesh

    #87153
    Nuzzina
    Member

    Hi, I have the same problem with Clean Box theme. How can I fix it?

    #87197
    Mahesh
    Keymaster

    Hi @nuzzina,

    If you want to customize the footer text, I recommend you to upgrade to Pro version. But if you prefer to add extra link in Free version, you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme’s functions.php add the following codes.

    function clean_box_child_footer_content() {
        delete_transient( 'clean_box_footer_content' );
        if ( ( !$clean_box_footer_content = get_transient( 'clean_box_footer_content' ) ) ) {
            echo '<!-- refreshing cache -->';
    
            $clean_box_content = clean_box_get_content();
    
            $clean_box_footer_content =  '
            <div id="site-generator" class="two">
                <div class="wrapper">
                    <div id="custom-links">
                        <a title="Link 1" href="#" target="_self">Link 1</a> |
                        <a title="Link 2" href="#" target="_self">Link 2</a>
                    </div>
                    <div id="footer-left-content" class="copyright">' . $clean_box_content['left'] . '</div>
    
                    <div id="footer-right-content" class="powered">' . $clean_box_content['right'] . '</div>
                </div><!-- .wrapper -->
            </div><!-- #site-generator -->';
    
            set_transient( 'clean_box_footer_content', $clean_box_footer_content, 86940 );
        }
    
        echo $clean_box_footer_content;
    }
    
    add_action('init', 'clean_box_child_add_links_in_footer');
    function clean_box_child_add_links_in_footer() {
        remove_action( 'clean_box_footer', 'clean_box_footer_content', 100 );
        add_action( 'clean_box_footer', 'clean_box_child_footer_content', 100 );
    }

    Note: Please change the title and href attributes of the anchor tags to your desired title and links. If you want the link to open link in the save window/tab leave the target attribute as it is but if you want it to open in new tab, replace “_self” with “_blank”.

    Regards,
    Mahesh

    #87222
    Nuzzina
    Member

    Ok, thank you very much.

    #88436
    Idis
    Member

    Hello

    I would make the same like towerlexa, and I copied the code in my function.php below this code:

    ———————————————————
    <?php
    /**
    * Child Theme functions and definitions
    *
    */

    /**
    * Loading Parent theme stylesheet
    *
    */
    add_action( ‘wp_enqueue_scripts’, ‘catchresponsive_child_enqueue_styles’ );
    function catchresponsive_child_enqueue_styles() {
    wp_enqueue_style( ‘catchresponsive-parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }
    ———————————————————

    But it doesn’t work.
    I don’t know why, can help me someone?

    Thanks and kind regards

    Idis

    #88468
    Mahesh
    Keymaster

    @idis: The above code should work fine. Please post in your site url. Have you activated the child theme?

    Regards,
    Mahesh

    #89090
    Robert
    Participant

    Hi!

    I’m trying to activate my child theme with this code, but not works.

    <?php
    /**
     * Child Theme functions and definitions
     *
     */
    
    function catchresponsive_child_footer_content() {
    	//catchresponsive_flush_transients();
    	if ( ( !$catchresponsive_footer_content = get_transient( 'catchresponsive_footer_content' ) ) ) {
    		echo '<!-- refreshing cache -->';
    
    		$catchresponsive_content = catchresponsive_get_content();
    
    		$catchresponsive_footer_content =  '
        	<div id="site-generator">
        		<div class="wrapper">
        			<div id="custom-links">
        			    <a title="Data Link" href="#" target="_self">Data Link</a> |
        			    <a title="Cookie Link" href="#" target="_self">Cookie Link</a> |
        			    <a title="Security Link" href="#" target="_self">Security Link</a>
        			</div>
        			<div id="footer-content" class="copyright">'
        				. $catchresponsive_content['left']
        				. ' | '
        				. $catchresponsive_content['right'] .
        			'</div>
    			</div><!-- .wrapper -->
    		</div><!-- #site-generator -->';
    
        	set_transient( 'catchresponsive_footer_content', $catchresponsive_footer_content, 86940 );
        }
    
        echo $catchresponsive_footer_content;
    }
    
    add_action( 'init', 'catchresponsive_child_add_links_in_footer' );
    
    function catchresponsive_child_add_links_in_footer() {
    	remove_action( 'catchresponsive_footer', 'catchresponsive_footer_content', 100 );
    	add_action( 'catchresponsive_footer', 'catchresponsive_child_footer_content', 100 );
     
     
     
    
    /**
     * Loading Parent theme stylesheet
     *
     */
    add_action( 'wp_enqueue_scripts', 'catchresponsive_child_enqueue_styles' );
    function catchresponsive_child_enqueue_styles() {
        wp_enqueue_style( 'catchresponsive-parent-style', get_template_directory_uri() . '/style.css' );
    }

    Error message: Parse error: syntax error, unexpected end of file in /storage/web/sziszi/sziszi.com/www/wordpress/wp-content/themes/catch-responsive-child/functions.php on line 52

    http://uj.sziszi.com/

    Can you help me?

    Thanks: Sziszi

    #89141
    Mahesh
    Keymaster

    @sziszi: Seems you are missing a closing curly brace (}) in the function catchresponsive_child_add_links_in_footer because of this it is displaying the error.

    function catchresponsive_child_add_links_in_footer() {
    	remove_action( 'catchresponsive_footer', 'catchresponsive_footer_content', 100 );
    	add_action( 'catchresponsive_footer', 'catchresponsive_child_footer_content', 100 );

    which should be like as follows:

    function catchresponsive_child_add_links_in_footer() {
    	remove_action( 'catchresponsive_footer', 'catchresponsive_footer_content', 100 );
    	add_action( 'catchresponsive_footer', 'catchresponsive_child_footer_content', 100 );
    }

    Hope this helps.
    Let me know if any problem.

    Regards,
    Mahesh

    #89159
    Robert
    Participant

    Hi!

    Thanks, it works!

    Sziszi

    #90578
    robertl
    Participant

    Hi Mahesh,

    How do you apply/activate the child theme without it overiding the parent theme and goes back to the default theme?

    Cheers,
    Rob

    #91608
    flavio
    Participant

    I use the catch Responsive could help me edit the footer as help these other theme

    #91618
    Mahesh
    Keymaster

    @robertl: Sorry for the late reply. Can you please clarify more. Do you mean to just use Child theme without any customization?

    Regards,
    Mahesh

    #91619
    Mahesh
    Keymaster

    @flavio: If you are using Catch Responsive free theme, please refer to this thread.
    https://catchthemes.com/support-forum/topic/adding-a-link-to-the-footer/#post-83784
    This is how it is done. In Catch Responsive Pro theme, this options is available by default. I recommend you to upgrade to Catch Responsive Pro.

    Regards,
    Mahesh

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Adding a link to the footer’ is closed to new replies.