Recognising individual meta blocks in PHP code
-
Hi! I’m very new to coding, but was wondering if anyone could help me with getting an if( statement to work in PHP.
Using the Lazy Blocks plugin, I’ve created a block (“Meta Information”) that places meta data (authors, data etc.) in the body of the post.
Meanwhile, I’m using a StudioPress snippet (I’m on a Genesis theme) –
remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );
– to hide the naturally occurring meta data in the post.
The problem arises in that I don’t want to apply this snippet to all of my posts. I have a huge backlog for which it would be impossible for me to manually apply this information block in order to display the meta.
As a solution, I wondered if I could create an if( statement before, testing first whether the block exists before applying the snippet.
Unfortunately, i don’t know how to refer to the block (or if it’s even possible to refer to it) in an if( statement.
Could anyone help with this? My own attempts at figuring out the block have all failed!
The page I need help with: [log in to see the link]
The topic ‘Recognising individual meta blocks in PHP code’ is closed to new replies.