This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 15 posts - 16,951 through 16,965 (of 18,418 total)
  • Author
    Posts
  • in reply to: Ajax Seach Pro Question #5893
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Luckily it was not a bug, I just forgot to turn off debug mode in the plugin code πŸ™‚
    It should be all right now.

    in reply to: Suggested Keywords #5892
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    It’s kind of hard-coded, but a simple 1 line modification to the code will help.

    Open up the /wp-content/plugins/ajax-search-pro/includes/views/asp.shortcode.php via FTP and go to line 51, where you should see this:

    [code]$s_phrases = str_replace(array(‘ ,’, ‘ , ‘, ‘, ‘, ‘ ,’), ‘</a>, <a href="#">’, $style[‘frontend_suggestions_keywords’]);[/code]

    change that line to:

    [code]$s_phrases = str_replace(array(‘ ,’, ‘ , ‘, ‘, ‘, ‘ ,’), ‘</a> <a href="#">’, $style[‘frontend_suggestions_keywords’]);[/code]

    That should do the trick.

    in reply to: Many issues with Ajax Search Pro #5877
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I tried again a few times both urls, but I’m getting redirected back to the front page πŸ™

    Maybe you need my IP address for firewall exception?

    in reply to: Ajax Seach Pro Question #5876
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are very welcome πŸ™‚

    Feel free to rate the plugin if you like it on your codecanyon downloads dashboard: http://codecanyon.net/downloads

    in reply to: Ajax Seach Pro Question #5874
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I put it into the ajax search pro instance options, Theme Options -> Custom CSS field πŸ™‚

    in reply to: Problem with searching in custom post #5873
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Is the correct custom post type selected? It looks like the imported data is “publicatie” post type. You will have to select this post type on the General Options -> Sources panel. (and also on the index table options panel, if you are planning to use it)

    in reply to: Ajax Seach Pro Question #5871
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    My setup looks like it was correct, it’s working all right.

    Plus I added a few CSS rules to help you center the search field. For future reference I added the following rules:

    [code]
    div[id*=’ajaxsearchprores’] {
    margin-top: -34px !important;
    }

    div.block-html-after-header {
    padding: 10px;
    text-align: center;
    }

    .ajaxsearchpro.asp_main_container {
    display: inline-block;
    }
    [/code]

    in reply to: Searchbar in main menu #5869
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you for the kind words!

    There is unfortunately no documentation on that because it differs for each and every theme on how to do that. Without programming knowledge is almost impossible to append the search into a menu item. WordPress yet does not support putting shortcodes and other stuff to the navigation menu. (navigation menus are very tricky)

    What I did on the demo is I appended the search bar just before the menu container in the theme header.php file. I’m almost definitely sure you will have to edit your themes corresponding header file to achieve the same. There is a short article in the documentation on which shortcode do you need for that.

    Basically you need to find the template part which adds the menu into the header, then locate the menu element, and try appending the search php shortcode just before it. There is a good chance it’s still going to look weird, because most menus have very fragile styling.

    In your case I can see there is already a search bar there, and the HTML code is something like this:

    [code]<div class="container et_search_form_container et_pb_search_visible et_pb_no_animation" style="height: 84px; max-width: 838px;">
    <form role="search" method="get" class="et-search-form" action="studynet.se">
    <input type="search" class="et-search-field" placeholder="SΓΆk …" value="" name="s" title="SΓΆk efter:" style="font-size: 12px;"> </form>
    <span class="et_close_search_field"></span>
    </div>[/code]

    I would try to locate this piece of code and replace the form element with the correspoding search shortcode, like so:

    [html]<div class="container et_search_form_container et_pb_search_visible et_pb_no_animation" style="height: 84px; max-width: 838px;">
    <?php echo do_shortcode("[wpdreams_ajaxsearchpro id=1]"); ?>
    <span class="et_close_search_field"></span>
    </div>[/html]

    • This reply was modified 10 years, 9 months ago by Ernest MarcinkoErnest Marcinko. Reason: formatting fix
    in reply to: HTML W3C validation #5864
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I will definitely take a note on this request, and clean up everything I can for the next release πŸ™‚

    in reply to: Ajax Seach Pro Question #5863
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I’ve set up the index table and search configuration for you to search products via the index table. However I cannot verify if it works or not, because your frontend is not loading. The error console says that there is a name resolution problem with your CDN provider and no JS and CSS files are loaded.
    Let me know once it’s fixed and I check the configuration again πŸ™‚

    in reply to: Checklist Field Displays as Array #5847
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are welcome!

    Indeed, I made a syntax error there.

    For future reference the correct code:

    [php]
    add_filter( ‘asp_results’, ‘asp_checkbox_to_results’, 1, 1 );

    function asp_checkbox_to_results( $results ) {
    foreach ($results as $k=>$v) {
    // Get the field
    $checkboxes = get_field(‘my_checkbox_list’, $v->id);
    // Append if exists
    if( $checkboxes ){
    $checkbox_string = implode(‘, ‘, $checkboxes);
    $results[$k]->content .= " – " . $checkbox_string;
    }
    }

    return $results;
    }
    [/php]

    in reply to: Alternate word searches #5846
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    If I understand correctly, You want to replace specific words by alternatives. The only possible way right now is to add a custom filter function to modify the input text silently before it hits the database. A possible function would be:

    [php]add_filter(‘asp_search_phrase_after_cleaning’, ‘asp_alternate_words’, 1, 1);
    function asp_alternate_words( $s ) {

    // An array of the originals you want to replace
    $originals = array(
    "word1",
    "word2",
    "wordN"
    );

    /* Array of the alternatives
    * .. must be the same number as the originals
    * "word1" is replaced with "alt1"
    * "word2" is replaced with "alt2" etc..
    * */
    $alternatives = array(
    "alt1",
    "alt2",
    "altN"
    );

    return str_replace($originals, $alternatives, $s);

    }[/php]

    Put this to your themes functions.php file. As you can see from the code comments you can add as many words and replacements as you need.

    in reply to: Taxonomy auto list all the terms #5837
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure, I don’t see why not πŸ™‚

    in reply to: Taxonomy auto list all the terms #5832
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    This is only possible with a modification directly in the code. It might not work correctly, but it’s worth a try.

    Open up the wp-content/plugins/ajax-search-pro/includes/views/asp.shortcode.categories_terms.php file and go to lines 124-128, where you should see this:

    [php]$_needed_terms_full = get_terms($taxonomy, array(
    ‘orderby’ => $term_ordering[0],
    ‘order’ => $term_ordering[1],
    ‘include’ => $terms
    ));[/php]

    change that code to this:

    [php]$_needed_terms_full = get_terms($taxonomy, array(
    ‘orderby’ => $term_ordering[0],
    ‘order’ => $term_ordering[1]
    ));[/php]

    This should get all the terms for a taxonomy, if at least one term is selected from the taxonomy.

    in reply to: Problem with searching in custom post #5831
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    In case you are using the index table engine, you will have to re-generate the index table to register the imported posts.

    If not, then make sure that the imported items are in published state, the correct post types are selected, and the search cache is not enabled.

Viewing 15 posts - 16,951 through 16,965 (of 18,418 total)