Tagged: footer
- This topic has 17 replies, 7 voices, and was last updated 8 years, 6 months ago by Mahesh.
-
AuthorPosts
-
January 26, 2016 at 4:31 pm #83780towerlexaMember
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
January 26, 2016 at 4:59 pm #83784MaheshParticipantHi @towerlexa,
Thank you for the consideration.
Assuming you have already created the child theme. Add following codes in your child theme’sfunctions.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,
MaheshJanuary 26, 2016 at 5:13 pm #83785towerlexaMemberHi 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
January 26, 2016 at 5:26 pm #83786MaheshParticipantJanuary 27, 2016 at 1:48 am #83827towerlexaMemberThank 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
January 27, 2016 at 12:03 pm #83862MaheshParticipantHi @towerlexa,
Thank you very much.
Yes, its Nepal. We welcome you here.
Have a nice day!Regards,
MaheshMarch 9, 2016 at 7:22 pm #87153NuzzinaMemberHi, I have the same problem with Clean Box theme. How can I fix it?
March 10, 2016 at 9:32 am #87197MaheshParticipantHi @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,
MaheshMarch 10, 2016 at 2:39 pm #87222NuzzinaMemberOk, thank you very much.
March 28, 2016 at 9:08 pm #88436IdisMemberHello
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
March 29, 2016 at 10:22 am #88468MaheshParticipant@idis: The above code should work fine. Please post in your site url. Have you activated the child theme?
Regards,
MaheshApril 9, 2016 at 3:01 am #89090RobertParticipantHi!
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
Can you help me?
Thanks: Sziszi
April 10, 2016 at 10:08 am #89141MaheshParticipant@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,
MaheshApril 10, 2016 at 4:17 pm #89159RobertParticipantHi!
Thanks, it works!
Sziszi
April 28, 2016 at 4:46 am #90578robertlParticipantHi Mahesh,
How do you apply/activate the child theme without it overiding the parent theme and goes back to the default theme?
Cheers,
RobMay 13, 2016 at 3:00 am #91608flavioParticipantI use the catch Responsive could help me edit the footer as help these other theme
May 13, 2016 at 9:55 am #91618MaheshParticipant@robertl: Sorry for the late reply. Can you please clarify more. Do you mean to just use Child theme without any customization?
Regards,
MaheshMay 13, 2016 at 9:57 am #91619MaheshParticipant@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 -
AuthorPosts
- The topic ‘Adding a link to the footer’ is closed to new replies.