Unable to create header.php and footer.php despite assigning 'Site content' action to the content section

Hi there

I’m adding the ‘Site content’ action to the section where my content will be but it’s not creating the header.php and footer.php files.

Also, I’ve added some jQuery code at the end of index.html (immediately before the tag) but when I view the source in the browser, it’s moved the .js includes below my code so it doesn’t work (error of $ is not defined).

I just can’t suss out why it’s not leaving my code at the bottom and why the header/footer files aren’t being created.

Help! I’m using the latest version (v2.92)

Many thanks

Jon

With some help I’ve managed to fix both issues.

You can’t put the actions ‘Site content’, ‘The loop’ and ‘The content’ all on the same element. So I’ve separated them into three div elements like this:

<div wp-site-content>
    <div wp-loop>
        <div wp-the-content>
        </div>
    </div>
</div>

The issue with my jQuery code appearing above the .js include lines was resolved by moving my custom code into a separate .js file and then including that in my main page.

3 Likes