Created
April 17, 2020 15:09
-
-
Save WordBits/df71a65e10235a025130df48fabf2ae6 to your computer and use it in GitHub Desktop.
A snippet of code for adding an H1 tag to the top of the blog listing page on Astra sites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/add-h1-to-blog-listing-page/ | |
// Created by: Liam Dempsey | |
?> | |
<?php function prefix_your_function() { | |
if ( is_home() ) { | |
echo '<h1>Hey everyone!</h1>'; | |
} | |
} | |
add_action( 'astra_primary_content_top', 'prefix_your_function' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment