You shouldn’t inject postinfo()
in the <head>
section (that’s what happens when you use the wp_head
hook).
If you do not want to edit templates, I’d suggest you use the wp_footer
hook instead, and append the postinfo to your header div with jQuery, e.g.:
$('.post-info').appendTo('#header');
Related Posts:
- How do I save JS classes being applied to the WP dashboard via custom plugin?
- How to add an admin notice upon post save/update
- Keyboard shortcut for updating a page or post?
- Passing current cookies in wp_remote_get to get Draft Post Preview
- Ajax Load More Posts in Category Page
- Listen to Post action
- Get the current post ID as a variable in Javascript
- How to create WP Editor using javascript
- Manipulate post category after time
- Dynamically update post title in admin page
- WooCommerce – Create Products Programatically [closed]
- Add javascript when post is published
- Get post from custom REST endpoint in Gutenberg
- which action to hook to in order to perform post-publish action
- Cannot access current post’s ID in custom plugin
- Set number of article per number of page
- How to change post status from publish to draft using hook in wordpress?
- prevent showing posts of an specific category in admin posts section
- Add confirmation popup on “Move to Trash”
- Using radio button meta data from a custom meta box
- Create a separate JS application for an individual post?
- Convert a complex webpage into WP theme
- Add scripts on custom post add/edit pages Not Working
- How to store an extra (surrogate) ID when creating a post with wp_insert_post?
- Injecting JavaScript into a Post with WP3.x
- Global $post not working in OOP function WordPress
- How can I get a post field value using javascript?
- Define a wordpress constant through plugin functions?
- Custom post preview without saving
- How to get post bulk edit action trigger and get edited post ids?
- Block Editor: Reset Reusable Blocks to last saved record
- updating a post doesn’t trigger a function
- Hide a specific category in admin All Posts page (WordPress)
- Ajaxify This Code
- Prevent Delete Attachment by URL or When Submit
- What hook do you use to update a post?
- Updating post data on save (save_post vs wp_insert_post_data)
- Integrate OpenStreetMap on WordPress
- Redirect to another page using contact form 7? [closed]
- Only show a Post once in 10 visits
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- In post.php how can I remove onbeforeunload?
- Navigate through the posts using keyboard arrows
- Filter Hook for post table (not columns)
- why str_replace targeting pages instead just targeting post?
- Call current post URL in ajax
- Get author posts count after excluding a category
- Stop post submission without losing data?
- Cant’ Grab WordPress Built-in Posts Through Loop
- Get content from WordPress posts in Boostrap modal window – Javascript side?
- How can my plugin display a populated new post window
- search content of pages and list in wp-admin
- Finding a post’s slug
- Open a wordpress single post in a lightbox without the header and footer
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Using the loop to set locations for all posts on a single google map
- Insert JavaScript in a blog post or a new page?
- Why is it recommended to insert JS through the theme, plugin, etc rather than in the post directly?
- WordPress React re-rendering to many times
- Post form – AJAX won’t upload featured image – Plugin development
- WordPress: Develop multiple posts with different data
- Ajax post doesnt call succes after got the response
- Blog Post slider not working
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- testing result of $.post with json_encode
- How do I change the post title’s link on the posts page?
- Loading posts outside wordpress
- Update user meta when post published no working
- Fixing the WP Post Object for Custom Route
- Front end post delete error confirmation and success message
- Export Posts with specific custom fields by sql
- Custom plugin to get related posts by category
- Hide the contents for specific post
- Error 404 blog/page/2/
- How to hide a script ( an ad) from a specific post? [closed]
- Onclick open posts displayed in slider in a popup [closed]
- WP Rest API feature image breaking react component
- How can I add a custom caclulation form in post?
- Post preview mechanism architecture
- Counting words in a post
- How to programmatically create posts in wordpress?
- Remove permalink from images when inserting into post
- Insert woocommerce products programmatically with featured image and gallery
- wp-cli post create & media import issues
- How can I avoid conflicts between plugin and theme?
- How show categories in admin and get that selected to show posts in index
- Get posts with multiple categories
- Do not show children of a category
- Where exactly should I hook in order to change the post’s ID before insertion in the database?
- Display selected categories onto post page
- Would a “hub” page work better as a page or a post?
- Some doubts about how the loop work (trying debugging it)
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Group first, 2nd, 3rd, etc posts by category terms
- exclude particular category in api
- Make categories appear random
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Displaying categories items among posts
- On one of my sites a file is shown as 404 but the file IS there