{"id":17524664,"url":"https://github.com/codemonkey-jack/maera","last_synced_at":"2026-03-10T23:35:27.524Z","repository":{"id":16482669,"uuid":"19235103","full_name":"codemonkey-jack/maera","owner":"codemonkey-jack","description":"WordPress theme framework utilizing Twig + Timber","archived":false,"fork":false,"pushed_at":"2018-03-18T18:32:34.000Z","size":4658,"stargazers_count":34,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-12-20T11:26:06.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"shadowsocks/shadowsocks-android","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemonkey-jack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-28T10:32:41.000Z","updated_at":"2024-03-02T23:32:16.000Z","dependencies_parsed_at":"2022-09-24T07:20:57.077Z","dependency_job_id":null,"html_url":"https://github.com/codemonkey-jack/maera","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/codemonkey-jack/maera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonkey-jack%2Fmaera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonkey-jack%2Fmaera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonkey-jack%2Fmaera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonkey-jack%2Fmaera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemonkey-jack","download_url":"https://codeload.github.com/codemonkey-jack/maera/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonkey-jack%2Fmaera/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30362121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T14:25:06.377Z","updated_at":"2026-03-10T23:35:27.482Z","avatar_url":"https://github.com/codemonkey-jack.png","language":"PHP","readme":"Maera\n=====\n\n![Maera Logo](http://press.codes/wp-content/uploads/maera-logo.png)\n\n\n[![Code Climate](https://codeclimate.com/github/presscodes/maera/badges/gpa.svg)](https://codeclimate.com/github/presscodes/maera)\n\n**Maera** is a developer-friendly theme that allows you to quickly prototype sites and extend it with your own custom plugins.\n\n**It's a kick-ass open-minded theming framework.**\n\nIt is completely open-source, licensed under the MIT license\nIn its heart it uses the [twig templating engine](http://twig.sensiolabs.org/) and the WordPress Customizer.\n\nWith Maera we're introducing the concept of theme **shells**.  An easy way to completely customize the theme with your own markup, css, scripts and functionality to meet your own needs!\n\nMaera is a WordPress theme and as such it follows the default WordPress [template hierarchy](http://wphierarchy.com/). However, we do have some extra stuff going on under the hood that we have found make life a lot easier both for skilled developers and for novice users that may not be php developers.\n\nIn addition to the default template files that you can use if you want, we also provide a \"views\" folder that contains \"twig\" files. You can learn more about the twig language by clicking on [this link](http://twig.sensiolabs.org/).\n`twig` files have a structure and syntax a lot easier and more user-friendly than php. For example if you wanted to echo something in PHP, you would do this:\n\n```php\n\u003c?php echo $foo; ?\u003e\n```\n\nIn twig however it's a lot simpler than that:\n\n```twig\n{{ foo }}\n```\n\nYou can learn more about the syntax and naming conventions by reading the [Timber Docs](https://github.com/jarednova/timber/wiki).\n\nTo add your own templates you can create a [Child Theme](href=\"http://codex.wordpress.org/Child_Themes) and either create custom php template files like you would do on every other WordPress theme, or custom twig templates.\nThe template hierarchy of the twig files is the same as the [default WordPress templates structure](href=\"http://wphierarchy.com/), simply by replacing the `.php` suffix with `.twig`.\nYou can keep your `.twig` files in the root of your child theme, or a `/views` folder if you want to keep things a little more organized.\n\n---\n\n## Template hierarchy on the Maera theme:\n\u003ctable\u003e\n\u003cth\u003e\n\u003ctd\u003eContent Template\u003c/td\u003e\n\u003ctd\u003eSidebar Template\u003c/td\u003e\n\u003c/th\u003e\n\u003ctr\u003e\n\u003cth\u003eAuthor Archives\u003c/th\u003e\n\u003ctd\u003e\nauthor-{nicename}.twig, author-{ID}.twig, author.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCategory Archives\u003c/th\u003e\n\u003ctd\u003e\ncategory-{slug}.twig, category-{ID}.twig, category.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-category-{term_id}.twig, sidebar-category.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCustom Post Type Archives\u003c/th\u003e\n\u003ctd\u003e\narchive-{post_type}.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-archive-{post_type}.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCustom Taxonomy Archives\u003c/th\u003e\n\u003ctd\u003e\ntaxonomy-{term}.twig, taxonomy-{taxonomy}.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-term-{term_id}.twig, sidebar-taxonomy-{taxonomy}.twig, sidebar-taxonomy.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eDate Archives\u003c/th\u003e\n\u003ctd\u003e\ndate.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-date.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eTag Archives\u003c/th\u003e\n\u003ctd\u003e\ntag-{slug}.twig, tag-{ID}.twig, tag.twig, archive.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-tag-{term_id}.twig, sidebar-tag.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eSingle Post\u003c/th\u003e\n\u003ctd\u003e\nsingle-post.twig, single.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-{post-ID}.twig, sidebar-post.twig, sidebar-single.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eSingle Page\u003c/th\u003e\n\u003ctd\u003e\npage-{slug}.twig, page-{ID}.twig, page.twig, index.twig\n\u003c/td\u003e\n\u003ctd\u003e\nsidebar-{post-ID}.twig, sidebar-page.twig, sidebar-single.twig, sidebar.twig\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## The stucture of a rendered page\n\nWe divided the pages in sub-files in ordet to make them more modular.\nYou can see the twig file template parts on the below diagram:\n![Twig Template Parts](https://press.codes/wp-content/uploads/template-structure.png)\n[Get this file for a larger view](https://press.codes/wp-content/uploads/template-structure.png)\n\n## Post properties in twig files\n\n```\n{{ post.ID }}                 // ID of the post\n{{ post.post_author }}        // ID of the post author\n{{ post.post_date }}          // timestamp in local time\n{{ post.post_date_gmt }}      // timestamp in gmt time\n{{ post.post_content }}       // Full (unprocessed) body of the post\n{{ post.post_title }}         // title of the post\n{{ post.post_excerpt }}       // excerpt field of the post, caption if attachment\n{{ post.post_status }}        // post status: publish, new, pending, draft, auto-draft, future, private, inherit, trash\n{{ post.comment_status }}     // comment status: open, closed\n{{ post.ping_status }}        // ping/trackback status\n{{ post.post_password }}      // password of the post\n{{ post.post_name }}          // post slug, string to use in the URL\n{{ post.post_modified }}      // timestamp in local time\n{{ post.post_modified_gmt }}  // timestatmp in gmt time\n{{ post.post_parent }}        // id of the parent post.\n{{ post.guid }}               // global unique id of the post\n{{ post.menu_order }}         // menu order\n{{ post.post_type }}          // type of post: post, page, attachment, or custom string\n{{ post.post_mime_type }}     // mime type for attachment posts\n{{ post.comment_count }}      // number of comments\n{{ post.terms }}              // taxonomy terms\n{{ post.custom_field }}       // whatever custom field you've added (in the post_meta table)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonkey-jack%2Fmaera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemonkey-jack%2Fmaera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonkey-jack%2Fmaera/lists"}