-
AuthorPosts
-
January 26, 2018 at 7:21 am #903219
Hi there Enfold team!
Is it possible to add a “read more” link below the excerpt, as well as remove the blog date below the blog title?
Like this page for example https://crackerjackmarketing.com/?s=brand+voice
Looking forward to your response.
Thank you!
- This topic was modified 6 years, 10 months ago by Archie.
January 29, 2018 at 7:14 pm #904369Hey hackoffseries,
Create a search.php file inside your Child Theme and move the search template.
Then you can run any modifications you want, also move the read more on top! :)Thank you
Best regards,
BasilisMarch 12, 2018 at 3:50 pm #925562Hi Basilis!
Thank you for your response. I have added the search.php file inside the child theme forlder.
Unfortunately I have no idea how to remove the blog date and add a read more link below the excerpt. Is this something you can assist me with?
Thank you so much!
March 13, 2018 at 10:04 pm #926276Hi,
I tried to edit the search.php with AceIDE and I couldnt edit it
https://crackerjackmarketing.com/wp-admin/admin.php?page=aceidetried to open search.php file.
Best regards,
BasilisMarch 15, 2018 at 4:22 pm #927451Hi Basilis!
Thank you for your response. I tried to use AceIDE as well to open the theme files on both the main Enfold theme and Child theme but couldn’t get it to work either.
However, I can open the files using the editor via the appearance section.
Any idea what’s going on?
You guys are awesome! Thank you!
March 15, 2018 at 9:55 pm #927751Hi,
Can you please provide me FTP details?
AceIDE helps not to have something brake as it debugs also, so it would be more helpful for me to review with that.Best regards,
BasilisMarch 20, 2018 at 1:01 pm #929805Hi Basilis!
I cloned the website in a separate subdomain. Login details and FTP details are attached.
Thank you!
- This reply was modified 6 years, 8 months ago by Archie.
March 21, 2018 at 9:13 pm #930854Hi,
Can you please take a look and let us know how does it look? I have added a link.
Best regards,
BasilisMarch 22, 2018 at 9:39 am #931105Hi Basilis!
Thank you for your response!
I don’t see any link in your response, can you please double check?
I did a search and noticed nothing has changed, am I missing anything?
https://cjmdemo.archiealibasa.com/?s=visuals
Looking forward to your response. Thanks!
March 23, 2018 at 8:16 am #931802Hi,
Please use the following css code to remove the meta info or date.
.search .post-meta-infos { display: none; }
To add the “read more” text, please edit the includes > loop-search.php file. Look for this code around line 89.
$excerpt = trim(get_the_excerpt()); if(!empty($excerpt)) { the_excerpt(); } else { $excerpt = strip_shortcodes( get_the_content() ); $excerpt = apply_filters('the_excerpt', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); echo $excerpt; }
Replace it with the following code.
$excerpt = strip_shortcodes( get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow"></span>') ); $excerpt = apply_filters('the_excerpt', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); echo $excerpt;
Best regards,
IsmaelSeptember 21, 2018 at 3:11 am #1012580Hello, Apart form the above which was v helpful, how can I also prevent certain pages from appearing in any ajax search or any search results. So they are omitted. Thanks
September 22, 2018 at 2:37 pm #1013067Hi,
It’s not possible to exclude certain pages/posts from the page by default. If you want to enhance the search algorithm (and exclude certain entries) you can install a plugin like Relevanssi ( https://de.wordpress.org/plugins/relevanssi/ ). Then add this code to your child theme:
add_filter('avf_ajax_search_function', 'avia_init_relevanssi', 10, 4); function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults) { $function_name = 'avia_relevanssi_search'; return $function_name; } function avia_relevanssi_search($search_query, $search_parameters, $defaults) { global $query; $tempquery = $query; if(empty($tempquery)) $tempquery = new WP_Query(); $tempquery->query_vars = $search_parameters; relevanssi_do_query($tempquery); $posts = $tempquery->posts; return $posts; }
to use Relavanssi for the ajax search too.
Best regards,
PeterJanuary 20, 2021 at 4:07 pm #1274092I`ve added the relevanssi plugin. But it only searches through posts and not my pages. Does that have something to do with the code you wrote there?
e.g If they search for a name, I want it to fint the contact under Kontakt -> Medarbeidere.January 21, 2021 at 4:54 am #1274279Hi,
e.g If they search for a name, I want it to fint the contact under Kontakt -> Medarbeidere.
The search starts to look for keyword relevance in the post or page title before doing search in the post content, so posts that actually contains that name or keyword will go into the results first. Searching for a specific name from a particular page content may not work as intended. You may need to re-index the search table and keywords, and adjust Minimum word length value from the default 3 characters to a longer one for a more refined search.
You could also try the SearchWP plugin. Please check the following documentation for more info.
// https://kriesi.at/documentation/enfold/search/#use-searchwp-instead-of-the-standard-search
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.