Adds post type to loop list. Stil needs adjustments and when to display them or not.
This commit is contained in:
parent
bfc1eab9f2
commit
a195beb6e5
|
@ -36,9 +36,29 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.title-area {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
h3{
|
h3{
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
}
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
background: #e6f6f8;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
a,
|
||||||
|
a:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
.text-black{
|
.text-black{
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
|
|
@ -193,7 +193,7 @@ add_action( 'admin_head', 'tainacan_customize_editor_css');
|
||||||
function tainacan_include_items_in_search_results( $query ) {
|
function tainacan_include_items_in_search_results( $query ) {
|
||||||
if ( $query->is_main_query() && $query->is_search() && ! is_admin()) {
|
if ( $query->is_main_query() && $query->is_search() && ! is_admin()) {
|
||||||
$collections_post_types = \Tainacan\Repositories\Repository::get_collections_db_identifiers();
|
$collections_post_types = \Tainacan\Repositories\Repository::get_collections_db_identifiers();
|
||||||
$query->set( 'post_type', array_merge( ['post'], $collections_post_types ) );
|
$query->set( 'post_type', array_merge( ['post', 'tainacan-collection'], $collections_post_types ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_action( 'pre_get_posts', 'tainacan_include_items_in_search_results' );
|
add_action( 'pre_get_posts', 'tainacan_include_items_in_search_results' );
|
||||||
|
|
|
@ -1687,6 +1687,9 @@ function tainacan_get_color_scheme_css( $colors ) {
|
||||||
#comments .list-comments .media .media-body .comment-edit-link {
|
#comments .list-comments .media .media-body .comment-edit-link {
|
||||||
color: {$colors['tainacan_link_color']};
|
color: {$colors['tainacan_link_color']};
|
||||||
}
|
}
|
||||||
|
.tainacan-list-post .blog-content h4 {
|
||||||
|
background-color: {$colors['tainacan_tooltip_color']} !important;
|
||||||
|
}
|
||||||
.tainacan-title-page ul li,
|
.tainacan-title-page ul li,
|
||||||
.tainacan-title-page ul li a,
|
.tainacan-title-page ul li a,
|
||||||
#menubelowHeader .menu-item a::after,
|
#menubelowHeader .menu-item a::after,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,10 @@
|
||||||
|
<?php
|
||||||
|
$post_type = get_post_type();
|
||||||
|
$post_type_object = get_post_type_object($post_type);
|
||||||
|
$post_type_label = $post_type_object->labels->singular_name;
|
||||||
|
$post_type_archive_link = get_post_type_archive_link($post_type);
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="row blog-post mb-4">
|
<div class="row blog-post mb-4">
|
||||||
<?php if ( has_post_thumbnail() ) : ?>
|
<?php if ( has_post_thumbnail() ) : ?>
|
||||||
<div class="col-xs-12 col-md-4 blog-thumbnail align-self-center text-center mb-4 mb-md-0">
|
<div class="col-xs-12 col-md-4 blog-thumbnail align-self-center text-center mb-4 mb-md-0">
|
||||||
|
@ -7,9 +14,13 @@
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="col-xs-12 blog-content <?php if ( has_post_thumbnail() ) :?>col-md-8 blog-flex<?php else : ?>col-md-12<?php endif; ?> align-self-center">
|
<div class="col-xs-12 blog-content <?php if ( has_post_thumbnail() ) :?>col-md-8 blog-flex<?php else : ?>col-md-12<?php endif; ?> align-self-center">
|
||||||
|
<div class="title-area">
|
||||||
<h3 class="mb-3">
|
<h3 class="mb-3">
|
||||||
<a href="<?php the_permalink(); ?>" class="font-weight-bold"><?php the_title(); ?></a>
|
<a href="<?php the_permalink(); ?>" class="font-weight-bold"><?php the_title(); ?></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
<h4><a href="<?php echo $post_type_archive_link ?>"><?php echo $post_type_label ?></a></h4>
|
||||||
|
</div>
|
||||||
<?php echo '<p class="text-black">' . wp_trim_words( get_the_excerpt(), 28, '...' ) . '</p>'; ?>
|
<?php echo '<p class="text-black">' . wp_trim_words( get_the_excerpt(), 28, '...' ) . '</p>'; ?>
|
||||||
<?php tainacan_meta_date_author(); ?>
|
<?php tainacan_meta_date_author(); ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue