-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* Title: Post Meta | ||
* Slug: wdsbt/post-meta | ||
* Categories: content | ||
* Block Types: custom/post-meta | ||
* | ||
* @package wdsbt | ||
*/ | ||
|
||
// Check if modified date is same as current date. | ||
$wds_post_date = get_the_date( 'U' ) !== get_the_modified_date( 'U' ) ? '<!-- wp:paragraph --><p>Posted On:</p><!-- /wp:paragraph --><!-- wp:post-date {"format":"M j, Y"} /--> <!-- wp:paragraph --><p>Last Updated:</p><!-- /wp:paragraph --><!-- wp:post-date {"format":"M j, Y","displayType":"modified"} /-->' : '<!-- wp:paragraph --><p>Posted On:</p><!-- /wp:paragraph --><!-- wp:post-date {"format":"M j, Y"} /-->'; | ||
|
||
?> | ||
|
||
<!-- wp:group {"metadata":{"name":"Post Meta"},"className":"post-meta","style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","flexWrap":"nowrap"}} --> | ||
<div class="wp-block-group post-meta"> | ||
<?php echo wp_kses_post( $wds_post_date ); ?> | ||
</div> | ||
<!-- /wp:group --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Title: Search Results | ||
* Slug: wdsbt/search-results | ||
* Categories: search | ||
* Template Types: search | ||
* Block Types: custom/search-results | ||
* Inserter: false | ||
* | ||
* @package wdsbt | ||
*/ | ||
|
||
?> | ||
<!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} --> | ||
<div class="wp-block-query"> | ||
<!-- wp:post-template {"layout":{"type":"default","columnCount":3}} --> | ||
<!-- wp:post-title {"isLink":true} /--> | ||
|
||
<!-- wp:pattern {"slug":"wdsbt/post-meta"} /--> | ||
|
||
<!-- wp:post-excerpt {"moreText":"Read More"} /--> | ||
|
||
<!-- wp:separator {"className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/> | ||
<!-- /wp:separator --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination --> | ||
<!-- wp:query-pagination-previous /--> | ||
<!-- wp:query-pagination-numbers /--> | ||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p>Hmmm... We didn't find anything for your search query.</p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:paragraph --> | ||
<p>Double check your search for any typos or spelling error or try a different search term.</p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --> | ||
</div> | ||
<!-- /wp:query --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters