Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Category: Wordpress

Wordpress

WordPress: Fix a Navigation Block Losing Submenu Items After Sync

- 21.11.26 - ErcanOPAK comment on WordPress: Fix a Navigation Block Losing Submenu Items After Sync

πŸ“ WordPress: Fix a Navigation Block Losing Submenu Items After Sync The core Navigation block can either store its menu directly inside the block (as nested list-item blocks) or link to a classic menu synced in through Appearance > Manage Menus. When that sync runs again, it pulls its items strictly from the classic menu’s […]

Read More
Wordpress

WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone

- 21.11.26 - ErcanOPAK comment on WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone

πŸ“ WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone WordPress stores a scheduled post’s time both in the site’s local timezone (post_date) and in UTC (post_date_gmt), and the actual background job that fires publication is scheduled against the UTC value. If the site’s timezone setting under Settings > General changes after a post […]

Read More
Wordpress

WordPress: Fix the Site Health Check Flagging a Fake Cron Issue

- 20.11.26 - ErcanOPAK comment on WordPress: Fix the Site Health Check Flagging a Fake Cron Issue

πŸ“ Fix the Site Health Check Flagging a Fake Cron Issue The Site Health screen’s scheduled events check verifies WP-Cron by having the server send itself a loopback request to wp-cron.php, and that self-request is a different code path than the one real visitor traffic triggers WP-Cron through on every normal page load. A firewall […]

Read More
Wordpress

WordPress: Fix a Reusable Block Editing Every Copy at Once

- 20.11.26 - ErcanOPAK comment on WordPress: Fix a Reusable Block Editing Every Copy at Once

πŸ“ Fix a Reusable Block Editing Every Copy at Once A reusable block (what the block editor now calls a synced pattern) is stored as a single entity that every post referencing it points back to, so editing the text inside one inserted copy edits the one shared pattern itself – and every other post […]

Read More
Wordpress

WordPress: Fix the Block Editor Pasting Hidden Formatting Marks

- 19.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Pasting Hidden Formatting Marks

πŸ“ Fix the Block Editor Pasting Hidden Formatting Marks Pasting text from Word, Google Docs, or a PDF into the Gutenberg block editor brings along more than the visible words: non-breaking spaces, zero-width characters, smart quote glyphs, and Word’s own inline style spans can all ride along inside the clipboard HTML, because the editor’s default […]

Read More
Wordpress

WordPress: Fix Multisite Subdomain Mapping to the Wrong Blog

- 19.11.26 - ErcanOPAK comment on WordPress: Fix Multisite Subdomain Mapping to the Wrong Blog

πŸ“ Fix Multisite Subdomain Mapping to the Wrong Blog A WordPress Multisite network running subdomain installs resolves each incoming request to a blog_id through a lookup that gets cached in the “blog-lookup” object cache group. When a site’s domain mapping changes β€” a new primary domain, an updated DNS record, or a direct database edit […]

Read More
Wordpress

WordPress: Fix a Custom Field Resetting After Every Autosave

- 18.11.26 - ErcanOPAK comment on WordPress: Fix a Custom Field Resetting After Every Autosave

πŸ“ WordPress: Fix a Custom Field Resetting After Every Autosave WordPress’s autosave heartbeat fires every 60 seconds and saves a post revision in the background using its own AJAX request, which only posts the fields the editor actually serialized for that revision — not necessarily every custom field on the screen. A meta-box save handler […]

Read More
Wordpress

WordPress: Fix the Classic Editor Toolbar Missing After an Update

- 18.11.26 - ErcanOPAK comment on WordPress: Fix the Classic Editor Toolbar Missing After an Update

πŸ“ WordPress: Fix the Classic Editor Toolbar Missing After an Update A core or plugin update bumps the version query string on every enqueued script and style so browsers know to fetch the new files instead of a cached copy — but that only works if nothing else is caching the admin screen itself. A […]

Read More
Wordpress

WordPress: Fix a Shortcode Rendering Twice Inside the Block Editor

- 17.11.26 - ErcanOPAK comment on WordPress: Fix a Shortcode Rendering Twice Inside the Block Editor

πŸ“ WordPress: Fix a Shortcode Rendering Twice Inside the Block Editor A classic shortcode registered through add_shortcode() can appear to render itself twice inside the Block Editor’s live preview even though the published front end only shows it once, because a page builder panel or preview sidebar that calls do_shortcode($content) on its own copy of […]

