help with beginner php in child theme functions.php
-
I’m a noob with php but I’m think I’m half way to my solution. I want to add an additional header (html image) above the featured image on blog post pages and on the blog archive page. I’ve set up a staging site and installed a child theme. On its functions.php I enqueued the styles and then added my code:
// Add content header above post featured image add_action( 'astra_entry_top', 'add_blog_header' ); function add_blog_header() { // If we're on a single post or the blog archive page if ( is_single() OR is_home() ): // Echo the html ?> <p class="blog-header"><img class="aligncenter size-full wp-image-18927" src="https://www.annabelfrage.com/wp-content/uploads/2020/12/blog-header-stolen-moments.png" alt="Stolen Moments ~ Welcome to my blog" /></p> <?php endif; ?>
Something is not right though. Wp won’t save it and the message from WP is: Scrape nonce check failed. Please try again.
Any suggestions?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘help with beginner php in child theme functions.php’ is closed to new replies.