Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

publish

What is the reason for the new_to_publish hook not working?

August 5, 2022 by Magenaut

this hook should normally be triggered on new post but it doesn’t work

Categories Q&A, Wordpress Tags publish Leave a comment

Hook when post is set from published to draft?

August 5, 2022August 4, 2022 by Magenaut

Is there an action i can hook into when a post is set from published back to draft? I have tried both transition_post_status and publish_to_draft but they don’t seem to work when I set the post back to draft. I am doing something like:

Categories Q&A, Wordpress Tags draft, hooks, posts, publish Leave a comment

Send email to user when I publish a new post

August 5, 2022August 4, 2022 by Magenaut

i want to send email only new post publish in wordpress admin

Categories Q&A, Wordpress Tags actions, posts, publish Leave a comment

How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button

August 4, 2022August 3, 2022 by Magenaut

I have a custom post type (called contacts).
Since this post type is not working like a post, I don’t want to show SAVE DRAFT, PREVIEW, Status, Visibility or Publish Date.

Categories Q&A, Wordpress Tags metabox, publish Leave a comment

How can I make it so the Add New Post page has Visibility set to Private by default?

August 4, 2022August 3, 2022 by Magenaut

I’m trying to create a plugin that alters the Add New Post page so the Visibility field says “Private” by default:

Categories Q&A, Wordpress Tags plugin-development, plugins, posts, private, publish Leave a comment

How to access the post meta of a post that has just been published?

August 3, 2022August 2, 2022 by Magenaut

I am using the hook publish_post to run my code where I need the post meta of the just published post. But the post meta value I am looking for is somehow not available at this point of execution. On checking the wp_postmeta table, I found that my meta key value hasn’t been created yet. Also, I want this to work for a post published for the first time. Is there any other hook that can give me access to it?

Categories Q&A, Wordpress Tags post-meta, publish Leave a comment

Modify front-end delete button to publish pending posts

August 3, 2022August 2, 2022 by Magenaut

I’ve found this helpful snippet to make a delete post link on the front-end:

Categories Q&A, Wordpress Tags front-end, publish Leave a comment

How to limit user to publish post per day and per role?

August 3, 2022August 2, 2022 by Magenaut

I would like to know is there any way/Plugin to limit the user published post (in a given time span) by his role?

Categories Q&A, Wordpress Tags limit, posts, publish, user-roles Leave a comment

Publish pending article from front end with a button?

August 3, 2022August 2, 2022 by Magenaut

Is it possible to take the blue publish button in back end of the wordpress and place it in the frontend near the post in my index.php. I need a way to publish the pending article without going to dashboard and only admin can see the publish button?

Categories Q&A, Wordpress Tags front-end, php, posts, publish Leave a comment

Post publish only hook?

August 3, 2022August 2, 2022 by Magenaut

Is there any hook which is fired only when the post is “published” for the first time.

Categories Q&A, Wordpress Tags posts, publish Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress