Viewing 30 results - 391 through 420 (of 7,495 total)
  • Author
    Search Results
  • Yaphoon
    Participant

    Hi there,
    i tried the wonderful theme and want to copy to the new official site.
    but today when i start the job, i cannot find the enfold theme. only show a theme.

    i searched in google. it is said need delete scandir function in php.ini
    but i find my php.ini has no scandir function

    hope you can help

    Wang

    #1419512
    nTECHgrate
    Participant

    Hello Enfold Team,

    I am using the Partner/Logo Element and would like to maintain the scrolling effect I have on desktop on mobile. Ideally, I would only show two logos at a time on mobile (five on desktop), but they should scroll through the 12 or so that I am going to load. I have searched through previous threads but couldn’t find anything on this.

    Can you please point me in the right direction?

    Thank you

    -James

    #1419390

    Hi,
    Thank you for your patience, I see that you are using the Code Snippets plugin so I will add the customizations in it,
    I also see that you are using the heading setting Logo left, menu below, I disabled the Shrinking Header because it didn’t give enough room for the search box. The following code will only show the search bar on screens larger that 990px when there is enough room.
    So first I added the function to add the widget to the header as a code snippet:

    add_action( 'ava_main_header', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( 'header' );
    }

    Then the custom header widget with a search widget:
    Enfold_Support_3328.jpeg
    then I added this code to place the widget after the logo in the header:

    function header_widget_placement() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
      (function($){
        var width = $(window).width();
        if ((width >= 990)) {
       $('#header_main .widget').detach().insertBefore('.av-logo-container .inner-container #menu-item-shop');
        } else {}
      })(jQuery);
    });
     </script>
      <?php
    }
    add_action('wp_footer', 'header_widget_placement', 99);

    then this css to style and order the header elements:

    @media only screen and (max-width: 989px) {
    	#header_main > .widget {
    	display: none;
    }
    }	
    @media only screen and (min-width: 990px) {
    .av-logo-container .inner-container {
    	display: flex;
        flex-direction: row-reverse;
    }
    .av-logo-container .inner-container .widget {
    	display: flex;
        order: 3;
        flex-basis: 65%;
    }
    #header_main > .widget {
    	display: none;
    }  
    .av-logo-container .inner-container .widget #searchform {
    	 width: 100%;
    }
    .av-logo-container .inner-container .widget #searchform .ajax_search_response {
    	background-color: #fff;
        z-index: 3;
    }
    .av-logo-container .inner-container #menu-item-shop {
    	display: flex;
        order: 2;
    }
    }
    

    This is the final result:
    Enfold_Support_3330.jpeg

    Best regards,
    Mike

    Hi,
    To move your account & search menu items next to the cart icon:
    Enfold_Support_3313.jpeg
    this is only needed for screens larger than 990px, because on mobile it’s already next to the burger menu:
    Enfold_Support_3315.jpeg
    Add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    @media only screen and (min-width: 990px) { 
    .account-menu {
        position: absolute;
        z-index: 3;
        height: 46px;
        right: 0;
        width: 150px;
        line-height: 46px;
        text-decoration: none;
        text-align: center;
        top: 38%;
        margin: -23px 0 0 0;
    }
    .account-menu .cart_dropdown {
    	top: 85%;
    }
    .account-menu #menu-item-wc-account-icon {
    	display: inline-block;
        height: 46px;
        width: 46px;
        float: left;
    }
    .account-menu #menu-item-search {
    	display: inline-block;
        height: 46px;
        width: 46px;
        float: left;
    }
    .account-menu .menu-item-account-icon a {
    	line-height: 46px !important;
    	width: 46px;
        height: 46px !important;
        display: inline-block;
    }
    .account-menu #menu-item-search a {
    	line-height: 46px !important;
    	width: 46px;
        height: 46px !important;
        display: inline-block;
    }
    }

    Then add this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function move_account_search_nexto_cart() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
    	var width = $(window).width();
    	if ((width >= 990)) {
     $(".menu-item.cart_dropdown ").wrapAll("<span class=account-menu></span>");
     $('#avia-menu #menu-item-wc-account-icon').detach().insertBefore('.account-menu .cart_dropdown');
     $('#avia-menu #menu-item-search').detach().insertBefore('.account-menu .cart_dropdown');
    	} else {}
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'move_account_search_nexto_cart', 99);

    this is the expected results:
    Enfold_Support_3317.jpeg

    Best regards,
    Mike

    #1419369

    Yes I will look at SearchWP functionality next. For now, ideally, I would want the desktop/tablet users to see the open/static search bar where I specified, responsive for different screen sizes in that range, and not shown at all for mobile users since, as you mentioned, there is no room. I do not want it below the menu bar really.

    I have tried the Header Widget Area code, it does not seem to function as intended, at least not on our site. Please advise how I can achieve what I am after within Enfold theme. I’d prefer to stick with you all vs using some other them. Thanks again.

    #1419361

    Hi,
    Thanks for the login, if you plan on using the WPSearch perhap you should use it’s shortcode so it will have the correct functionality, I see that you have not set it up yet.
    Enfold_Support_3298.jpeg
    To add the search bar in the header you will need to add a Header Widget Area like you linked to above, but in that case there is not enough room there on mobile devices, are you sure you don’t want to add it under the menu so there is more room and east for people to use?

    Best regards,
    Mike

    #1419354

    Hi,
    Thank you for your patience and the password to your site but I don’t see a user name, please include.
    I see the [avia_search] shortcode in your topbar, it looks like you have not added the code to the end of your child theme functions.php file in Appearance ▸ Editor: add_shortcode('avia_search', 'get_search_form'); or if you did the symbols may be converted, please ensure to copy the code from the forum and not an email notification so the symbols are not converted. You said that you are using SearchWP, did you add the code for it to be the search for your site? And doesn’t it have it’s own shortcode, this page explains how to adjust the SearchWP shortcode for the options you want, you should end up with something like this: [searchwp_search_form engine="default" var="searchvar" button_text="Find Results"] (this code may not work on your site, follow the instructions)
    Your asking for a Amazon search bar, have you thought about adding a larger one like in our Knowledge Base Demo below your menu? We have a search bar element:
    Enfold_Support_3290.jpeg
    that will allow you to adjust the style better it you want a big search bar like on Amazon.

    Best regards,
    Mike

    #1419194

    No that does not seem to work at all. I put the shortcode in a custom link Navigation Label field with no URL. Put PHP in a functions snippet. Your CSS doesn’t seem to change anything. Please advise how I get your search bar to the left of the cart icon and centered in the logo/cart bar area vertically. I had been trying with the info at https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area but that does not seem quite right either, and I think some of the code is copied/pasted incorrectly possibly. Thanks.

    #1419113

    Hi,

    Thank you for the info.

    Please follow this documentation to create a custom shortcode for the default search bar.

    // https://kriesi.at/documentation/enfold/search/#search-bar-shortcode

    You can then use that [avia_search] shortcode in the Navigation Label field of the new menu item beside the “SHOP & ORDER NOW” menu item. The menu items can be edited in the Appearance > Menus panel.

    To adjust the size, position and appearance of the search bar, please use this css code.

    #top #header #s {
        width: 100%;
        position: relative;
        padding: 11px 47px 11px 5px;
        z-index: 1;
        margin: 0;
        box-shadow: none;
        border-color: red;
        background-color: blue;
        color: green;
    }
    
    ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
      color: green;
      opacity: 1; 
    }
    
    :-ms-input-placeholder { /* Internet Explorer 10-11 */
      color: green;
    }
    
    ::-ms-input-placeholder { /* Microsoft Edge */
      color: green;
    }

    Adjust the values as necessary.

    Best regards,
    Ismael

    #1418988

    Hi,

    Thank you for the update.

    You can enable the search icon back in Enfold > Main Menu > General panel, toggle the Append Search Icon To Main Menu option. You can also add the search field in the header as widget. Please check the documentation below for more info.

    // https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area

    Best regards,
    Ismael

    #1418986

    How did I disable the search bar in the header? In Enfold Child > Header, I don’t see anything in any of the 3 tabs where I can turn it back on. . . would that fix the issue without additional css code?

    #1418983

    Hey gatehealing,

    Thank you for the inquiry.

    1) Summary: Legible Font Sizes (THREE issues)

    1) Font Size 11px – It seems to be referring to the base or default font size for all text elements. This css rule is overridden by the custom font sizes that can be set in the Enfold > General Styling > Typography panel.

    2-3) Font Size 11px .pagination span, .pagination a – You can adjust the size of the pagination with this css code.

    #top .pagination .current, #top .pagination a, #top .fullsize .template-blog .pagination a {
        height: 50px;
        width: 50px;
        line-height: 50px;
        border-radius: 100px;
        margin-right: 5px;
        font-size: 1em;
    }
    
    #top .pagination .pagination-meta {
        float: right;
        line-height: 35px;
        font-size: 1em;
    }

    2) Summary: Tap Target Sizing (FIVE issues)

    1) Element Label Search – Looks like you’ve disabled the search bar in the header but if you want to adjust the size of the label, try to use this css code.

    #top .av_minimal_header #s {
        font-size: 1.2em;
    }

    ———————————————–
    2-5) Element Label span.blog-categories > a – The other 4 refers to the post categories, which can be adjusted using this css code.

    .html_elegant-blog #top .post-entry .minor-meta {
        font-size: 1em;
    }

    Best regards,
    Ismael

    #1418953
    gatehealing
    Participant

    ***note: the codes below are displaying weird, so the tool I used to identify these issues is https://www.seoptimer.com/gatehealing.com#uimobile . . . go down to Usability issues and expand those sections to see the tables that outline these issues***
    regarding: https://gatehealing.com/

    I have 2 types of usability issues:
    1) 3 Font Usability issues, and
    2) 5 Tap Target Sizes

    I cannot find the css file in the Theme editor to fix these issues:

    1) Summary: Legible Font Sizes (THREE issues)
    There is some text on your page that is small and may not be legible enough for particular users.
    We recommend reviewing all text on your page in different devices to ensure that it is of appropriate size.

    1) Font Size
    11px

    Text Block
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video

    Style Location
    https://gatehealing.com/wp-content/themes/enfold/css/base.css?ver=5.6.6
    ———————————————–
    2) Font Size
    11px

    Text Block
    .pagination span, .pagination a

    Style Location
    https://gatehealing.com/wp-content/themes/enfold/css/layout.css?ver=5.6.6
    ———————————————–
    3) Font Size
    11px

    Text Block
    .pagination .current

    Style Location
    https://gatehealing.com/wp-content/themes/enfold/css/layout.css?ver=5.6.6
    -_—_____—–_______—–______—–_______—–______—–______
    2) Summary: Tap Target Sizing (FIVE issues)
    Some of the links or buttons on your page may be too small for a user to easily tap on a touchscreen.
    Consider making these tap targets larger to provide a better user experience.

    1) Element Label
    Search

    CSS Selector
    nav.main_menu > div.avia-menu > ul#avia-menu > li#menu-item-search

    HTML Block
    <li id=”menu-item-search” class=”noMobile menu-item menu-item-search-dropdown menu-item-avia-special” role=”menuitem”>
    ———————————————–
    2) Element Label
    EVERYDAY LIFE

    CSS Selector
    div.slide-content > header.entry-content-header > span.blog-categories > a

    HTML Block

    ———————————————–
    3) Element Label
    FAMILY AND PARENTING

    CSS Selector
    div.slide-content > header.entry-content-header > span.blog-categories > a

    HTML Block

    ———————————————–
    4) Element Label
    EVERYDAY LIFE

    CSS Selector
    div.slide-content > header.entry-content-header > span.blog-categories > a

    HTML Block

    ———————————————–
    5) Element Label
    FAMILY AND PARENTING

    CSS Selector
    div.slide-content > header.entry-content-header > span.blog-categories > a

    HTML Block

    —–_____——______—–_____——_____——_____—–______—–_____

    • This topic was modified 2 years, 6 months ago by gatehealing.
    #1418804
    Illingco
    Participant

    Hello. Can you please give me the steps and code (PHP, CSS) to achieve this in the most current iteration of Enfold? I would like to put it next to SHOP & ORDER NOW to it’s left. Thanks!

    #1418685

    Hi,
    I checked the IT site, In your custom footer page the CGA button has the preview link, it looks like you pasted the link this way, when I search your IT site there is no page conditions-generales-daffaires for which the preview link is for.
    Enfold_Support_3237.jpeg
    To correct this either create a conditions-generales-daffaires page, or select a different page and add the correct link to the button.
    I checked your original site and the button is a preview link:
    Enfold_Support_3239.jpeg
    but you do have a conditions-generales-daffaires page, so I assume that all of your sites have the preview link, please adjust each one.

    Best regards,
    Mike

    #1418620

    Hi,
    Try using the search function in the Dev Tools and search for rev_slider_ so no matter what the number is you will find it.
    When you open the Dev Tools (F12 on Windows) click in the middle of the code to ensure you are searching that panel and use the keyboard Ctrl+F (Windows) and paste (Ctrl+V Windows) into the find field and hit Enter:
    Enfold_Support_3219.jpeg
    the text will be found and highlighted for you. Please note that you will hit the Enter key twice because you want the second one the first one is the wrapper rev_slider_9_1_wrapper and not correct for Yigit’s css.
    See if this helps you find it.

    Best regards,
    Mike

    #1418342
    bbarasa
    Participant

    I don’t think this is just a problem with Enfold but maybe you can help me fix it.
    Sometime in the past few months or year (?) neither of the browsers (Firefox, Safari) on my iphone 6 will open hamburger menus on seemingly any site including the new Enfold site I just made. I thought maybe it’s because the iOS is so old (iphone 6 can only go up to version 12.5.7). But in searching on this problem it turns out a zillion people are having this problem on very new iphones with much later iOS..
    On my new Enfold site, when I touch the hamburger menu the screen in that corner blinks but the menu doesn’t open.
    jeffersonbaroque.org
    I noticed that after I touch the hamburger, the address line changes from the address above to
    jeffersonbaroque.org/# as if the code is directing the browser to an anchor on the same page. But my menu items are separate pages from the home page.
    On other sites where the hamburger menu also doesn’t work (most of them), the # doesn’t appear in the address after touching the menu.
    I did a soft reset of the phone and I cleared the cache in both browsers. Nothing changed.
    In trying to find help by searching the web, I turned up this:
    https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
    and this:
    https://stackoverflow.com/questions/54236221/responsive-hamburger-menu-not-working-on-mobile-safari/54290816#54290816
    but I am not a programmer so it all means nothing to me.
    Has anyone else had this problem?

    #1418023

    In reply to: Productpage

    Sorry for my late respons.

    1. Image size Herfstcursus is corrected now, thanks a lot!

    2. About the search function, both your suggestion as Ismaels did not seem to work (or I entered it the wrong way or at the wrong place.

    When I add Ismael CSS:

    .post-type-archive .woocommerce-no-products-found {
    display: none;

    something is deleted from the search function, but this CSS code also effects the layout of the page.

    I tried entering you suggestion in my Quick CSS in the Enfold General Styling:

    function custom_pre_get_posts_query( $q ) {
    $tax_query = (array) $q->get( ‘tax_query’ );
    $tax_query[] = array(
    ‘taxonomy’ => ‘product_cat’,
    ‘field’ => ‘slug’,
    ‘terms’ => array( ‘cursus’ ), // Don’t display products in the clothing category on the shop page.
    ‘operator’ => ‘NOT IN’
    );
    $q->set( ‘tax_query’, $tax_query );
    }
    add_action( ‘woocommerce_product_query’, ‘custom_pre_get_posts_query’ );

    But that did not do anything.

    Can you help me out? I am not a programmer, just a user. So please guide me as detailed as possible.

    Thanks, Iris

    #1418000

    or Mike …. maybe it is first needed to include the CPT to search – as you have done it here: https://kriesi.at/support/topic/seiten-aus-der-enfold-suche-ausschliesen/#post-1396760

    #1417912

    Hey sammybotz,
    Try enabling SEO Support ▸ Search Engine Optimization Support ▸ Preprocessing Shortcodes In Header ▸ allow to preprocess shortcodes
    with this enabled Yoast can read the shortcode and find the images:
    Enfold_Support_3117.jpeg

    Best regards,
    Mike

    #1417898

    Hey gatehealing,
    Unfortunately you can not seamlessly covert Enfold elements into Elementor elements, these are two different page builders.
    Unfortunately the Yoast plugin is limited when reading the Enfold pages, try enabling SEO Support ▸ Search Engine Optimization Support ▸ Preprocessing Shortcodes In Header ▸ allow to preprocess shortcodes.

    Best regards,
    Mike

    Hi elenapoliti,

    I have created a new test page based on the link you gave (link in private content), I also duplicated the search filter and pointed it to the new page.
    I added this CSS Code to adjust the style (in Enfold > General Styling > Quick CSS):

    #top #search-filter-results-4746 hr,
    #top #search-filter-results-4746 > div:not(.pagination) p {
        display: none;
    }
    
    #top #search-filter-results-4746 > div:not(.pagination) {
        width: 50%;
        float: left;
        box-sizing: border-box;
        background-color: white;
        border: 0.5px solid #ececec;
        display: flex;
        flex-direction: column-reverse;
        min-height: 470px;
    }
    
    #top #search-filter-results-4746 > div:not(.pagination) h2 {
        background-color: black;
        color: white;
        font-family: 'neutratext-book', Helvetica, Arial, sans-serif!important;
        font-size: 18px !important;
        margin: 0;
        padding: 20px;
        text-transform: none;
        min-height: 80px;
    }
    
    #top #search-filter-results-4746 div:not(.pagination) p:has(img) {
        display: block;
    }
    
    #top #search-filter-results-4746 > hr:nth-last-child(3) {
        display: block;
        margin-bottom: 20px;
    }
    
    #top #search-filter-results-4746 > .pagination {
        padding-bottom: 20px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    
    #top #search-filter-results-4746 > .pagination a {
        float: none;
        width: auto;
        padding: 0 20px;
        font-size: 14px;
    }

    Let us know if this works.

    Best regards,
    Nikko

    #1417717
    zimbo
    Participant

    I’ve created a new site based on the Hotel template. The link is for the test or dev site, which is what I’m experimenting on.

    Because of the ‘normal’ main menu length, I need to increase the width at which the burger menu and responsive mode kicks in. I’ve done this on other Enfold sites but my code from those sites is not working on this new site, I guess because Hotel’s header is different.

    If you look at the site you can see that I’m nearly there… but I just can’t figure out the right CSS needed to get the transition at 1150px to seamlessly match up with the template’s 990px switch point, i.e. for 1150px to 990px to look exactly like 990px and below. The Header Custom Height is 250px.

    I think I need to include this to shrink the header

    .responsive.html_mobile_menu_tablet #top #wrap_all .av-logo-container {
        height: 90px;
        line-height: 90px;}

    but then I can’t get the burger menu and search icon to move up into the header, nor increase the size of the icon to match 990px.

    Can you help please? Here’s the code, based on previous efforts:

    @media only screen and (max-width: 1150px) and (min-width: 990px) {
    .html_header_top.html_bottom_nav_header #header_main_alternate {
        display: none;}
    .responsive #top #wrap_all .av_mobile_menu_tablet .main_menu {
        top: 0;
        left: auto;
        right: 0;
        display: block;}
    #menu-item-search { display: block!important; }
    .responsive.html_mobile_menu_tablet .av-burger-menu-main {
    	display: block!important; }}
    #1417274

    In reply to: 404 and others

    Hey Gianluca,
    Thank you for your patience, the “search-no-results” is not a 404 page so it can’t redirect to your custom 404 page.
    For your chart titles, try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #top #wrap_all .all_colors .avia-content-slider-element-container h3.slide-entry-title {
    	color: #fff;
    	text-align: center;
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    Hi,
    I have numbered these three questions to identify them.
    1: glad that you like the idea to create new sites for the languages like guidedtour/it, guidedtour/fr, guidedtour/en, etc

    2: it is possible to automatically redirect based on language, I would recommend trying to find a plugin for this so it will be easy to manage, but it can also be do with the .htaccess file. More research would need to be done to find the solution. But I would still plan on adding a language selector to your header so all of the sites are linked together.

    3: I see that your site is slow there is no difference between sub-directories or sub-domains. One way to improve your site is to use the LiteSpeed caching in your cPanel, try using this plugin to activate it LSCache for WordPress, and then remove the plugins you are not going to use, sure as WPML Multilingual CMS, & Loco Translate, & JetPack etc.
    Your images can be compressed, I tested one on tinyjpg.com and it could be 82% smaller
    Enfold_Support_3061.jpeg
    Try using the TinyPNG plugin to make your images smaller.

    I recommend first getting your site to run faster before cloning it to create your other sites, try these suggestions and if you need further help please open a new thread so this one will stay on the topic of cloning the main site to create the other sites. Once your site is working well then let us know in this thread and we can make your clones.

    Best regards,
    Mike

    This reply has been marked as private.
    #1417166
    madisonstudios1
    Participant

    I have seen an article or two that show up in searches on adding tiktok to the social profiles in enfold but they don’t work and use tumblr as the logo instead of tiktok.
    Can you help direct me to an article that works or send me instructions please??
    Thank you,
    Chris

    #1417165

    Topic: Search by authors

    in forum Enfold
    limesolutions
    Participant

    Hi, do you know if there is a way to include author names in the enfold search result?

    Thank you very much

    Hi elenapoliti,

    What was the version of Enfold that the Search & Filter plugin was working?

    Best regards,
    Nikko

    wusatiuk
    Participant

    I am trying to exclude posts (woocommerce products) which have a specific category (id=340) from the ‘avia_ajax_search’ popup.
    have copied the function if(!function_exists(‘avia_ajax_search’))

    from /enfold/functions-enfold.php to /enfold-child/functions.php
    Is this correct, or do i need a seperate /enfold-child/functions-enfold.php

    
    if(!function_exists('avia_ajax_search'))
    {
    	//now hook into wordpress ajax function to catch any ajax requests
    	add_action( 'wp_ajax_avia_ajax_search', 'avia_ajax_search' );
    	add_action( 'wp_ajax_nopriv_avia_ajax_search', 'avia_ajax_search' );
    
    	function avia_ajax_search()
    	{
    	    global $avia_config;
    		
            $exclude_category_id = 340; // Replace with the actual category ID
    
    	    unset($_REQUEST['action']);
    	    if(empty($_REQUEST['s'])) $_REQUEST['s'] = array_shift(array_values($_REQUEST));
    		if(empty($_REQUEST['s'])) die();
    
    	    $defaults = array('numberposts' => 5, 'post_type' => 'any', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false, 'results_hide_fields' => '');
    
    	    $_REQUEST['s'] = apply_filters( 'get_search_query', $_REQUEST['s']);
    
    	    $search_parameters 	= array_merge($defaults, $_REQUEST);
    
    	    if ( $search_parameters['results_hide_fields'] !== '' ) {
                $search_parameters['results_hide_fields'] = explode(',', $_REQUEST['results_hide_fields']);
            }
            else {
                $search_parameters['results_hide_fields'] = array();
            }
    
            $search_query 		= apply_filters('avf_ajax_search_query', http_build_query($search_parameters));
    	    $query_function     = apply_filters('avf_ajax_search_function', 'get_posts', $search_query, $search_parameters, $defaults);
    	    $posts		= (($query_function == 'get_posts') || !function_exists($query_function))  ? get_posts($search_query) : $query_function($search_query, $search_parameters, $defaults);
    	
    	    $search_messages = array(
    	            'no_criteria_matched' => __("Sorry, no posts matched your criteria", 'avia_framework'),
    	            'another_search_term' => __("Please try another search term", 'avia_framework'),
    	            'time_format'         => get_option('date_format'),
    	            'all_results_query'   => http_build_query($_REQUEST),
    	            'all_results_link'    => home_url('?' . http_build_query($_REQUEST)),
    	            'view_all_results'    => __('View all results','avia_framework')
                );
    		
    	    $search_messages = apply_filters('avf_ajax_search_messages', $search_messages, $search_query);
    		
    	    if(empty($posts))
    	    {
    	        $output  = "<span class='av_ajax_search_entry ajax_not_found'>";
    	        $output .= "<span class='av_ajax_search_image ".av_icon_string('info')."'>";
    	        $output .= "</span>";
    	        $output .= "<span class='av_ajax_search_content'>";
    	        $output .= "    <span class='av_ajax_search_title'>";
                	$output .= $search_messages['no_criteria_matched'];
    	        $output .= "    </span>";
    	        $output .= "    <span class='ajax_search_excerpt'>";
                	$output .= $search_messages['another_search_term'];
    	        $output .= "    </span>";
    	        $output .= "</span>";
    	        $output .= "</span>";
    	        echo $output;
    	        die();
    	    }
    
    	    //if we got posts resort them by post type
    	    $output = "";
    	    $sorted = array();
    	    $post_type_obj = array();
    	    foreach($posts as $post)
    	    {
    	        $sorted[$post->post_type][] = $post;
    	        if(empty($post_type_obj[$post->post_type]))
    	        {
    	            $post_type_obj[$post->post_type] = get_post_type_object($post->post_type);
    	        }
    	    }
    
    	    //now we got everything we need to preapre the output
    	    foreach($sorted as $key => $post_type)
    	    {
    
    	        // check if post titles are in the hidden fields list
    	        if ( ! in_array('post_titles', $search_parameters['results_hide_fields'] ) )
    	        {
                    if(isset($post_type_obj[$key]->labels->name))
                    {
                        $label = apply_filters('avf_ajax_search_label_names', $post_type_obj[$key]->labels->name);
                        $output .= "<h4>".$label."</h4>";
                    }
                    else
                    {
                        $output .= "<hr />";
                    }
                }
    
    	        foreach($post_type as $post) {
    
    	            $image = "";
                    $extra_class = "";
    
                    // Get the categories for the post
               		$post_categories = wp_get_post_categories($post->ID);
    
               		// Check if the excluded category is in the post categories
    	            if (!in_array($exclude_category_id, $post_categories)) {
    
    	                // check if image is in the hidden fields list
    	                if (!in_array('image', $search_parameters['results_hide_fields']))
    	                {
    	                    $image = get_the_post_thumbnail($post->ID, 'thumbnail');
    	                    $extra_class = $image ? "with_image" : "";
    	                    $post_type = $image ? "" : get_post_format($post->ID) != "" ? get_post_format($post->ID) : "standard";
    	                    $iconfont = $image ? "" : av_icon_string($post_type);
    
    	                }
    
    		            $excerpt     = "";
    
    	                // check if post meta fields are in the hidden fields list
    	                if ( ! in_array('meta', $search_parameters['results_hide_fields'] ) )
    	                {
    	                    if(!empty($post->post_excerpt))
    	                    {
    	                        $excerpt =  apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","...", true, '', true) );
    	                    }
    	                    else
    	                    {
    	                        $excerpt = apply_filters( 'avf_ajax_search_no_excerpt', get_the_time( $search_messages['time_format'], $post->ID ), $post );
    	                    }
    	                }
    
    		            $link = apply_filters('av_custom_url', get_permalink($post->ID), $post);
    
    		            $output .= "<a class ='av_ajax_search_entry {$extra_class}' href='".$link."'>";
    
    		            if ($image !== "" || $iconfont) {
    	                    $output .= "<span class='av_ajax_search_image' {$iconfont}>";
    	                    $output .= $image;
    	                    $output .= "</span>";
    	                }
    		            $output .= "<span class='av_ajax_search_content'>";
    		            $output .= "    <span class='av_ajax_search_title'>";
    		            $output .=      get_the_title($post->ID);
    		            $output .= "    </span>";
    		            if ($excerpt !== '') {
    	                    $output .= "    <span class='ajax_search_excerpt'>";
    	                    $output .=      $excerpt;
    	                    $output .= "    </span>";
    	                }
    	          	}
    	            $output .= "</span>";
    	            $output .= "</a>";
    	        }
    	    }
    
    	    $output .= "<a class='av_ajax_search_entry av_ajax_search_entry_view_all' href='".$search_messages['all_results_link']."'>".$search_messages['view_all_results']."</a>";
    
    	    echo $output;
    	    die();
    	}
    }
    
Viewing 30 results - 391 through 420 (of 7,495 total)