Can’t publish custom type posts that don’t support title and editor, instead they’re saved as draft

After thorough investigation, I identified the root cause of the issue. TL;DR: A bug in my JavaScript code was causing the post form to be submitted without the necessary publish parameter. Consequently, WordPress interpreted the request as an attempt to save a draft. I resolved the issue by updating the code to include the publish … Read more

disable the post title field after publishing

Use the action hook edit_form_after_title The display:none rule might cause some JS issue so it might be best to use visibility:hidden so the element is still accessible to whatever scripts in the DOM. This condition will hide the form fields and show the title and URL statically. add_action(‘edit_form_after_title’, function($post) { if( !empty($post->post_title) && !current_user_can(‘manage_options’) ) … Read more

Add custom button to the changeset status in the Customizer

Unfortunately there is no official hook for customizer actions yet. Since the customizer actions are predefined by javascript, you can use the The Customizer JavaScript API to add new actions via the push function. PHP function for the index.php/functions.php: // Include scripts in customizer. add_action( ‘customize_controls_enqueue_scripts’, ‘script’ ); function script() { wp_enqueue_script( ‘custom-customize-controls’, plugin_dir_url( __FILE__ … Read more

Check if a new WordPress post is successfully published with jQuery

I have replace the answer I gave yesterday with this newly updated and tested version. I also added some code to test with that changes Publish to Update after 6 seconds. Please give it a shot. <input type=”submit” name=”save” id=”publish” class=”button button-primary button-large preventDefault” value=”Publish”> <script> var publishButton = document.getElementById(‘publish’); var checkPublishStatus = setInterval(function() { … Read more

update asset url on free slider revolution version 6.5.25

surely @caleb’s answer is the best but right now I can’t use it. I used the response found in: Need to Replace Old URL with New URL in Revolution Slider. here I put the steps: I export the slider in the local environment. then in the slider-revolution section we go to ‘Manual Import‘