- investing November 2, 2020 at 2:51 pm
Hello,
We have published knowledge base articles with different tags. Our team has noticed that WordPress has automatically created separate pages for each tag, where articles are displayed. We would like to create a page where all articles would be displayed the same way (http://investingterminology.org/article-tag/b/). In other words, we would like to create a page where all articles would be displayed and sorted by tag (instead of just article names sorted by category, as in knowledge base). Please let me know how it can be done.
Kind regards,
EvaJuanfra Aldasoro November 4, 2020 at 9:12 amHi Eva,
Thank you for reaching out. I hope you’re doing well.
The template you’re referring to is the one you can find in
flatbase/taxonomy-article-tag.php
. I’d suggest you try creating a new child theme and using that template as a base to use on a new page template you can create. To create page templates you can check this article: https://www.smashingmagazine.com/2015/06/wordpress-custom-page-templates/Best,
Juan.investing November 5, 2020 at 11:36 amHello Juan,
Is there any other way (plug-in, widget) to display all articles sorted by tag? Also, how we can enable live search bar on all pages? We’ve tried to insert this code to the following code but it did not work:
<!– START CUSTOM SEARCH BAR –><div id=”search-wrap” align=”center”>
<form role=”search” method=”get” id=”searchform” class=”clearfix” action=”<?php echo home_url( ‘/’ ); ?>” autocomplete=”off”>
<div class=”input”>
<label for=”faqsearchinput”><?php echo apply_filters( ‘nice_livesearch_label’, __( ”, ” ) ); ?></label>
<input type=”text” name=”s” id=”faqsearchinput” size=”80%” placeholder=”Have a question? Ask or enter a search term.” />
<input type=”submit” id=”searchsubmit” value=”Submit” />
</div>
</form>
</div><!– END CUSTOM SEARCH BAR –>
We’ve also tried this code:
<?php$nice_livesearch_enable = nice_get_option( ‘_livesearch_enable’ );
$is_home = is_front_page() || is_page_template( ‘template-home.php’ );if ( ( nice_bool( $nice_livesearch_enable ) && ( $is_home ) ) || apply_filters( ‘nice_livesearch_enable’, false ) ) : ?>
<!– #live-search –>
<section id=”live-search” <?php nice_welcome_message_class(); ?>>
<div class=”container col-full”><?php
$nice_welcome_message = get_option( ‘nice_welcome_message’ );
$nice_welcome_message_extended = get_option( ‘nice_welcome_message_extended’ );if ( ( ( $nice_welcome_message != ” ) || ( $nice_welcome_message_extended != ” ) ) && is_front_page() ) : ?>
<!– BEGIN .welcome-message –>
<section class=”welcome-message clearfix”><div class=”col-full”>
<?php if ( $nice_welcome_message != ” ) : ?>
<header>
<h2><?php echo stripslashes( htmlspecialchars_decode( nl2br( $nice_welcome_message ) ) ); ?></h2>
</header>
<?php endif ;?><?php if ( $nice_welcome_message_extended != ” ) : ?>
<p><?php echo stripslashes( htmlspecialchars_decode( nl2br( $nice_welcome_message_extended ) ) ); ?></p>
<?php endif ;?></div>
<!– END .welcome-message –>
</section>However, none of these worked. Please let me know how I could enable live search bar on all pages or at least on knowledge base page.
Kind regards,
EvaJuanfra Aldasoro November 5, 2020 at 1:36 pmHi Eva,
Thanks for the follow-up. Unfortunately there are some parts of your questions that are out of our scope of support: https://nicethemes.com/article/support-vs-customizations-2/
With regards to how to query a custom post type by taxonomy you can check this thread:https://wordpress.stackexchange.com/questions/84921/how-do-i-query-a-custom-post-type-with-a-custom-taxonomy
Regarding the search bar, you can check that the code on the header.php file does a check if “$is_home”, maybe you can try by removing that and being sure that the javascript in charge of dealing with the search functionality is included in every page.
Best,
Juan.
You must be logged in to reply to this topic.