0

i have a client that gave me his wordpress site for re-coding. and i saw he have a custom theme. so i tried to edit his site homepage, using the css stylsheet file and i saw that the file containing some code that i can't understant and i will be happy if someone can help me understand what is it and hoe can i edit / find what is this. i asaw when i'm printing it, it containg somthing that similar to a css class.

this is it:

 <?php echo get_post_meta(6,'home-news-title',true);?>
lol
  • 73
  • 1
  • 9
  • 2
    https://developer.wordpress.org/reference/functions/get_post_meta/ – Michael Coker Jul 22 '17 at 16:57
  • 1
    If you're going to work on WordPress, you will need to get familiar with the built in functions it provides. This one is in `wp-includes/post.php`, which you have the source to, so you can just read it. – Scott C Wilson Jul 22 '17 at 17:06

1 Answers1

0

That line displays on the frontend the content of a meta-key named "home-news-title" for the post which ID is 6.

You can find the corresponding post in the admin backend by just hovering the mouse on the post title in the post list window. The ID is shown in the associated URL after ..post.php?post=XX

Fabio Marzocca
  • 1,573
  • 16
  • 36
  • i tried to findout what is this post. but i can't find the post that his postID is 6. i found in my stylesheet.css file this lines too: ?php echo get_post_meta(6,'home-top-left-content',true); ?> – lol Jul 23 '17 at 18:43
  • That is not CSS content. It is PHP! To find the post ID, follow this indications: https://bobwp.com/find-post-page-category-id-wordpress/ could it be that you have custom post types? In this case, look into that list too. – Fabio Marzocca Jul 24 '17 at 16:21
  • Mazzocca yea i looked up in this website. i don't have any post with postID = 6 :/ – lol Jul 29 '17 at 16:34
  • so, just remove that line! – Fabio Marzocca Jul 30 '17 at 19:37