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. Wishlist Icon in Divi Blog module (loop)
  18. How to fix pagination for custom loops?
  19. Jquery Slider for profile template
  20. Counting the posts of a custom WordPress loop (WP_Query)?
  21. if ( is_home() && ! is_front_page() )
  22. Get excerpt using get_the_excerpt outside a loop
  23. Get post content from outside the loop
  24. Why should I put if(have_posts()), is while(have_posts()) not enough?
  25. Display featured products through custom loop in woocommerce on template page
  26. Split Content and Gallery
  27. How to get Author ID outside the loop
  28. How can i display the content in plaintext
  29. Redirect loop when trying to login to /wp-admin/ [duplicate]
  30. How to split a loop into multiple columns
  31. Is it necessary to reset the query after using get_posts()?
  32. Is there any difference between the_title() and echo get_the_title()?
  33. AJAX with loop filtering categories
  34. Do I need to use The Loop on pages?
  35. Remove the Homepage Query
  36. remove tags from the_content
  37. the_title() shows title of the first post instead of the page title?
  38. How to force excerpts / teasers in the loop
  39. Retrieve each widget separately from a sidebar
  40. Why am I being limited to ten posts on a custom loop?
  41. Should I use loop in the single.php file?
  42. A search for ‘0’ returns results
  43. Why do themes rely on “The Loop”?
  44. How to return loop contents
  45. Using the Loop to show all levels of subpages under a parent page? Halfway there
  46. Cleanest Way to Select Every Second Element in a Loop?
  47. Insert image or ad script after 3 posts using the loop
  48. Get date of last update outside of loop
  49. Pagination not working on home page
  50. Child Pages Loop
  51. How to place comments_template(); outside the loop?
  52. Multiple Loops Homepage?
  53. How to Change Loop to Order Posts by Views (using wp-postviews plugin)
  54. how to upload image using wp_handle_upload
  55. Avoiding using a loop to access a single post
  56. Strategy to get post meta for use outside the loop
  57. How to get the first image gallery of a product in woocommerce in a loop
  58. Get post by page name or slug
  59. save_post + insert_post = infinite loop
  60. Loop.php vs looping inside template file
  61. Custom Loop and Infinite Scroll
  62. Query Custom Meta Value with Increment
  63. Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
  64. is_home, and is_front_page conditional problem
  65. Is `query_posts` really slower than secondary query?
  66. Are there any scenarios where the query_posts may be used?
  67. the_content and wp_link_pages
  68. Adding ‘current_post_item’ class to current post in the loop
  69. How do I get the attributes of a short code from a post?
  70. How can I custom order the results from wp_list_categories?
  71. ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
  72. WooCommerce Product Page Loop – Output All Product Thumbnails
  73. wp-admin redirecting to https, denying login
  74. Endless loop with wp_insert_post and wp_update_post
  75. Display subpages under parent page as a list within a loop
  76. Why is it necessary to call rewind_posts() when using the loop more than once? [duplicate]
  77. When to use wp_reset_postdata();
  78. Is including the loop necessary for page.php? [duplicate]
  79. the_title(); works in a page template, outside the loop. Why?
  80. wordpress loop for specific category
  81. Add 20yrs to post date, and then query
  82. Why do themes have `while( have_posts() )` in templates like single.php?
  83. When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
  84. Three different post types on homepage
  85. What is best way passing variables to theme templates and using them different places like widgets?
  86. Apply styling only to first page sticky posts
  87. WordPress category & taxonomy loop with pagination
  88. Change meta tags programatically
  89. Add Incrementing ID to each paragraph in the_content
  90. Changing behavior of the loop twice in one page
  91. How do I prevent one of two multiple loops from repeating on a second page?
  92. Insert/sticky specific post into Loop at specific location
  93. Style every four posts differently [duplicate]
  94. Return vs Echo Shortcode
  95. wp_list_categories: get latest featured_image of category
  96. Hook into the loop via a plugin, and output something after every X post?
  97. Grossly inefficient wordpress loops!
  98. Multiple posts with one loop iteration
  99. Two custom loops, pagination, offset
  100. Is it possible to sort the post based on a custom field?
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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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