Skip to content
My ever-evolving custom WordPress theme for https://davidsword.ca/
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
partials
pluggable
Gruntfile.js
LICENSE
README.md
comments.php
footer.php
functions.php
header.php
index.php
package-lock.json
package.json
readme.txt
screenshot.png
search.php
style.css

README.md

davidsword-ca

Custom theme for https://davidsword.ca/

screenshot

Develop

grunt less compiles and minifies all /assets/src/css/*.less into /assets/css/dist/style.css. Use grunt watch during dev to fire this on any edit of a *.less file.

Pluggables

Contents of /pluggables/ extend the functionality of WordPress, they're each technically plugins that could be fully developed one day. Until then, they're standalone and portable from theme-to-theme.

Pseudo Post Formats

This theme does not use post_formats in the tradional sense. I found the added step of changing post formats easy-to-forget while creating content, and that my post formats were less about that flag and more about what type of content is in the post. There two conditions in which a post can have that will rendered in a slightly different post format. When a post has:

  • No Title it assumes a "Status" pseudo post format. This makes it so the <h1> does not render, and the wp_title and the_title are filtered with the date.
  • No Content and a Featured Image assumes a "Image" pseudo Post Format, these posts also do not have a title display on the site (as to not take away from the image, but it still does appear in wp_title()), and no content will display.

This is done to reduce steps while generating content, to minimize if statments throughout the template files, and to streamline the logic of the partials/ folder.

The following helper functions are avaliable:

  • dsca_get_pseduo_post_format()
  • dsca_is_pseduo_post_format_image()
  • dsca_is_pseduo_post_format_status()

See /pluggable/pseduo-post-format.php for more info.

You can’t perform that action at this time.