Read More
Wordpress

WordPress: Fix the Media Library Showing Dead Thumbs After an S3 Move

- 17.11.26 - ErcanOPAK comment on WordPress: Fix the Media Library Showing Dead Thumbs After an S3 Move

πŸ“ WordPress: Fix the Media Library Showing Dead Thumbs After an S3 Move Moving uploads to S3 through an offload plugin rewrites the attachment’s primary URL correctly, but the wp-admin Media Library grid doesn’t read that top-level URL for its thumbnails β€” it reads the per-size file paths stored inside the serialized _wp_attachment_metadata postmeta, and […]

Read More
Wordpress

WordPress: Fix Featured Images Vanishing After a CDN Migration

- 16.11.26 - ErcanOPAK comment on WordPress: Fix Featured Images Vanishing After a CDN Migration

πŸ“ WordPress: Fix Featured Images Vanishing After a CDN Migration WordPress stores an attachment’s URL in post content and in its standard attachment metadata at upload time, pointing at whatever domain was configured then. Migrating media to a CDN by running a URL search-and-replace across the database typically covers wp_posts content and the normal attachment […]

Read More
Wordpress

WordPress: Fix Permalinks 404ing After Switching PHP Versions

- 16.11.26 - ErcanOPAK comment on WordPress: Fix Permalinks 404ing After Switching PHP Versions

πŸ“ WordPress: Fix Permalinks 404ing After Switching PHP Versions Pretty permalinks depend on the web server correctly rewriting every request to index.php, and on many managed hosts that rewrite logic is tied to a specific PHP-FPM pool socket baked into the vhost configuration. Switching a site’s PHP version from the hosting control panel can silently […]

Read More
Wordpress

WordPress: Fix the Block Editor Freezing on Reusable-Heavy Posts

- 15.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Freezing on Reusable-Heavy Posts

πŸ“ WordPress: Fix the Block Editor Freezing on Reusable-Heavy Posts Gutenberg re-validates every reusable block’s saved markup against its current block definition on every autosave cycle, to detect whether the block’s output has drifted from what the block type now expects. A post that references a whole library of small reusable blocks — separate CTA, […]

Read More
Wordpress

WordPress: Fix Regenerated Thumbnails Not Updating Old Posts

- 15.11.26 - ErcanOPAK comment on WordPress: Fix Regenerated Thumbnails Not Updating Old Posts

πŸ“ WordPress: Fix Regenerated Thumbnails Not Updating Old Posts A “Regenerate Thumbnails” run recreates the image FILES at each registered size and updates the attachment’s own metadata, so anything that reads that metadata at render time — like the block editor’s Image block, which stores only the attachment ID and a size slug — picks […]

Read More
Wordpress

WordPress: Fix the Block Editor Quietly Stripping a Custom CSS Class the Moment You Paste Rich Text Copied From Google Docs

- 14.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Quietly Stripping a Custom CSS Class the Moment You Paste Rich Text Copied From Google Docs

πŸ“ Fix the Block Editor Quietly Stripping a Custom CSS Class the Moment You Paste Rich Text Copied From Google Docs The Gutenberg block editor runs every paste of rich, formatted content through an HTML sanitizer before it turns the clipboard data into blocks, and that sanitizer only keeps attributes and class names it recognizes […]

Read More
Wordpress

WordPress: Fix a Custom Post Type’s REST Endpoint Still Returning Draft Entries to Logged-Out Visitors Because show_in_rest Skipped Its Own Capability Check

- 14.11.26 - ErcanOPAK comment on WordPress: Fix a Custom Post Type’s REST Endpoint Still Returning Draft Entries to Logged-Out Visitors Because show_in_rest Skipped Its Own Capability Check

πŸ“ Fix a Custom Post Type’s REST Endpoint Still Returning Draft Entries to Logged-Out Visitors Because show_in_rest Skipped Its Own Capability Check Registering a custom post type with show_in_rest set to true wires it into the default REST posts controller, which is supposed to apply the same status-based visibility rules as the rest of WordPress: […]

Read More
Wordpress

WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process

- 13.11.26 - ErcanOPAK comment on WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process

πŸ“ WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process WordPress puts the entire site into maintenance mode by writing a tiny .maintenance file to the site’s root directory the instant a core or plugin update begins, and removes […]

Read More
Wordpress

WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback

