PHP code appearing at top of page when using child theme

[ad_1]

Hello,

I am not a developer, however I followed instructions on creating a child theme manually (since creating it with a plugin failed completely). This involved making a style.css file and a functions.php file. The problem is, whatever I put in the php file, shows up on the front end at the top of the pages on my site.

If it helps at all: The themes I tried to create a child theme for are BuddyX and Listing Hive and the Multi Themes plugin and have BuddyX activated but used the plugin to set some pages to the Listing Hive theme. At first I used the instructions on this page to create my child themes: https://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/ and the code appears on every page. Then I used the code on this page: https://stackoverflow.com/questions/27566882/child-theme-enqueuing-with-dependencies and the code only appears on the Listing Hive theme pages.

Edit:

The WPBeginner one did not work at all and appeared all the time on the front. The second php code worked but I didn’t copy it right ]to the Listing Hive Child theme, after I corrected this, the code disappeared from the front end.

However I’ll keep this thread open in case someone has anything to add about why the code appears on the front end.

  • This topic was modified 45 minutes ago by stephunique. Reason: Add more detail
  • This topic was modified 41 minutes ago by stephunique. Reason: Add more detail
  • This topic was modified 7 minutes ago by stephunique.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer