updated the cpt and others
This commit is contained in:
@@ -73,12 +73,24 @@ class Partnerexpo_Core_Public {
|
||||
$posts = [];
|
||||
|
||||
foreach ($query->posts as $post) {
|
||||
$terms = wp_get_post_terms($post->ID, 'taxidermy_tags', ['fields' => 'all']);
|
||||
$my_term = null;
|
||||
|
||||
foreach ($terms as $term) {
|
||||
if ($term->slug === 'tags') {
|
||||
$my_term = $term->name; // or ->term_id
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posts[] = [
|
||||
'id' => $post->ID,
|
||||
'title' => $post->post_title,
|
||||
'image' => get_the_post_thumbnail_url($post->ID),
|
||||
'excerpt' => $post->post_excerpt,
|
||||
'modif' => $post->post_modified,
|
||||
'date' => date('Y-m-d', strtotime($post->post_date)),
|
||||
'tag' => $my_term ?? null,
|
||||
'url' => get_permalink($post),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -258,6 +258,10 @@
|
||||
.pexpo-core-title {
|
||||
font-weight: 750;
|
||||
letter-spacing: .15px;
|
||||
color: var(--text);
|
||||
&:hover {
|
||||
color: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.pexpo-core-tag {
|
||||
|
||||
@@ -68,7 +68,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
style="width:100%; border-radius:10px; object-fit:cover;" />
|
||||
</div>
|
||||
<div class="pexpo-core-cardTop">
|
||||
<div class="pexpo-core-title">${escapeHtml(r.title)}</div>
|
||||
<a class="pexpo-core-title">${escapeHtml(r.title)}</a>
|
||||
</div>
|
||||
<div class="pexpo-core-desc">${escapeHtml(r.excerpt)}</div>
|
||||
<div class="pexpo-core-foot">
|
||||
@@ -96,7 +96,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
} catch (error) {
|
||||
console.error("Search failed:", error);
|
||||
masonry.innerHTML = `<div style="padding:20px; color:red;">Error loading results.</div>`;
|
||||
masonry.innerHTML = `<div style="padding:20px; color:red;">Hiba történt a keresés során.</div>`;
|
||||
} finally {
|
||||
masonry.style.opacity = "1";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user