-
Search Results
-
Topic: Template Include
Hi Trevor,
My set-up uses .blade.php file instead of .php files. However will still render .php files too where available.
So, for now my result templates is themename/search-filter/27.php
I wondered what filters/hooks you use in S&F to load the template files? Once I find that out I can try override it so it looks to load my 27.blade.php file instead.
Here is an example where I have told Dokan to use my .blade.php file instead for its edit_template:
`
add_filter(‘dokan_get_product_edit_template’, function() {
return get_stylesheet_directory() . ‘/views/dokan/products/new-product-single.blade.php’;
});
`
Wondered if there were any equivalent filters available with S&F Pro too? Looking through the files now for template_include currently too.
Hello,
is there any way to search & filter not for a taxonomy in different posts but for the taxonomy added to a gutenberg block (in a post)?
I added several custom blocks to a post by using the plugin ACF Pro. These blocks should be filtered by a custom taxonomy (which I also added via ACF Pro).
Here is the page containing the issue: http://aibau.de/wordpress/aachener-bausachverstaendigentage-tagungsbaende-print/
Until now every Book (Coverpicture + Text(accordionstyle)) was a new post and had its own taxonomy. At the moment it is filtered by these taxonomies.
Now the latest post (at the top) has different gutenberg blocks each with its own taxonomy (the green words shown on the page). And I would like to filter these blocks.
Is there any way to do so?I hope I expressed the issue well and you can help.
Thanks and best wishes
EvaHi,
The pagination on my query is not showing at all:
<?php $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; ?>
<?php $loop = array(
‘post_type’ => ‘post’,
‘pagination’ => $paged,
‘posts_per_page’ => 8,
‘order’ => ‘DATE’,
‘ignore_sticky_posts’ => 2,);
$loop[‘search_filter_id’] = 107;
?>
<?php $query_a = new WP_Query($loop); ?>
<?php if ($query_a->have_posts()) : ?>
<div id=”nieuws” class=”container”>
<div class=”row”>
<?php while ($query_a->have_posts()) : $query_a->the_post(); ?>
<div class=”col-lg-3 col-md-6 col-sm-12″>
<div class=”card”>
“>
<div class=”card-thumb” style=”background-image: url(<?php the_post_thumbnail_url(); ?>);”>
<?php
$terms = get_the_terms($post->ID, array(‘doelgroep’));
$i = 1;
if ($terms) { ?>
<div class=”terms”>
<?php
foreach ($terms as $term) {
$term_link = get_term_link($term, array(‘doelgroep’));
if (is_wp_error($term_link))
continue;
echo $term->name;
echo ($i < count($terms)) ? “, ” : “”;
$i++;
} ?>
</div>
<?php } ?>
</div>
<div class=”card-info”>
<h3><?php the_title(); ?></h3>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<div id=”sf-pagination”>
<?php
echo paginate_links( array(
‘total’ => $query_a->max_num_pages,
‘current’ => max( 1, get_query_var( ‘paged’ ) ),
‘format’ => ‘?paged=%#%’,
‘show_all’ => false,
‘type’ => ‘plain’,
‘end_size’ => 2,
‘mid_size’ => 1,
‘prev_next’ => true,
‘prev_text’ => sprintf( ‘<i></i> %1$s’, __( ‘Newer Posts’, ‘text-domain’ ) ),
‘next_text’ => sprintf( ‘%1$s <i></i>’, __( ‘Older Posts’, ‘text-domain’ ) ),
‘add_args’ => false,
‘add_fragment’ => ”,
) );
?>
</div>
</div>
<?php wp_reset_postdata($query_a); ?>
<?php endif; ?>What is it I am doing wrong?
Console tells me this:
search-filter-build.min.js?ver=2.4.6:2 Uncaught TypeError: Cannot read property ‘split’ of undefined
at HTMLFormElement.getQueryParamFromURL (search-filter-build.min.js?ver=2.4.6:2)
at HTMLFormElement.getPagedFromURL (search-filter-build.min.js?ver=2.4.6:2)
at HTMLDivElement.<anonymous> (search-filter-build.min.js?ver=2.4.6:2)
at HTMLDocument.dispatch (jquery.min.js:3)
at HTMLDocument.r.handle (jquery.min.js:3)On this URL:
http://fietsenwerkt.convident.site/nieuws/
I have AJAX turned on.
Thanks in advance