Custom WordPress Theme and PHP Helpers: joshuatz-wp-theme

  • report
    Disclaimer
    Click for Disclaimer
    This Project is over a year old (first published about 5 years ago). As such, please keep in mind that some of the information may no longer be accurate, best practice, or a reflection of how I would approach the same thing today.
  • infoFull Project Details
    info_outlineClick for Full Project Details
    Date Posted:
    Jul. 01, 2019
    Last Updated:
    Jul. 01, 2019
  • classTags
    classClick for Tags

Source Code:

You can find the full theme here: https://github.com/joshuatz/joshuatz-wp-theme

NOTE: This repo serves mainly as a host for deployments and to showcase my theme building abilities. I’m not planning on releasing this theme into the WordPress theme directory, as I really only built it with myself in mind, and continue to constantly tweak it to suit my own personal needs.

Details:

I’ve been meaning to post this for a while now; this custom WordPress theme has actually been in use for a while now, for over half a year. Originally I built this site on the Blogger platform (Google’s point-and-click blog platform), then moved to static HTML  files, then to some simple PHP, and finally to WordPress, where I built and implemented a custom theme that would allow me to do whatever I like with the site.

Although WordPress is not necessarily liked by all developers, and I understand some of their frustrations, I enjoy the flexibility that the platform allows. For example, I’ve built a lot of custom code into my theme that tries to help SEO by keeping low quality posts from being indexed; if my code detects that a post is a placeholder (less than x number of characters) or  a “virtual” post that immediately redirects, it will set a flag to stop Google and other search engines from indexing it. Another feature I implemented that I really like is automatic disclaimers based on date; if a post was created longer than [x] number of years ago, my code will automatically add a disclaimer at the top notifying users that the post content might be out of date.

I’ve also created a “helpers” PHP class, that abstracts a lot of code to solve annoyances and peculiarities with WP into helpful methods. For example, a single function to get the age of a post. You can find that file, helpers.php, here.

Leave a Reply

Your email address will not be published.