Tag: back-end

  • Make a query variable public

    In case you are messing with custom rewrite rules in WordPress and especially creating new ones with the generate_rewrite_rules hook, you should know how to make a private (or a custom, which is by default – non-public) query variable public in order to have it working correctly in the rewrite rule. It’s actually pretty simple […]

  • Expired transients don’t get deleted on protected sites

    I found it the hard way. My database is rather small. It’s actually less than 20 Mb in total. That’s of course, if I exclude the 1.4Gb of data that I have in wp_options alone. Most of if being transients. Most of which have expired some time ago. I’ll spare you the story of how […]

  • Settings API Step by Step

    Resources on WordPress Settings API Step by Step

    Creating custom settings/options page in wordpress admin panel is an easy task if you know what you’re doing. Here is a step by step tutorial on that.  Create settings page First of all we need to create our page. We have two choices: – Create separate page To create a separate settings page we will […]

  • Redirecting all pages from the old domain to the new one

    When you switch domains for a WordPress installation, you should think of not only the how to move the site, but how to keep your content reachable by search engine hits or referrals. 301 Redirect is what is expected of you, and the easy way to do it, even if both domains are still hitting […]

  • White screen after updating plug-ins

    What if you have a very old WP site and suddenly you decide to update everything and in the middle of everything you suddenly get a white screen. The Great White Screen of Dead. No error messages are displayed and the console is empty as hell. The only thing you get in the web tool […]

  • json_no_route when querying taxonomy with WP-API

    Resources on WordPress json_no_route when querying taxonomy with WP-API

    To get a taxonomy, using WP-API, you should make a request to http://example.com/wp-json/taxonomies/category/ All is well, until you have a taxonomy with a dash(‘-‘) in its name – in my case, the taxonomy is called ‘event-categories’ – the default event taxonomy in the Events Manager plugin. So, a request to http://example.com/wp-json/taxonomies/event-categories/ responds with a “No […]

  • Get the visitor’s country by their IP

    Basically the code is something like this:   [crayon-650f8b0da82f4544622119/] So we are using the GeoPlugin API to retrieve the Country code. You can also get the full country name, state, city, continent and some other stuff. Here is a simple dump of the data returned from the site: [crayon-650f8b0da82fa241897823/] For more info and explanations and […]