Modify default WordPress pagination base URL

By default WordPress pagination slug is – /page/[page_number]. How about if we need to change this to something else? Perhaps your site is not in English, and you want pagination in your language? This is very easily controllable with pagination_base property of WP_Rewrite class. Code goes in the functions.php file… Read More »

Modify default WordPress search URL

By default WordPress search result page URL is a query parameter – ?s=[search_term]. Not a very “pretty” URL! But we can make it a nice “pretty” url with a little code snippet. Above code will make your search page url from https://careless.dev/?s=[search_term] to https://careless.dev/search/[search_term]. But /search/ is the default slug… Read More »

Show customer details on WooCommerce thank you page

If you are accepting guest orders on your WooCommerce store, after placing an order, guest users/not logged in users don’t see their details (customer details – billing/shipping addresses) on the thank you page. This can be confusing for some users, as they might be feeling comfortable seeing their billing/shipping address… Read More »

Customize WooCommerce order notes placeholder and label

By default the label of “order notes” on WooCommerce checkout page is “Order notes”, and placeholder is “Notes about your order, e.g. special notes for delivery.”. This can be updated using woocommerce_checkout_fields filter. Modify the placeholder and label as per your need, from the below code. Code goes in the… Read More »

How to disable option to deactivate plugin in WordPress

Did you ever feel the need to disable plugin deactivation option? I generally use ACF to add and show custom content for clients. Now if the client deactivate ACF plugin, this could break their site. Instead of taking this risk, we can easily disable the deactivation option for specific plugin…. Read More »