PDA

View Full Version : PHP or whatever


jollyhumper
2017-05-03, 02:44 PM
Hi

I want to put my own info in the footer and not the shit that wordpress has put there.
It's the theme Twenty Seventeen (https://wordpress.org/themes/twentyseventeen/) (Click Preview and check footer)

Now, this one I'm not able to crack. Usually I crack those footer-codes, but not so on this one.
Here's the code
</div><!-- #content -->

<footer id="colophon" class="site-footer" role="contentinfo">
<div class="wrap">
<?php
get_template_part( 'template-parts/footer/footer', 'widgets' );

if ( has_nav_menu( 'social' ) ) : ?>
<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'social',
'menu_class' => 'social-links-menu',
'depth' => 1,
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>' . twentyseventeen_get_svg( array( 'icon' => 'chain' ) ),
) );
?>
</nav><!-- .social-navigation -->
<?php endif;

get_template_part( 'template-parts/footer/site', 'info' );
?>
</div><!-- .wrap -->
</footer><!-- #colophon -->
</div><!-- .site-content-contain -->
</div><!-- #page -->
<?php wp_footer(); ?>

</body>
</html>

Are you able to spot what I need to remove and replace with basic
<a href="www.url.url">Made by me</a> and such?

It's not an option to tweak this in the customize settings on the Dashboard

Jolly

Toby
2017-05-03, 03:04 PM
I'd focus on this part...
<?get_template_part( 'template-parts/footer/site', 'info' ); ?>
I'm guessing that 'template-parts/footer/site', 'info' is a path and file that contains the footer content. If that's the case you should be able to modify that file as needed.

jollyhumper
2017-05-03, 04:57 PM
Thank you for your reply.

However, that's not the answer.
I've not been able to put in my own info yet, but I managed to remove the social links that where in the footer. They were actually a menu I just had to disable. Hadn't seen that solution before, kinda clever idea.

I'll see if I can find the answer later, now it's time for bed.

As you said, this is probably a script that pulls info from elsewhere.
No filenames with the name you suggested.

I can live with "powered by wordpress" in the footer, as long as those social buttons are gone.

J:)lly

Useless
2017-05-03, 08:19 PM
I'm fairly certain that Toby is correct.

in template-parts/footer, open site-info.php

Here's the code:
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->

jollyhumper
2017-05-04, 03:50 AM
I'm fairly certain that Toby is correct.


I'm sorry Toby, you were in fact correct. I downloaded the site and searched, then I found the file. Need new glasses, seriously.

Thanks!

J:)lly