-
-
So, I don’t know what’s happening but these massive bunch of hashtags appear.
They seem to be connected to the May We Suggest part of the search.
- I’ve tried turning off search.
- Trying both simple and creative stylings.
- Making a new search button.
Nothing affects it. What’s going on?
-
Hello,
Can you please send us some valid wp credentials in a private reply? So we can check this out.
Thanks!
-
-
Hello,
Yes, that chunk of code is present in all these files:
\folie\404.php
\folie\functions.php
\folie\search.phpYour solution is one of the possible ways. And it’s good. This is a feature added to complete the search feature, but if you have that much tags as seen in the screenshot you added, that can ruin rather than fix the search experience.
However, you do not have to completely remove it. You can just limit the number of tags to show. For this, redo the changes and then go to file functions.php and find thi section:
/** * Return HTMl of all tags with appropiate link * @since 1.0.0 */ function codeless_all_tags_html(){ $tags = get_tags(); $html = '<div class="post_tags">'; foreach ( $tags as $tag ) { $count++; $tag_link = get_tag_link( $tag->term_id ); $html .= " <a href='". esc_url($tag_link). "' title='". esc_attr( $tag->name )." Tag' class='".esc_attr( $tag->slug )."'>"; $html .= "#". esc_attr( $tag->name )."</a>"; } $html .= '</div>'; return $html; }
Edit to this:
/** * Return HTMl of all tags with appropiate link * @since 1.0.0 */ function codeless_all_tags_html(){ $tags = get_tags(array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 25, )); $html = '<div class="post_tags">'; foreach ( $tags as $tag ) { $count++; $tag_link = get_tag_link( $tag->term_id ); $html .= " <a href='". esc_url($tag_link). "' title='". esc_attr( $tag->name )." Tag' class='".esc_attr( $tag->slug )."'>"; $html .= "#". esc_attr( $tag->name )."</a>"; } $html .= '</div>'; return $html; }
The
'number' => 25,
is the number of tags to show. Change this value to your wish.Best regards!
-
You must be logged in to reply to this topic.