Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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, 9 months ago by Archie.
    #904369

    Hey 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,
    Basilis

    #925562

    Hi 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!

    #926276

    Hi,

    I tried to edit the search.php with AceIDE and I couldnt edit it
    https://crackerjackmarketing.com/wp-admin/admin.php?page=aceide

    tried to open search.php file.

    Best regards,
    Basilis

    #927451

    Hi 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.

    https://prnt.sc/irlawv

    Any idea what’s going on?

    You guys are awesome! Thank you!

    #927751

    Hi,

    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,
    Basilis

    #929805

    Hi Basilis!

    I cloned the website in a separate subdomain. Login details and FTP details are attached.

    Thank you!

    • This reply was modified 6 years, 7 months ago by Archie.
    #930854

    Hi,

    Can you please take a look and let us know how does it look? I have added a link.

    Best regards,
    Basilis

    #931105

    Hi 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!

    #931802

    Hi,

    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,
    Ismael

    #1012580

    Hello, 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

    #1013067

    Hi,

    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,
    Peter

    #1274092

    I`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.

    #1274279

    Hi,

    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

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.