Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to hook into container

to hook in the <head> you would use wp_head. You can read the documentation here.

add_action( 'wp_head', 'meta_example' );

function meta_example() {

    echo '<meta name="description" content="Meta Description for this Page." />';

} // End meta_example()

This assumes that your theme has <?php wp_head(); ?> in the <head>.

Related Posts:

  1. How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
  2. Get ID of a page containing secondary loop in content
  3. How to add “time” data this?
  4. Next and Previous loop
  5. ACF custom field in [closed]
  6. Cannot retieve the_content() and the_author() – both returning empty strings
  7. Output meta into arrays
  8. value of metadata is null wrong use of if statement
  9. Sending mail not working correctly
  10. using update_user_meta to rank users
  11. get_post_meta printing empty fields, but it shouldn’t be
  12. Check value of post meta within IF statement
  13. Best way to check if a post with specific meta exists
  14. WP update_post_meta link loop
  15. Humanmade | Custom meta box class: How to display a repeatable meta box group?
  16. Display articles related to a custom field on a page
  17. Jquery Slider for profile template
  18. Get excerpt using get_the_excerpt outside a loop
  19. how to upload image using wp_handle_upload
  20. Avoiding using a loop to access a single post
  21. Adding ‘current_post_item’ class to current post in the loop
  22. wp_list_categories: get latest featured_image of category
  23. WordPress Alphabetical Glossary close div in loop
  24. Landing Page – Redirect Loop?
  25. How to make multiple Column in archive Page?
  26. Sort Popular Posts by Views for the Last Week
  27. category__not_in — anyway to use category name instead of id?
  28. Filtering posts by multiple taxonomies
  29. Is it possible to display previous post revision?
  30. Why do I get `Call to a member function have_posts() on a non-object `? [closed]
  31. Help with Changing loop.php?
  32. Adding shortcode closing tag after a loop
  33. Get Pagination (WP-PageNavi) not to work
  34. Filtering The Loop For Single Page and Blog Page
  35. Removing the_content() from the page
  36. Category Ajax call
  37. Change front-page layout after x amount of posts ( while in the same loop)
  38. Transient loop issue
  39. popular post weekly and monthly
  40. How can i use the same template file with a widget and category loop?
  41. WordPress Loop inside Loop?
  42. Filter the loop by categories using checkbox form
  43. Duplicated posts on category page
  44. WordPress loop: exclude if it is the latest post
  45. angularjs not displaying all posts
  46. Update status of all posts in a category
  47. is_active-sidebar loop
  48. Unable to change the “Read more” text inside the_excerpt
  49. Display Post Author Link above the loop
  50. Enabling users to control custom loop’s query
  51. Conditional: IF current user has NOT commented on current post (not including post author)
  52. Change post order by meta key, per post basis
  53. Loop Problem: Displays same set of post for all categories
  54. Query Nopaging action not having effect
  55. display post format text in loop
  56. How do i find and restore a sidebar that i accidentally deleted? [closed]
  57. Posts not showing
  58. Inserting CPT and static content at every X post, is this possible?
  59. Use BuddyPress data in loop (mkdir)
  60. Wrap every four posts within a div [duplicate]
  61. Get most recent post for every term in a given taxonomy type
  62. loop through posts and display inserted media and post title as a link
  63. Can’t grab author info outside of the loop
  64. How to tell if all posts are only in one category?
  65. How to get post category and author name for cusmot API?
  66. How do I set the Stewart Search Template to return only published posts in the result
  67. How to add Default Level-0 parent and Level-1 class in WordPress Category in li element?
  68. WordPress posts in the loop not stacking side by side
  69. How to separate post titles with a comma in the loop?
  70. Trying to get property ‘post_content’ of non-object
  71. WordPress loop : how to exclude some posts with their status?
  72. update_post_meta() not updating
  73. Include only one category but Exclude if is in a category from loop
  74. Create an archive page(loop) for edd products (music files) with an audio player?
  75. WordPress Pages in an Array
  76. the_content() keeps repeating itself
  77. Show different Google Map markers for different post_meta values
  78. numberposts not responding to wp_reset_postdata()
  79. Foundation modal in wordpress php loop
  80. My loop of random posts drags in comments of said random post
  81. Why my title change the last post title in my loop?
  82. Where should get_post_meta() go to get $post->ID get_post_meta() is empty and $post->ID & get_the_id() are working
  83. Get child taxonomies in loop
  84. Have multiple loops on a page appear after/between page content
  85. How to fix pagination for custom loops?
  86. Get gallery and product gallery images full size
  87. Loop not showing up on page template
  88. One loop for sticky, one for all the rest – how, without specifying category?
  89. Using in_category for non standard loops
  90. Use Loop or direct database query?
  91. How to end this loop properly?
  92. Creating mulitple loops in a sub-category page
  93. Custom Post Type archive above Single Post in single.php (same author)
  94. Custom Page Template and Category Exclusion
  95. Display Featured Image
  96. AJAX in wordpress theme loop
  97. Duplicate post problem
  98. Loop that displays all posts by logged in user, with Post Edit link
  99. How to store wordpress title in a variable
  100. How to split the loop every 2 and 5 results? [closed]
Categories loop Tags loop, post-meta, wp-head
How do I share variables between two functions?
Adding logo to WordPress header

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress