#Wordpress

Archive of blog posts tagged with "wordpress"

  • Simple Database Seeder for WordPress

    As someone working with WordPress development, I've found that the development life-cycle could use some improvements to make the developer experience much better. One of the things missing from the out-of-the-box experience of developing with WordPress is a way to seed a database with dummy or test content, which is extremely useful for onboarding new developers to a project, running automated tests, and for ensuring proper practices by _not_ using production data.

  • WP Transients must be used responsibly

    We ran into an interesting issue with WooCommerce at work. First, here is the subject of the support request we got from our hosting provider

  • Order Posts via "Weighted Pseudo Randomness"

    A request we are getting more often is to show a list of posts, to elevate some of those posts above others, and to show the posts in a random order. Imagine a post type called "Sponsors". Sponsors are tiered, like "Platinum", "Gold", "Silver", etc. We want the Platinum sponsors to appear before Gold, Gold before Silver, and so on. We don't want to favor one particular Platinum sponsor though, we want them to be randomized but ordered by the tier.

  • A WordPress ajax handler for custom themes

    Something I have been noodling on is a better way to handle ajax requests in my custom themes. Seems to me that a relatively complex theme ends up with a lot of add_action calls for custom ajax handlers, and this could be simplified/reduced. Every time a new endpoint is required we have to add two new add_action calls to our theme. Maybe a better approach is to write a single ajax endpoint that will route requests to the proper classes/methods?

‹ Prev
1
Next ›