Execute function when post is published
I try to use this function i have created when a post is published for the first time.
I try to use this function i have created when a post is published for the first time.
Don’t hack core.
I am pretty new in WordPress theme development and I’m not so into PHP (I came from Java and C#) and have the following situation in this custom theme
I got a set of meta boxes on a custom post type. Two of them are simple input/text-type fields, that should have autocompleted input:
I’d like users to be able to create and remove additional meta box fields as needed.
I’d love to be able to hide meta boxes using screen options, instead of removing them or restricting them to user roles, the goal is to just “uncheck” the meta box for the user.
I have a problem with my page. I’m trying to make a “Contact Us” page. It’s working perfectly fine design-wise. But when I try to send the form to the same page as origin. It returns 404 error.
I do development on one box and use a second for production. Right now I just dump the database and then do a find a replace for the URL changes; then copy over the files and import the new SQL.
If I have “pretty” permalinks enabled my code will work for static pages (will work if page is set as “home page” or “normal page” ). But my code breaks if I use “default permalink” structure.
How can I check to see if the current logged-in user is an administrator or an editor?