- 13.11.26 - ErcanOPAK comment on WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback

πŸ“ WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback register_rest_route()’s permission_callback is meant to be the single place that decides whether a request is allowed through, but a lot of hand-written endpoints add their own manual check_ajax_referer() or wp_verify_nonce() call inside the route’s main […]

Read More
Wordpress

WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set

- 12.11.26 - ErcanOPAK comment on WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set

πŸ“ WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set WordPress’s default RSS feed template pulls each post’s featured image at the moment the feed XML is generated, which normally happens on the very first request after the post […]

Read More
Wordpress

WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback

- 12.11.26 - ErcanOPAK comment on WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback

πŸ“ WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback The Classic Editor plugin restores the old TinyMCE screen site-wide, but any meta box a theme or plugin registered specifically through `register_post_meta()` with `show_in_rest` targeting the block editor’s […]

Read More
Wordpress

WordPress: Fix a Multisite Network’s Subsites All Showing the Same Uploaded Media Because the Switched Blog Context Was Never Restored After an Upload Hook Ran Against the Main Site

- 11.11.26 - ErcanOPAK comment on WordPress: Fix a Multisite Network’s Subsites All Showing the Same Uploaded Media Because the Switched Blog Context Was Never Restored After an Upload Hook Ran Against the Main Site

πŸ“ WordPress: Fix a Multisite Network’s Subsites All Showing the Same Uploaded Media Because the Switched Blog Context Was Never Restored After an Upload Hook Ran Against the Main Site WordPress Multisite shares the same PHP process and wpdb connection across every subsite in the network; switching which subsite is active for a block of […]

Read More
Wordpress

WordPress: Fix the WP REST API Returning a 403 for Every Authenticated Request From a Headless Frontend Because a Security Plugin Blocks Any Request Whose Referer Header Doesn’t Match the Site’s Own Domain

- 11.11.26 - ErcanOPAK comment on WordPress: Fix the WP REST API Returning a 403 for Every Authenticated Request From a Headless Frontend Because a Security Plugin Blocks Any Request Whose Referer Header Doesn’t Match the Site’s Own Domain

πŸ“ WordPress: Fix the WP REST API Returning a 403 for Every Authenticated Request From a Headless Frontend Because a Security Plugin Blocks Any Request Whose Referer Header Doesn’t Match the Site’s Own Domain Many WordPress security plugins add a firewall rule that rejects any request to wp-json whose Referer header doesn’t match the site’s […]

Read More
Wordpress

WordPress: Fix Visitors Getting Logged Out Mid-Session on a Multi-Server Host Because the Authentication Cookie’s Secret Keys Differ Between Servers

- 10.11.26 - ErcanOPAK comment on WordPress: Fix Visitors Getting Logged Out Mid-Session on a Multi-Server Host Because the Authentication Cookie’s Secret Keys Differ Between Servers

πŸ“ Fix Visitors Getting Logged Out Mid-Session on a Multi-Server Host Because the Authentication Cookie’s Secret Keys Differ Between Servers WordPress signs its login and authentication cookies using the AUTH_KEY, AUTH_SALT, LOGGED_IN_KEY, and related secret constants defined in wp-config.php, and a cookie is only considered valid by whichever server validates it if that server’s wp-config.php […]

Read More
Wordpress

WordPress: Fix the REST API Returning 401 for a Valid Application Password Right After a Server Migration Because the New Host’s Default Rewrite Rules Strip the Authorization Header

- 10.11.26 - ErcanOPAK comment on WordPress: Fix the REST API Returning 401 for a Valid Application Password Right After a Server Migration Because the New Host’s Default Rewrite Rules Strip the Authorization Header

πŸ“ Fix the REST API Returning 401 for a Valid Application Password Right After a Server Migration Because the New Host’s Default Rewrite Rules Strip the Authorization Header WordPress Application Passwords authenticate REST API requests via a standard HTTP Basic Authorization header, but that header has to actually survive the trip from the web server […]

Read More
Wordpress

WordPress: Fix a Custom Post Type’s Entries Disappearing From the Site After a Theme Switch Because the New Theme’s functions.php Never Re-Registers That Post Type

- 09.11.26 - ErcanOPAK comment on WordPress: Fix a Custom Post Type’s Entries Disappearing From the Site After a Theme Switch Because the New Theme’s functions.php Never Re-Registers That Post Type

