Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

[WIP] Implement PSTT theme #38

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
832457c
merge CPT and Taxonomies
DavidCramer Apr 11, 2018
4618a9a
update ignores
DavidCramer Apr 11, 2018
183d75c
update ignores
DavidCramer Apr 11, 2018
162af58
update ignores
DavidCramer Apr 11, 2018
5fb53cb
bring in PSTT them and arrange taxonomies and CPT into ./dev
DavidCramer Apr 11, 2018
c4504d9
update ignores
DavidCramer Apr 11, 2018
57c779d
update ignores
DavidCramer Apr 11, 2018
f0d36b6
install tasks and docs
DavidCramer Apr 11, 2018
617ce4d
add dev-lib
DavidCramer Apr 11, 2018
d80ec0c
remove build files
DavidCramer Apr 11, 2018
30b4bf5
change package and domain in dev and remove replace task from gulpfile
DavidCramer Apr 11, 2018
3828eef
fix package, composer files, and PHPCS domain
DavidCramer Apr 11, 2018
de37094
travis change
DavidCramer Apr 11, 2018
6c95a5e
fix PHPCS
DavidCramer Apr 11, 2018
348782f
ignores
DavidCramer Apr 11, 2018
9427ff1
add built theme files
DavidCramer Apr 11, 2018
56ab41a
revert package.json
DavidCramer Apr 11, 2018
2a93be9
revert composer.json
DavidCramer Apr 11, 2018
7e83876
bring in develop and refactor around PSTT structures
DavidCramer Apr 17, 2018
55f0beb
Move include below others to ensure last inclusion
DavidCramer Apr 17, 2018
0346657
clean up input vars and sanitisation
DavidCramer Apr 17, 2018
95cf160
retain isset over empty to allow clearing values.
DavidCramer Apr 17, 2018
e85ff4d
remove add_empty param.
DavidCramer Apr 17, 2018
3a2d223
resolve merge conflicts
DavidCramer Apr 25, 2018
1986e6e
merge develop
DavidCramer Apr 25, 2018
b68f4f2
merge develop and retructure files
DavidCramer Apr 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ env:
- WP_VERSION=trunk WP_MULTISITE=1

install:
- npm install
- npm install github:xwp/wp-dev-lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? It seems like Travis checks are running well, and wp-dev-lib is added to devDependencies in package.json.

- export DEV_LIB_PATH=node_modules/wp-dev-lib
- source $DEV_LIB_PATH/travis.install.sh

Expand Down
60 changes: 60 additions & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package WPAMPTheme
*/

get_header(); ?>

<main id="primary" class="site-main">

<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'travel' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'travel' ); ?></p>

<?php
get_search_form();

the_widget( 'WP_Widget_Recent_Posts' );
?>

<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'travel' ); ?></h2>
<ul>
<?php
wp_list_categories(
array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
)
);
?>
</ul>
</div><!-- .widget -->

<?php

/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'travel' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );

the_widget( 'WP_Widget_Tag_Cloud' );
?>

</div><!-- .page-content -->
</section><!-- .error-404 -->

</main><!-- #primary -->

<?php
get_footer();
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ A WordPress theme showcasing canonical AMP functionality.

Custom theme based on the [AMP Start Travel Theme](https://ampstart-iframes.firebaseapp.com/templates/travel/travel.amp), developed by XWP.

## Developing
Built on [PSTT theme](https://github.com/mor10/pstt).

1. In command line, run `npm install` to install necessary node packages and dependencies.
2. In command line, run `composer install` to install necessary PHP packages and dependencies.
3. In command line, run `npm run build` to generate the theme.


Travel uses a [Gulp](https://gulpjs.com/) build process to generate and optimize the code for the theme. All development is done in the `/dev` folder and Gulp preprocesses, transpiles, and compiles the files into the root folder. The root folder files become the active theme. WordPress ignores anything in the `/dev` folder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this "Developing" section. Does this line apply to this theme? It doesn't look like there's a /dev directory.


JavaScript files are automatically linted using [ESLint](https://eslint.org/) in accordance with [WordPress Codeing Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).

PHP and CSS files are automatically linted using [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) in accordance with [WordPress Codeing Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/). To take full advantage of this setup, configure your code editor / IDE to automatically test for the WordPress Coding Standards. More details can be found at the [WordPres Coding Standards Wiki](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki).


## Installation ##

1. In your admin panel, go to Appearance > Themes and click the Add New button.
Expand All @@ -24,4 +39,4 @@ Custom theme based on the [AMP Start Travel Theme](https://ampstart-iframes.fire
## Credits ##

* Based on the [AMP Start Travel Theme](https://ampstart-iframes.firebaseapp.com/templates/travel/travel.amp)

* Built with [PSTT theme](https://github.com/mor10/pstt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should reflect the new name:

Built with the WP Rig theme

10 changes: 10 additions & 0 deletions css/comments.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*--------------------------------------------------------------
Copy link
Contributor

@kienstra kienstra Apr 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file probably won't be needed.

# Comments
--------------------------------------------------------------*/
.comment-content a {
word-wrap: break-word;
}

.bypostauthor {
display: block;
}
Loading