Why some images are not allowed to be edited only for thumbnails?
I’ve just found the reason why: the image is smaller than the thumbnail dimensions. That’s the reason why.
I’ve just found the reason why: the image is smaller than the thumbnail dimensions. That’s the reason why.
The id attribute was added to the <style> tags in WordPress v4.1 (2014) — see the Trac changesets 29956 and 29958 which both mentioned ticket #30032 (“Add ID attribute to style element from wp_add_inline_style()“): In order to support partial preview refreshes (#27355), it is important for all partials being updated to have an element with … Read more
Got it – update_post_meta has to be used for _wp_attachment_image_alt
This issue shouldn’t happen if you’re using the classic editor, however, if you’re using the block/Gutenberg editor which uses the REST API, then that issue can be fixed by using the wp_after_insert_post hook instead. Excerpt from https://make.wordpress.org/core/2020/11/20/new-action-wp_after_insert_post-in-wordpress-5-6/: The new action wp_after_insert_post has been added to WordPress 5.6 to allow theme and plugin developers to run … Read more
If I’m right, you want to get javascript bootstrap via CDN. Try to make it like in the example below. Other scripts you should attach according to this example. You must note your custom scripts should be attached after the bootstrap script if they would be using the bootstrap scripts. function enqueue_js() { wp_enqueue_script( ‘bootstrap_js’, … Read more
There’s no such thing as a single permalink document name. It varies depending on what is being queried. Taxonomy terms use the slug of the term, pages and posts uses the slug of the posts. Post type archives sometimes use the post type name, but they might use something else entirely depending on how it’s … Read more
The sample code function jon_save_post_webhook($post_id, $post) { // Check to see if autosaving etc., if so ignore if ($post->post_status !== ‘publish’) { return; } if ($post->post_status !== ‘trash’) { return; } /// rest of code Will always return early because while $post->post_status can be “trash” or “publish”, it can never be both at the same … Read more
Yes, you can create multiple templates for a custom post. Simply create a new template page and add the following code in the template header: <?php /** * Template Name: Article type 1 * Template Post Type: post, page */ get_header(); ?>
I wonder why this is happening or what I am doing wrong here WordPress has a revisions system which stores a record of each saved draft or published update, and a post can have one of a number of statuses like auto-draft when a new post is created and saved automatically in the background, draft … Read more
The use of curly braces ({}) in accessing an array index or string offset was deprecated in PHP 7.4 and later versions. You need to use square brackets ([]) instead. Update the code on line 82 (or there about) in call.php to fix the offending use of {}.