πŸ“ Fix a Custom Post Type’s Entries Disappearing From the Site After a Theme Switch Because the New Theme’s functions.php Never Re-Registers That Post Type A custom post type registered with register_post_type() inside a theme’s functions.php only exists for as long as that call actually runs β€” WordPress doesn’t persist a post type’s registration anywhere; […]

Read More
Wordpress

WordPress: Fix a Multisite Subsite Serving the Main Site’s Content Because a Shared Object Cache Key Collided Across Blog IDs

- 09.11.26 - ErcanOPAK comment on WordPress: Fix a Multisite Subsite Serving the Main Site’s Content Because a Shared Object Cache Key Collided Across Blog IDs

πŸ“ Fix a Multisite Subsite Serving the Main Site’s Content Because a Shared Object Cache Key Collided Across Blog IDs A WordPress Multisite network shares one persistent object cache backend β€” Redis or Memcached, typically β€” across every subsite, and WordPress is built to prefix every cache key it writes with the current blog’s ID […]

Read More
Wordpress

WordPress: Fix the Media Library Silently Re-Compressing Every Re-Uploaded PNG Because the Big Image Size Threshold Scales Anything Over 2560 Pixels on Upload

- 08.11.26 - ErcanOPAK comment on WordPress: Fix the Media Library Silently Re-Compressing Every Re-Uploaded PNG Because the Big Image Size Threshold Scales Anything Over 2560 Pixels on Upload

πŸ“ WordPress: Fix the Media Library Silently Re-Compressing Every Re-Uploaded PNG Because the Big Image Size Threshold Scales Anything Over 2560 Pixels on Upload Since WordPress 5.3, any image wider or taller than a configurable β€œbig image size threshold” β€” 2560 pixels by default β€” gets automatically scaled down on upload and inserted into posts […]

Read More
Wordpress

WordPress: Fix the Block Editor’s ‘Attempt To Decode’ Validation Error on Save Because a Manually Edited Shortcode Inside a Classic Block Produced Mismatched HTML Comments

- 08.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor’s ‘Attempt To Decode’ Validation Error on Save Because a Manually Edited Shortcode Inside a Classic Block Produced Mismatched HTML Comments

πŸ“ WordPress: Fix the Block Editor’s ‘Attempt To Decode’ Validation Error on Save Because a Manually Edited Shortcode Inside a Classic Block Produced Mismatched HTML Comments Every block the Block Editor saves is wrapped in HTML comment delimiters β€” <!– wp:paragraph –> … <!– /wp:paragraph –> β€” and on load it validates that the saved […]

Read More
Wordpress

WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize

- 07.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize

πŸ“ WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize Adding a custom CSS class to a block through the Advanced panel stores it as part of that block’s HTML attributes inside post_content, but many security and SEO plugins run saved […]

Read More
Wordpress

WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One

- 07.11.26 - ErcanOPAK comment on WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One

πŸ“ WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One The WordPress block editor autosaves a local revision of a post every short interval while it’s open, and if the same post is also left open and forgotten in an earlier […]

Read More
Page 1 of 13
1 2 3 4 5 6 … 13 Next Β»

Posts pagination

1 2 3 … 13 Next »
November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,068)
  • Get the User Name and Domain Name from an Email Address in SQL (990)
  • How to add default value for Entity Framework migrations for DateTime and Bool (986)
  • Get the First and Last Word from a String or Sentence in SQL (865)
  • How to select distinct rows in a datatable in C# (859)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (661)
  • Add Constraint to SQL Table to ensure email contains @ (619)
  • Average of all values in a column that are not zero in SQL (576)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (553)
  • Find numbers with more than two decimal places in SQL (481)

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ HΔ±zΔ± Δ°zleyici Windows UygulamasΔ± v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store
  • WordPress: Fix a Navigation Block Losing Submenu Items After Sync
  • Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers
  • C#: Fix a UTF-8 String Literal Behaving Differently in a Switch
  • Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object
  • The AI Prompt That Turns a Crash Dump Into a Short Repro Script

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,068)
  • Get the User Name and Domain Name from an Email Address in SQL (990)
  • How to add default value for Entity Framework migrations for DateTime and Bool (986)
  • Get the First and Last Word from a String or Sentence in SQL (865)
  • How to select distinct rows in a datatable in C# (859)

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ HΔ±zΔ± Δ°zleyici Windows UygulamasΔ± v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com