tweak taxonomy listings and add to front page

This commit is contained in:
Evan Mullins 2023-01-13 17:17:06 -05:00
parent ea9112b60a
commit c805b950c0
5 changed files with 77 additions and 11 deletions

View file

@ -412,13 +412,15 @@ function wasmo_update_user( $post_id ) {
'info'
);
// update last_save timestamp for this user
update_user_meta( $user_id, 'last_save', time() );
//only if not edited by an admin
if ( !current_user_can( 'administrator' ) ) {
// notify email
wasmo_send_admin_email__profile_update( $user_id, $save_count );
// update last_save timestamp for this user
update_user_meta( $user_id, 'last_save', time() );
/*
// if admin - check if welcome email has been sent.
$has_received_welcome = get_user_meta( $user_id, 'has_received_welcome', true );

View file

@ -5,7 +5,7 @@
Author: Evan Mullins
Author URI: https://circlecube.com
Template: twentynineteen
Version: 1.12.0
Version: 1.12.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wasmo

View file

@ -23,14 +23,14 @@ $term = get_term_by( 'id', $termid, 'shelf' );
<?php echo wasmo_get_icon_svg( 'shelf', 36 ); ?>
<?php echo wp_kses_post( $term->name ); ?>
</h1>
<p class="entry-description"><?php echo wp_kses_post( $term->description ); ?></p>
<h2 class="entry-description has-regular-font-size"><?php echo wp_kses_post( $term->description ); ?></h2>
<?php
// TODO:
// Add blog posts relevant to this shelf item.
// Add links relevant to the shelf item - these can be added to the term description.
?>
<hr />
<h3>Profiles with <em><?php echo wp_kses_post( $term->name ); ?></em> on their "shelf":</h3>
<h3 class="has-small-font-size">Profiles with <em><?php echo wp_kses_post( $term->name ); ?></em> on their "shelf":</h3>
</header><!-- .page-header -->
<?php
@ -44,7 +44,7 @@ $term = get_term_by( 'id', $termid, 'shelf' );
<footer class="entry-footer">
<h3>
<?php echo wasmo_get_icon_svg( 'shelf', 24, 'style="margin-top:-3px;margin-right:0;"' ); ?>
Other Shelf Items:
Mormon shelf items:
</h3>
<ul class="tags">
<?php
@ -55,11 +55,11 @@ $term = get_term_by( 'id', $termid, 'shelf' );
'order' => 'ASC'
]);
foreach ( $terms as $term ) :
if ( $termid !== $term->term_id ) :
// if ( $termid !== $term->term_id ) : // don't skip this term so the ordering doesn't shuffle
?>
<li><a class="tag" data-id="<?php echo esc_attr( $term->term_id) ?>" href="<?php echo get_term_link( $term ); ?>"><?php echo $term->name; ?></a></li>
<?php
endif;
// endif;
endforeach;
?>
</ul>

View file

@ -39,7 +39,7 @@ $term = get_term_by( 'id', $termid, 'spectrum' );
<footer class="entry-footer">
<h3>
<?php echo wasmo_get_icon_svg( 'spectrum', 24, 'style="margin-top:-3px;margin-right:0;"' ); ?>
Other Spectrums:
Mormon Spectrum:
</h3>
<ul class="tags">
<?php
@ -50,11 +50,11 @@ $term = get_term_by( 'id', $termid, 'spectrum' );
'order' => 'ASC'
]);
foreach ( $terms as $term ) :
if ( $termid !== $term->term_id ) :
// if ( $termid !== $term->term_id ) :
?>
<li><a class="tag" data-id="<?php echo esc_attr( $term->term_id) ?>" href="<?php echo get_term_link( $term ); ?>"><?php echo $term->name; ?></a></li>
<?php
endif;
// endif;
endforeach;
?>
</ul>

View file

@ -0,0 +1,64 @@
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Nineteen
* @since Twenty Nineteen 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( ! twentynineteen_can_show_post_thumbnail() ) : ?>
<header class="entry-header">
<?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
</header>
<?php endif; ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentynineteen' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php
// List taxonomies on home page
if ( is_front_page() ) {
get_template_part( 'template-parts/content/content', 'taxonomies' );
}
?>
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Post title. Only visible to screen readers. */
__( 'Edit <span class="screen-reader-text">%s</span>', 'twentynineteen' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'<span class="edit-link">' . twentynineteen_get_icon_svg( 'edit', 16 ),
'</span>'
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->