Skip to content

Instantly share code, notes, and snippets.

@ashour
ashour / style.css
Last active January 15, 2019 15:42
Companion code for PhraseApp article - Basic WordPress Theme Files
/*!
* Theme Name: Handmade's Tale
* Description: Custom theme for Handmade's Tale website
* Version: 1.0.0
* Author: Mohammad Ashour
* Author URI: http://www.ashour.ca
*
* License: MIT
* License URI: http://opensource.org/licenses/mit-license.php
*/
@ashour
ashour / index.php
Last active January 16, 2019 10:45
<?php get_template_part('header'); ?>
<main role="main" aria-label="Content">
<!-- section -->
<section>
<!-- Content will go here -->
</section>
<!-- /section -->
@ashour
ashour / footer.php
Last active January 22, 2019 11:45
@ashour
ashour / loop.php
Last active February 6, 2019 14:38
WordPress theme loop partial - for PhraseApp blog article
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post thumbnail -->
<?php if (has_post_thumbnail()) : ?>
<a
href="<?php the_permalink(); ?>"
title="<?php the_title_attribute(); ?>"
@ashour
ashour / footer.php
Created February 11, 2019 09:57
Code snippet for a PhraseApp blog article
@ashour
ashour / index.php
Created February 11, 2019 10:42
Code snippet for PhraseApp blog article
<?php printf(
_n('%d post', '%d posts', hmt_published_post_count(), 'handmadestale'),
hmt_published_post_count()
); ?>
@ashour
ashour / handmadestale.pot
Created February 11, 2019 11:05
Code snippet for PhraseApp blog article
#: index.php:12
#, php-format
msgid "%d post"
msgid_plural "%d posts"
msgstr[0] ""
msgstr[1] ""
@ashour
ashour / arabic.po
Created February 11, 2019 11:07
Code snippet for PhraseApp blog article
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100 >= 3 "
"&& n%100<=10 ? 3 : n%100 >= 11 && n%100<=99 ? 4 : 5;\n"
<span class="date">
<time
datetime="<?php the_time('Y-m-d'); ?> <?php the_time('H:i'); ?>"
>
<?php the_date(); ?>
<?php the_time(); ?>
</time>
</span>
<?php
// Place A in our UI
echo _x('Menu', 'Hamburger icon for mobile devices', 'handmadestale');
?>
<?php
// Place B in our UI
_ex('Menu', 'Footer menu header', 'handmadestale');
?>