• Resolved varinator

    (@varinator)


    footer.php has this code to generate the text in the footer:

    <div class="footercredits clearfix">
        		<?php if (has_nav_menu('footer_navigation')) :?>
        			<div class="footernav clearfix">
        			<?php wp_nav_menu(array('theme_location' => 'footer_navigation', 'menu_class' => 'footermenu'));?>
        			</div>
        		<?php endif;?>
            	<?php if(!empty($pinnacle['footer_text'])) {
            		$footerstring = $pinnacle['footer_text'];
            		$footerstring = str_replace('[copyright]','&copy;',$footerstring);
            		$footerstring = str_replace('[the-year]',date('Y'),$footerstring);
            		$footerstring = str_replace('[site-name]',get_bloginfo('name'),$footerstring);
            		$footerstring = str_replace('[theme-credit]','- WordPress Theme by <a href="https://www.kadencethemes.com/" target="_blank">Kadence Themes</a>',$footerstring);
            		echo '<p>'. do_shortcode($footerstring).'</p>';} ?>
        	</div><!-- credits -->

    Is there a way to override this using functions.php in child theme or do I need to copy footer.php to child theme folder and edit manualy?

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you’re changing the layout then I’d suggest making a copy of the footer.php file into the child theme, creating it in a child theme would be the safest so future updates to the parent theme won’t override your changes.

    But if you just want to change the content there appears to be a theme options in the dashboard according to that code.

    Thread Starter varinator

    (@varinator)

    Thanks. There is an option, I just found it. I’m new to PHP – out of curiosity, which piece of code did indicate that there is an option in the dashboard for it?

    No problem, it was this code: $pinnacle[‘footer_text’] meaning it’s a php array that has an index of ‘footer_text’ with the text from the theme options stored in it.

    And the rest of it does some formatting before it spits out the final result.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: Pinnacle] How to change footer text in child theme’ is closed to new replies.