Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 3 KB

File metadata and controls

46 lines (31 loc) · 3 KB

Creating Compatible Themes

Tainacan plugin offers tools to manage your digital repository, but in the end, publishing it online is one of the most important features to be desired. To avoid reinventing the wheel, all the work of having navigation menus, home pages, etc is handled by WordPress with its ecosystem of CMS features, plugins and of course, themes.

Themes are the default way that WordPress offers for tweaking the appearance of your website. They can show different layouts, font, and colors, but beyond that, they can offer customizations of different sorts.

Considering that, the development of the plugin was made in sync with the production of an "official theme", planned to attend the majority of use cases, which is the Tainacan Interface. Nevertheless, if you are a developer and have an interest on adapting your theme to support some Tainacan features, you are free to do it by using the strategies that are described on this section.

Exemples of an Items List on custom themes.

To give you a taste of what is possible, check out this file with three simple lines added to a child-theme of WordPress famous TwentyNineteen theme:

/** /tainacan/archive-items.php
 *  Custom implementation of Tainacan collection items list
 */
<?php get_header(); ?>
    <?php tainacan_the_faceted_search(); ?>
<?php get_footer(); ?>

With that minimal update, the items list goes from a standard blog-posts-like list to a full faceted search items list:

Twenty Nineteen child theme adapted to Tainacan items list.

We have a sample child theme made to take care of this small adjustment, that you can download here:

In order to use it, you must rename the content in it's files according to your parent theme. For example, to make the child-theme of WordPress TwentyNineteen aforementioned, you would:

  1. Rename every "Some Theme" as "Twenty Nineteen";
  2. Rename every "some_theme" as "twenty_nineteen";
  3. Rename every "some-theme" as "twentynineteen";

The last one is the most important, as it should correspond to the parent theme slug;

But there is a lot more that can be done. So if you are interested on getting to know the details, here is a summary of how you can make your theme trully compatible with Tainacan: