Category: Code

  • Video: WordPress template hierarchy

    Earlier today I had some time to make a quick video. I have written about the template hierarchy before and I’m sure there are tons of other resources available out there. This justs adds to that ever-growing-list. The reason it drives me crazy is because of that front-page.php file that I see every so often or…

  • Getting WordPress Custom Post Types in the customizer

    It’s no surprise I love a good theme. I love it even more when I get a choice of what can go where – extra cookie points if I don’t have to input that information. A while back I wrote out a post about presenting content within themes. In the course of reviewing so many…

  • Copy paste is hurting your theme

    I’ve seen quite a few themes that have been doing this thing of passing an argument to the function when they could be using a filter. I get it we all have our methods. But when there is a better practice would you rather use the better practice or a wrong one? I choose the…

  • Presenting WordPress content with themes

    Themes are a great way of displaying content from your site, but what happens when you want to display other types of content? Things like testimonials, products, group members, or even portfolio items can be a little harder if you want to display those on the front page. How can we overcome this?

  • My dealing with layouts

    The other day I got a chance to rewrite a bit of code. It was fun. It dealt with changing from an object to an associative array. It may sound super easy for some but for my mind it took a little bit to figure out the right way of creating a good way of…

  • In search of a notice API

    Yes, I’m writing about the admin notices. I know some are already up to their ears with that and I’m on that boat. The admin area is – and should be – for the user. Any notices that appear need to be informational. Not a nag. With that being said, I know there are some…

  • Adding, removing fonts from a theme

    by

    in

    One request I often see in the forums is how to add, remove, and change fonts in themes. There are quite a few ways of going about it but ultimately depends on how the theme is not only using but loading the fonts. Core themes use a standard practice of creating an array, returning a…

  • WordPress underscore template

    The last few posts I’ve mentioned diving into creating an underscore theme. There is now one core ticket I’ve been keeping an eye on and will continue to do so until it is resolved. Since the last post I did install the REST API plugin so this now means I am one step closer to…

  • Working with paginate_links

    It is no secret that I try to advocate the use of core functions when possible. The idea of maintaining less code is a great one for any developer. It’s the old set it and forget mentality. What I do see a lot of is the use of my_theme_pagination that uses get_pagenum_link in order to get…

  • Another template hierarchy post

    Theme development does have a learning curve. There are hooks, filters, core features, and core functionalities that you can learn to leverage. The customizer, custom backgrounds, widgetized areas, and the template hierarchy are a few things to learn about.