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 Custom Fields Disappearing From the Editor Sidebar After Switching a Post’s Template Because the New Template Doesn’t Register the Same Meta Box Location

- 29.10.26 - ErcanOPAK comment on WordPress: Fix Custom Fields Disappearing From the Editor Sidebar After Switching a Post’s Template Because the New Template Doesn’t Register the Same Meta Box Location

πŸ“ Fix Custom Fields Disappearing From the Editor Sidebar After Switching a Post’s Template Because the New Template Doesn’t Register the Same Meta Box Location Custom field groups registered through add_meta_box or a plugin like ACF can carry location rules tied to a specific page template. Switching a post’s template in Page Attributes un-matches those […]

Read More
Wordpress

WordPress: Fix the Media Library Showing Duplicate Entries for One Image After a Bulk Import Because Each Size Variant Got Indexed as Its Own Attachment

- 29.10.26 - ErcanOPAK comment on WordPress: Fix the Media Library Showing Duplicate Entries for One Image After a Bulk Import Because Each Size Variant Got Indexed as Its Own Attachment

πŸ“ Fix the Media Library Showing Duplicate Entries for One Image After a Bulk Import Because Each Size Variant Got Indexed as Its Own Attachment Some bulk importers and migration plugins loop over every file already sitting in the uploads folder – including the thumbnail, medium, large, and scaled variants WordPress generates for each original […]

Read More
Wordpress

WordPress: Fix Featured Images Disappearing From Older Posts After a Theme Switch Because the New Theme Reads a Different Image Size Key

- 29.10.26 - ErcanOPAK comment on WordPress: Fix Featured Images Disappearing From Older Posts After a Theme Switch Because the New Theme Reads a Different Image Size Key

πŸ“ Fix Featured Images Disappearing From Older Posts After a Theme Switch Because the New Theme Reads a Different Image Size Key Every theme calls the_post_thumbnail() with its own preferred registered size name, and WordPress only generates a cropped file for a given size the moment add_image_size() registers it and a post is uploaded or […]

Read More
Wordpress

WordPress: Fix the Block Editor Showing an Unsupported Block Error for a Reusable Block Imported From a Different Site’s Export File

- 29.10.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Showing an Unsupported Block Error for a Reusable Block Imported From a Different Site’s Export File

πŸ“ Fix the Block Editor Showing an Unsupported Block Error for a Reusable Block Imported From a Different Site’s Export File A reusable block’s markup carries an HTML comment naming the exact block type and, for many blocks, a JSON attributes blob tied to a plugin or theme that provided it on the original site. […]

Read More
Wordpress

WordPress: Fix a Child Theme’s Enqueued Stylesheet Loading Before the Parent Theme’s, Breaking Every Override Rule You Wrote

- 28.10.26 - ErcanOPAK comment on WordPress: Fix a Child Theme’s Enqueued Stylesheet Loading Before the Parent Theme’s, Breaking Every Override Rule You Wrote

πŸ“ Fix a Child Theme’s Enqueued Stylesheet Loading Before the Parent Theme’s, Breaking Every Override Rule You Wrote A child theme is supposed to load after its parent so that every rule it defines wins the cascade for anything with matching specificity. That ordering isn’t automatic just because the folder is a child theme – […]

Read More
Wordpress

WordPress: Fix oEmbed Previews Breaking in the Block Editor Because a Strict Content Security Policy Header Blocks the Embed Provider’s Script

- 28.10.26 - ErcanOPAK comment on WordPress: Fix oEmbed Previews Breaking in the Block Editor Because a Strict Content Security Policy Header Blocks the Embed Provider’s Script

πŸ“ Fix oEmbed Previews Breaking in the Block Editor Because a Strict Content Security Policy Header Blocks the Embed Provider’s Script Pasting a video or social post URL on its own line triggers WordPress’s oEmbed system, which fetches embed markup from the provider and renders a live preview right there in the Block Editor. That […]

