Updates to theme .php file not showing up

  • Unknown's avatar

    Hi there,

    I’m currently building off the Baskerville-2 theme for one of my sites. What I did was download all the files in the theme from https://wordpress.com/theme/baskerville-2/ and then uploaded these files to a new child theme on wordpress.com (which is my host).

    I then activated this child theme and am currently trying to modify certain parts of this. I have been able to update the header and footer by modifying footer.php and header.php directly in the wordpress.com Theme File Editor.

    However, when I try to update certain files like content-author.php with something random like:

    <div class="author-heading">
    	<h2 class="author-title"><?php printf( esc_html__( 'Puddddddblisheddd by %s', 'baskerville-2' ), '<span class="author-name">' . get_the_author() . '</span>' ); ?></h2>
    </div><!-- .author-heading -->

    the changes are not reflected in the site. Am I not modifying the right file? In general, how can I change the various theming php files? I feel like I don’t understand some fundamental part of the theming mechanics.

    Thanks for the help!

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    A child theme doesn’t require all the files from the original theme. A child theme only needs a style.css and functions.php file, along with any files you wish to add or modify.

    We don’t provide support for creating child themes, but you can find information on how to get started with one here:

    https://wordpress.com/en/support/themes/child-themes/

    And you can find more detailed information in the theme developer documentation over on WordPress.org:

    Child Themes

    However, when I try to update certain files like content-author.php with something random like…the changes are not reflected in the site.

    The theme currently active on your site is still Baskerville-2. If you want the changes in your child theme to be visible, you need to activate the child theme instead, under Appearance ->Themes.

    But can you tell me what you’re trying to change? If it’s something that definitely needs custom PHP code added via a child theme we can’t help with that, but I’d be happy to refer you to a site where you can hire a freelance developer to help you with these changes.

    But it’s also possible the change you want doesn’t require custom code at all.

    Also note that your plan gives you access to both live chat and direct email support, though we also don’t provide support for creating child themes or other code customizations there.

    You can reach those at any time by clicking the Help icon that appears bottom-right on all the My Sites pages, or else via the direct link at https://wordpress.com/help/contact.

  • The topic ‘Updates to theme .php file not showing up’ is closed to new replies.