Hi there,
Can you share a link to the page and explain what Meta Data you want to display and where you want it displayed. Then we can let you know.
I guess that jetsmatt85 is looking for files like pagename.php to edit them directly, but there are not such files in WordPress, except the index.php for the home page. The pages are stored actually in the database.
To add HTML code to a page you have to edit the page as usual in WordPress, add a block type “code <>” into the page and enter the additional html code you need. (If I have understood well how it works in WordPress, I am newbie).
Hey David, thanks! It’s stuff for FB/Twitter Cards, so stuff like this, in the <head> section:
<meta name=”twitter:card” content=”summary_large_image” />
The website is http://swipesports.com, and we’d like it on our homepage. The way we have it set up is HP is laid out in “cover page,” so I was guessing the meta data would go there, but i’m not sure. I just can’t figure out where those pages are showing up in my file manager, so I can edit them there. I know usually it’s somewhere in /wp-content/themes/generatepress, but maybe I’m wrong.
Just wanna put some metadata for Twitter/FB cards in there, and I was guessing to do that I have to add that in the <head> section of “cover page,” but could be wrong.
Theme Author
Tom
(@edge22)
Hi there,
WordPress is a content management system – it uses template files to pull content from your database instead of having individual pages that you can edit via file manager.
To add things to the <head>
section of your site, you need to use PHP along with conditionals to determine when to output them.
For example, if you wanted to add something to the <head>
section of your front page, you would do this:
add_action( 'wp_head', function() {
if ( is_front_page() ) :
?>
Meta goes in here.
<?php
endif;
} );
Hope this helps!
Wow, excellent answer, Tom, thanks for that! I learned something important today for sure, thanks to you. Major help. I’ll go that route now, and also in the future.
Much appreciated on the support/assistance. Thanks!
Theme Author
Tom
(@edge22)
No problem! Glad I could help 🙂