Read More
Wordpress

WordPress: Fix Password Reset and Comment Notification Emails Never Arriving Because wp_mail Relies on the Server’s Local Mail Function Instead of SMTP

- 28.10.26 - ErcanOPAK comment on WordPress: Fix Password Reset and Comment Notification Emails Never Arriving Because wp_mail Relies on the Server’s Local Mail Function Instead of SMTP

πŸ“ Fix Password Reset and Comment Notification Emails Never Arriving Because wp_mail Relies on the Server’s Local Mail Function Instead of SMTP wp_mail() hands every outgoing email to PHP’s built-in mail() function by default, which in turn depends on the server actually running a working local mail transfer agent that can reach the outside world. […]

Read More
Wordpress

WordPress: Fix Every Post Returning a 404 After Changing the Permalink Structure Because the Rewrite Rules Were Never Flushed

- 28.10.26 - ErcanOPAK comment on WordPress: Fix Every Post Returning a 404 After Changing the Permalink Structure Because the Rewrite Rules Were Never Flushed

πŸ“ Fix Every Post Returning a 404 After Changing the Permalink Structure Because the Rewrite Rules Were Never Flushed The permalink structure you pick under Settings, Permalinks only describes the URL pattern WordPress wants to use – it still has to be translated into actual server-level rewrite rules (an .htaccess block on Apache, or a […]

Read More
Wordpress

WordPress: Fix a Multisite Network Where Updating the Main Site’s Theme Silently Breaks Child Sites Sharing the Same Theme Files

- 28.10.26 - ErcanOPAK comment on WordPress: Fix a Multisite Network Where Updating the Main Site’s Theme Silently Breaks Child Sites Sharing the Same Theme Files

πŸ“ Fix a Multisite Network Where Updating the Main Site’s Theme Silently Breaks Child Sites Sharing the Same Theme Files A WordPress multisite network keeps a single shared copy of each network-activated theme’s files, with every site on the network just pointing its own content and settings at those same templates – there’s no per-site […]

Read More
Wordpress

WordPress: Fix the Block Editor Reverting Custom HTML Blocks to Escaped Plain Text After Switching Between Visual and Code View

- 28.10.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Reverting Custom HTML Blocks to Escaped Plain Text After Switching Between Visual and Code View

πŸ“ Fix the Block Editor Reverting Custom HTML Blocks to Escaped Plain Text After Switching Between Visual and Code View Raw markup typed into the wrong place in the block editor doesn’t get rejected outright – it gets accepted, saved, and then quietly turned into plain, escaped text the next time the editor reparses it, […]

Read More
Wordpress

WordPress: Fix Featured Images That Show the Wrong Aspect Ratio Only on Mobile Because the Theme Defines Separate Image Sizes Per Breakpoint

- 23.10.26 - ErcanOPAK comment on WordPress: Fix Featured Images That Show the Wrong Aspect Ratio Only on Mobile Because the Theme Defines Separate Image Sizes Per Breakpoint

πŸ“ Fix Featured Images That Show the Wrong Aspect Ratio Only on Mobile Because the Theme Defines Separate Image Sizes Per Breakpoint A featured image that’s perfectly cropped on desktop can show stretched or oddly cropped on a phone even though nothing about the image or the post changed – because many themes register a […]

Read More
Wordpress

WordPress: Fix a Headless Frontend’s Preview Links Always Showing Published Content Instead of the Draft Being Previewed

- 23.10.26 - ErcanOPAK comment on WordPress: Fix a Headless Frontend’s Preview Links Always Showing Published Content Instead of the Draft Being Previewed

πŸ“ Fix a Headless Frontend’s Preview Links Always Showing Published Content Instead of the Draft Being Previewed Clicking Preview in the WordPress admin on a headless setup – where a separate frontend (Next.js, Nuxt, or similar) renders pages by calling the REST API – often just opens the live, already-published version of the page instead […]

Read More
Wordpress

WordPress: Fix Shortcodes Rendering Twice Because a Template Calls do_shortcode() Manually Inside Content WordPress Already Runs Through the_content

- 23.10.26 - ErcanOPAK comment on WordPress: Fix Shortcodes Rendering Twice Because a Template Calls do_shortcode() Manually Inside Content WordPress Already Runs Through the_content

πŸ“ Fix Shortcodes Rendering Twice Because a Template Calls do_shortcode() Manually Inside Content WordPress Already Runs Through the_content A shortcode’s output appearing exactly twice on a page – not corrupted, not malformed, just duplicated – is almost always a sign that do_shortcode() is being called manually somewhere inside the same template that also calls the_content(). […]

Read More
Wordpress

WordPress: Fix a WP_Query orderby meta_value Sort That Puts 10 Before 2 Because the Field Was Never Cast to meta_value_num

- 23.10.26 - ErcanOPAK comment on WordPress: Fix a WP_Query orderby meta_value Sort That Puts 10 Before 2 Because the Field Was Never Cast to meta_value_num

πŸ“ Fix a WP_Query orderby meta_value Sort That Puts 10 Before 2 Because the Field Was Never Cast to meta_value_num Sorting a custom query by a numeric meta field and getting 1, 10, 11, 2, 3… instead of 1, 2, 3, 10, 11 isn’t a WP_Query bug – it’s exactly what happens when you ask […]

Read More
Wordpress

WordPress: Fix a REST API Login That Works Fine in the Browser but Returns 401 From Every Mobile App Request

- 23.10.26 - ErcanOPAK comment on WordPress: Fix a REST API Login That Works Fine in the Browser but Returns 401 From Every Mobile App Request

πŸ“ Your Browser Session Is Covering for a Missing Auth Header A REST API endpoint that requires authentication can feel completely solved the moment you test it by logging into wp-admin and visiting the endpoint URL in the same browser tab – it returns data, so surely the authentication logic is correct. What that test […]

Read More
Wordpress

WordPress: Fix an SMTP Plugin Silently Failing to Send Password-Reset Emails Because the From Address Doesn’t Match the Authenticated Domain

- 23.10.26 - ErcanOPAK comment on WordPress: Fix an SMTP Plugin Silently Failing to Send Password-Reset Emails Because the From Address Doesn’t Match the Authenticated Domain

πŸ“ Your SMTP Plugin Is Authenticated – Your From Address Isn’t Installing an SMTP plugin and entering real mailbox credentials feels like it should fix WordPress’s notoriously unreliable default mail() function completely, and for most mail it does – except password-reset, new-user, and some notification emails that were hardcoded (by WordPress core or another plugin) […]

Read More
Wordpress

WordPress: Fix a Taxonomy Archive Listing Every Post Correctly While Its Own Term Count Shows Zero

- 22.10.26 - ErcanOPAK comment on WordPress: Fix a Taxonomy Archive Listing Every Post Correctly While Its Own Term Count Shows Zero

πŸ“ The Archive Page and the Term Count Are Reading Two Different Numbers A category or custom taxonomy’s archive page builds its list by running a live query for every published post tagged with that term, so it keeps showing the right posts no matter what – but the small number WordPress displays next to […]

Read More
Wordpress

WordPress: Fix a Multisite Network Activating a Plugin on the Main Site While Every Subsite Still Shows It as Inactive

- 22.10.26 - ErcanOPAK comment on WordPress: Fix a Multisite Network Activating a Plugin on the Main Site While Every Subsite Still Shows It as Inactive

πŸ“ Network-Activate Doesn’t Always Mean Every Site Got the Memo Clicking ‘Network Activate’ in the Network Admin plugin screen writes the plugin into the sitewide_plugins option that every subsite is supposed to consult, and on a freshly-provisioned network it usually does exactly that – but on a network running a persistent object cache (Redis, Memcached), […]

Read More
Wordpress

WordPress: Fix Custom Post Type Archives Returning a 404 Because has_archive Was Never Set to True

- 22.10.26 - ErcanOPAK comment on WordPress: Fix Custom Post Type Archives Returning a 404 Because has_archive Was Never Set to True

πŸ“ The Archive Page That Was Never Actually Created Registering a custom post type with register_post_type() creates single post templates and admin screens by default, but it does NOT automatically create an archive page for that type – the archive route (and the rewrite rule that makes a URL like /products/ resolve to anything at […]

Read More
Wordpress

WordPress: Fix Child Theme Template Overrides Being Silently Ignored Because the Parent Theme Uses get_template_part With a Hard-Coded Path

- 22.10.26 - ErcanOPAK comment on WordPress: Fix Child Theme Template Overrides Being Silently Ignored Because the Parent Theme Uses get_template_part With a Hard-Coded Path

πŸ“ The Override Rule That Only Works If the Parent Theme Plays Along Child theme template overriding normally works because get_template_directory() calls inside WordPress’s own template loader check the child theme’s folder before falling back to the parent’s, but that convenience only applies to the templates WordPress itself loads directly (page.php, single.php, and the like) […]

Read More
Wordpress

WordPress: Fix a Custom Excerpt Length That Silently Breaks Your Layout Because wp_trim_excerpt Cuts Off Mid-Tag

- 22.10.26 - ErcanOPAK comment on WordPress: Fix a Custom Excerpt Length That Silently Breaks Your Layout Because wp_trim_excerpt Cuts Off Mid-Tag

πŸ“ The Excerpt That Cut a Closing Tag in Half wp_trim_excerpt() (and the excerpt_length filter most themes hook to change the default 55-word cutoff) trims an auto-generated excerpt by counting words and slicing at that word boundary, but when a post’s content contains inline HTML – a bold phrase, a link, a span with a […]

Read More
Wordpress

WordPress: Fix a Synced Reusable Block That Silently Updates Every Page It’s Used On When You Only Meant to Edit One Instance

- 22.10.26 - ErcanOPAK comment on WordPress: Fix a Synced Reusable Block That Silently Updates Every Page It’s Used On When You Only Meant to Edit One Instance

πŸ“ The Block That Was Never Really Yours Alone A reusable block (now labeled a synced pattern in newer WordPress versions) is deliberately designed so every placement of it on every page or post shares one single underlying piece of content – editing the block inside any one post immediately pushes that change out to […]

Read More
Wordpress

WordPress: Fix Scheduled Posts That Silently Publish Twice Because Two Separate Cron Triggers Fire in the Same Minute

- 21.10.26 - ErcanOPAK comment on WordPress: Fix Scheduled Posts That Silently Publish Twice Because Two Separate Cron Triggers Fire in the Same Minute

πŸ“ The Post That Published Itself Twice WP-Cron isn’t a real system scheduler – every single page load on the site is what actually checks whether any due cron event is overdue and fires it, with no built-in lock against two requests landing in the same second and both deciding the same scheduled post is […]

Read More
Wordpress

WordPress: Fix the REST API Silently Dropping Custom Meta Fields Because They Were Never Registered With show_in_rest

- 21.10.26 - ErcanOPAK comment on WordPress: Fix the REST API Silently Dropping Custom Meta Fields Because They Were Never Registered With show_in_rest

πŸ“ The Custom Field the REST API Pretends Doesn’t Exist A custom field created with register_post_meta or even just saved directly through update_post_meta exists perfectly well in the wp_postmeta table and shows up fine in any direct database query or classic-editor custom fields panel, but the REST API’s post response only ever includes meta fields […]

Read More
Wordpress

WordPress: Fix a Block Editor Autosave That Silently Overwrites Your Manual Save Because Two Browser Tabs Were Left Open on the Same Post

- 21.10.26 - ErcanOPAK comment on WordPress: Fix a Block Editor Autosave That Silently Overwrites Your Manual Save Because Two Browser Tabs Were Left Open on the Same Post

πŸ“ The Draft That Overwrote Itself From Another Tab Gutenberg’s autosave runs on its own timer inside every editing session independently; if the same post is open in two browser tabs or two devices at once, each tab’s autosave fires on its own schedule with no awareness of the other, and whichever tab’s save lands […]

Read More
Wordpress

WordPress: Fix Social Share Previews That Show the Wrong Image Because Crawlers Never Trigger a Lazy-Loaded og:image

- 21.10.26 - ErcanOPAK comment on WordPress: Fix Social Share Previews That Show the Wrong Image Because Crawlers Never Trigger a Lazy-Loaded og:image

πŸ“ The Share Preview That’s Still Waiting to Scroll A theme or plugin can write a page’s og:image meta tag dynamically in JavaScript, timed to the hero image’s own lazy-load trigger – an Intersection Observer that fires once the image scrolls near the viewport – instead of outputting it directly in the server-rendered head. That […]

Read More
Wordpress

WordPress: Fix the Heartbeat API Silently Hammering Your Server With admin-ajax Requests Every 15 to 60 Seconds From Every Open Admin Tab

- 21.10.26 - ErcanOPAK comment on WordPress: Fix the Heartbeat API Silently Hammering Your Server With admin-ajax Requests Every 15 to 60 Seconds From Every Open Admin Tab

πŸ“ The Dashboard Tab You Forgot About Is Still Hammering Your Server WordPress’s built-in Heartbeat API keeps the admin dashboard’s post-lock warnings, autosave, and session checks working by quietly polling admin-ajax.php every 15 to 60 seconds for as long as a wp-admin tab stays open in a browser – including a tab someone left open […]

Read More
Wordpress

WordPress: Fix a Scheduled Event Registered With wp_schedule_event That Silently Duplicates Itself Because wp_next_scheduled Was Never Checked First

- 21.10.26 - ErcanOPAK comment on WordPress: Fix a Scheduled Event Registered With wp_schedule_event That Silently Duplicates Itself Because wp_next_scheduled Was Never Checked First

πŸ“ The Cron Job That’s Secretly Running Four Times, Not Once wp_schedule_event() doesn’t check whether the exact same event is already scheduled before adding a new one – calling it again on a plugin or theme that’s already registered that event simply adds another copy of it to the cron queue, stacking on top of […]

Read More
Wordpress

WordPress: Fix a WP REST API Response That Silently Omits a Custom Field Because It Was Never Registered With register_rest_field

- 16.10.26 - ErcanOPAK comment on WordPress: Fix a WP REST API Response That Silently Omits a Custom Field Because It Was Never Registered With register_rest_field

πŸ“ The Custom Field That’s Saved but Never Shows Up in the API A custom field saved through add_post_meta or a meta box shows up perfectly fine in the WordPress admin editor and in post_meta queries on the PHP side, but the REST API response for that post won’t include it at all unless it […]

Read More
Wordpress

WordPress: Fix a Widget Area That Vanishes From the Customizer Because a Theme Update Quietly Renamed Its register_sidebar ID

- 16.10.26 - ErcanOPAK comment on WordPress: Fix a Widget Area That Vanishes From the Customizer Because a Theme Update Quietly Renamed Its register_sidebar ID

πŸ“ The Widget Area That’s Still There, Just Under a Different Name Every widget area a theme defines is identified internally by whatever id string register_sidebar was called with, and the widgets a site owner has placed into it are stored keyed to that exact id – not to the human-readable name shown in the […]

Read More
Page 3 of 13
Β« Previous 1 2 3 4 5 6 7 8 … 13 Next Β»

Posts pagination

« Previous 1 2 3 4 5 … 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 (577)
  • 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