Generated by All in One SEO Pro v4.9.10, this is an llms.txt file, used by LLMs to index the site. # Mircian WordPress developer ## Posts - [What I use to recover Mac OS X space](https://mircian.com/recover-mac-os-x-space/) - One solution to free lost Mac OS X space by emptying the temporary files folder. - [Add to cart in WooCommerce with PHP or JavaScript](https://mircian.com/add-to-cart-woocommerce-php-javascript/) - Often when building your WooCommerce store you run into having to add to cart in unfamiliar ways. This may happen when you have a custom offer page, for example. Or you might just want to avoid having a regular, long, checkout funnel. Some stores just don't need all the options a regular store does and, - [Bulk copy-paste post meta ( custom fields )](https://mircian.com/bulk-copy-paste-post-meta-custom-fields/) - Easily copy paste all of the custom fields of a WordPress post or page using this ready-made plugin. Copying Advanced Custom Fields data was never easier. - [Privately test & configure a WooCommerce payment gateway](https://mircian.com/test-woocommerce-payment-gateway/) - Given its importance, adding a new payment method to a live WooCommerce website can be a troublesome task for a developer. In this article I’m going to describe what a payment gateway is, how you can use it and most importantly how to enable a new gateway in production, safely. Our main concern is testing - [Transform Gravity Forms sections into an accordion with jQuery](https://mircian.com/transform-gravity-forms-sections-accordion/) - Easily transform Gravity Forms sections into an accordion with jQuery without making changes to the form structure. Contains code sample with explanations - [Extend wp-admin search to use custom fields](https://mircian.com/wp-admin-search-custom-fields/) - Learn how to extend the wp-admin search to include specific custom fields. Snippet and possible use cases available. - [WordPress TinyMCE button for shortcode](https://mircian.com/wordpress-tinymce-button-for-shortcode/) - Add a custom button to the WordPress TinyMCE editor & a form to get the right options for generating a shortcode. Example plugin included - [Adding custom commissions to WC Vendors](https://mircian.com/adding-custom-commissions-to-wc-vendors/) - See how you could give vendors more or less with custom commissions based on client's behaviour. Use cases + code examples included. - [Copy & Print quick setup for websites with examples](https://mircian.com/copy-print-quick-setup-websites-examples/) - Learn how to add copy and print functionalities to your website with some quick examples using two small JavaScript plugins. - [Gravity Forms entries quick view](https://mircian.com/gravity-forms-entries-quick-view/) - Gravity Forms is a great plugin many WordPress websites use. I've used it many client projects in the past and I've always missed a feature! If you are a OS X user you are surely familiar with the "quick view" action - pressing space after selecting an item in Finder. I find this almost instinctive - [WooCommerce variation data in SearchWP results](https://mircian.com/woocommerce-variation-data-searchwp/) - Learn how to tell SearchWP to index custom variation data for your WooCommerce products in two easy steps. Code snippet available. - [WordPress media uploader custom filename](https://mircian.com/wordpress-media-uploader-custom-filename/) - In the past months, I've been working on a plugin which creates a custom screen in the WordPress admin. It's a custom functionality entirely but I've tried using as much WordPress functions to keep the right feel in the interface. One of the forms in this page has an image uploader which uses wp.media. I - [Extending WooCommerce admin product search to use custom fields](https://mircian.com/extending-woocommerce-admin-product-search/) - Use your custom meta for searching in the WooCommerce products admin. Snippet included. - [Adding a custom element to the Enfold Avia Builder](https://mircian.com/adding-enfold-custom-element-avia-builder/) - A guide to adding a custom element to the Enfold Builder in order to keep updates and make new features easy to use. Tips included. - [Save form state with localStorage](https://mircian.com/save-form-state-localstorage/) - If you haven't used JavaScript's "localStorage" before - now's the time to at least look at it. It allows for some really simple data storage - in a way similar to cookies but much easier ( in my opinion ) to work with. So adding an item to it is as simple as: localStorage.setItem('checkbox-name', 'checked'); - [Sync 2 WordPress websites using REST API custom endpoints](https://mircian.com/sync-2-wordpress-rest-api-custom-endpoints/) - See how you can use WP REST API custom endpoints to quickly and safely sync data between two WordPress websites. Code samples included. - [Column-count might mess up Google Maps](https://mircian.com/column-count-might-mess-google-maps/) - I've recently struggled with what seems like a stupid issue, but I thought sharing it couldn't hurt. I was working on a website with 2 columns created from CSS - you know, the "column-count" property. So I was using an element which inherited the style mentioned above which I overwrote using column-count: 1; But for - [AWS S3 preview private and encrypted files with PHP](https://mircian.com/aws-s3-preview-files-with-php/) - Recently I had to develop a WordPress plugin that is used to manage files stored on Amazon AWS S3. Due to the nature of the files which contain sensible information they are stored as private and using the AES256 ServerSideEncryption. In order to serve the files to authorized users an AJAX call is used to - [Youtube embed preview image](https://mircian.com/youtube-embed-preview-image/) - Let's take the following situation: you have lots of YouTube embeds on a page and the page is loading extremely slow ( sometimes not loading at all! ) - what can be done? Fortunately I had to fix this exact problem for a client recently and here's the approach I used. Instead of adding the - [Allow WordPress multi-site in sub-directories for existing websites](https://mircian.com/allow-wordpress-multi-site-in-sub-directories-for-existing-websites/) - When trying to enable the WordPress multi-site you might get the following message in the setup: "Because your install is not new, the sites in your WordPress network must use sub-domains. The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links." What this means is that - [WordPress website running Avada very slow when saving posts](https://mircian.com/wordpress-website-slow-saving-posts/) - If you are running ThemeFuse's extremely popular template Avada and the website is very slow when saving/publishing posts this may help. - [Using WordPress with a database in the cloud](https://mircian.com/using-wordpress-database-cloud/) - Looking for a way to speed up a WordPress website with a very large database? One solution might be to use an external database in the cloud. - [Attempting to speed up WooCommerce Subscriptions admin](https://mircian.com/attempting-speed-woocommerce-subscriptions-admin/) - If you use WooCommerce along with their WooCommerce Subscriptions plugin you will probably notice the site becomes slow after a number of subscribers. As I wrote in a previous article, there are some tricks that may make it faster. In this article I will present some code which might help with speeding up some pages - [Changing pseudo-elements style with JavaScript](https://mircian.com/changing-pseudo-elements-style-javascript/) - An easy solution to styling pseudo-elements using the style attribute of their parents from JavaScript. Includes code examples. - [Gravity Forms disabled inputs that submit correctly](https://mircian.com/gravity-forms-disabled-inputs/) - If you looked for how to make a Gravity Forms field disabled/read-only you probably found the official article from their documentation. They suggest using a piece of JavaScript added to the "gform_pre_render" action, it looks like this: add_filter('gform_pre_render_1', 'add_readonly_script'); function add_readonly_script($form){ ?> - [Common WordPress caveats](https://mircian.com/common-wordpress-caveats/) - This is an article which I will edit in the future with other common WordPress caveats so feel free to send suggestions. Child_of vs parent in get_terms Although this makes sense immediately after you read the documentation I ran into this issue. When getting custom taxonomy terms with the "get_terms" function you can use as - [WooCommerce subscriptions speed up from external plugin](https://mircian.com/woocommerce-subscriptions-speed-plugin/) - If your WooCommerce subscriptions powered website is running slow in admin or front-end this is a simple trick to speed it up. - [WordPress admin check if content changed using Heartbeat](https://mircian.com/wordpress-admin-update-heartbeat/) - Update WordPress admin data by hooking into the Heartbeat API and find out how you can change its behavior using either PHP or JavaScript. - [Updating WordPress password without logging out](https://mircian.com/updating-wordpress-password-without-logging-out/) - I recently created a plugin that forces users to update their passwords. WordPress forces users to re-authenticate, find out how to prevent that here. - [Adding a custom table to the WordPress database](https://mircian.com/adding-custom-table-wordpress-db/) - Often when developing a plugin you need a custom database table - find out what caveats to avoid and how to do it clean with sample code. - [WooCommerce Ajax add to cart custom redirect](https://mircian.com/woocommerce-ajax-add-cart-custom-redirect/) - If you want to redirect to a custom url after adding a product to cart you can achieve that pretty easily if you don't have the Ajax functionality enabled. An example of that can be seen here. What if you use Ajax Using Ajax that's a little bit harder to achieve but you can do - [Hooking into WooCommerce's checkout JS events](https://mircian.com/hooking-woocommerces-js-events/) - Manipulate checkout data on WooCommerce checkout page using jQuery triggerHandler and ajax. - [Adding Youtube video to Instant Articles for WP plugin](https://mircian.com/adding-youtube-video-instant-articles-wordpress-plugin/) - Properly adding a custom video to the WordPress Facebook instant articles plugin without including it in the post content. ## Pages - [Cookie Policy](https://mircian.com/cookie-policy/) - This page provides comprehensive information about how we use cookies on our website to enhance your browsing experience, improve website performance, and deliver personalized content. Cookies are small text files that are stored on your device when you visit our site. They help us understand how visitors interact with our website, allowing us to offer - [Contact](https://mircian.com/contact/) - You can send me a message using the form below. - [No Access](https://mircian.com/no-access/) ## Downloads - [Bulk Post Meta copy-paste](https://mircian.com/download/400/?tmstv=1784150813) - [Gravity Forms Quick view](https://mircian.com/download/257/?tmstv=1784150813) ## Categories - [code](https://mircian.com/category/code/) - [wordpress](https://mircian.com/category/wordpress/) - [woocommerce](https://mircian.com/category/woocommerce/) - [jQuery](https://mircian.com/category/jquery/) - [osx](https://mircian.com/category/osx/) ## Tags - [facebook](https://mircian.com/tag/facebook/) - [WC Vendors](https://mircian.com/tag/wc-vendors/)