Forum Replies Created

Viewing 15 replies - 1 through 15 (of 141 total)
  • Plugin Author don benjamin

    (@dondon-benjamincouk)

    The plugin layout can be controlled via css or via swapping out the template. I can’t actually access the page you’ve listed but you could try adding something like the following to your theme’s stylesheet:

    .searchform-params {
            display: flex;  
    }
    .searchform-params {
            width: 33%;
    }

    Alternatively you could modify the page template. Copy the file wp-custom-fields-search/templates/form.php into your theme in a file called (for instance) custom-search-form.php, then add a line to your themes functions.php file to use the new template, something like this should work:

    add_filter('wpcfs_form_template', function () { return __DIR__.'/custom-search-form.php';});

    Then you should be able to edit your custom-search-form.php as you need.

    • This reply was modified 1 week, 3 days ago by don benjamin.
    • This reply was modified 1 week, 3 days ago by don benjamin.
    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi Jeremy,

    The plugin can handle joined tables if records in your custom table relate to records in the wp_post table? Although this would require some custom coding to match your table. If the records are unrelated to the wp_post table though then that’s going beyond what the plugin has been designed for and it would be quite a big job to get them in.

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi @zaidzafar4,

    Sorry for the slow reply. I’ve tested with WordPress 5.5.1 and checkboxes seem to be working correctly.

    If you’re still struggling with this could you let me know a bit more about how you have the checkboxes set up. e.g. Have you manually configured the options or is it auto-generating them? What datatype have you chosen? When you say they aren’t displaying properly do you mean they look strange or that they simply aren’t there?

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi @ghp123,

    Sorry for the slow reply.

    The plugin shouldn’t really interfere with the pagination so I suspect this may be a problem with your theme or some other plugin. Can you confirm that the pagination works correctly on pages other than the search results? If it does then that would suggest that there is some kind of incompatibility with this plugin if not then it is likely a problem somewhere else.

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi @semgrup,

    Sorry I missed this when you posted it. I think the plugin should work that way already.

    Are you saying you want it to also show results who have matching “certificate” but different “No”?

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi,

    1. If you’re using a dropdown list you should be able to change the “Any” text in the field settings. In the form editor, next to the dropdown where you’ve chosen the field type (e.g. “Dropdown”) there should be a cog icon, click this and you should be able to change the “Blank prompt” (e.g. the text to show when nothing is selected.

    See this gif if the above doesn’t make sense:

    2. This is not straight forward to achieve and would require custom coding. If this is urgent I am available for hire to look into this for you. If not, I’ve added this requirement to the todo list and will release it in a future version of the plugin.

    Hope that helps,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Sorry for the slow reply. Glad you got it working.

    Please feel free to rate the plugin here https://wordpress.org/support/plugin/wp-custom-fields-search/

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi Amol,

    I’ve put together a simple plugin which I think should do what you need. It allows you to search for content in any custom field, plus a list of post fields (including title, content etc.)

    The plugin is here if you want to give it a try: https://www.don-benjamin.co.uk/files/search-everything.zip

    I haven’t included this in the main plugin as there isn’t really a nice way to do it with the current architecture, I think this should work for your purposes but it’s not really searching everything so wouldn’t work for someone with a different database setup.

    There is a significant rewrite of the plugin coming soon (when I get some time) and I will aim to cater for this requirement in the rebuild.

    If the plugin works for you, feel free to make a donation and rate the plugin here: https://wordpress.org/plugins/wp-custom-fields-search/

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi Amol,

    Sorry for the slow reply. I’ve been a little busy and haven’t had time to read through your code.

    I’ll get back to you properly tomorrow.

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi Amol,

    Sorry for the slow reply I’ve been on annual leave. It’s not possible currently to build what you need using this plugin straight out of the box. It’s a good idea though and I will add this on to the list for a future release.

    If you are confident with php you may be able to add this functionality yourself. You would need to write a new sub-class of WPCustomFieldsSearch_DataType (some examples are in the file datatypes.php) and then register your new class using the filter wp_custom_fields_search_datatypes.

    If you need this functionality urgently and would like to fund it’s development please let me know.

    Thanks,
    Don

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Just tested the previous code and realised it interacts badly with pagination.

    A better solution would be:

    
    function wpcfs_get_current_page_uri() {
        return get_pagenum_link();
    }
    add_filter('wpcfs_results_page', 'wpcfs_get_current_page_uri');
    
    Plugin Author don benjamin

    (@dondon-benjamincouk)

    I think this may be to do with the use of query_posts rather than to do with this plugin

    I’ve found this link which may help:
    https://codex.wordpress.org/Pagination#Removing_query_posts_from_the_Main_Loop

    Specifically this code for keeping the pagination when using query_posts:

    <?php 
    // query to set the posts per page to 3
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array('posts_per_page' => 3, 'paged' => $paged );
    query_posts($args); ?>
    

    Which I’d guess would still work like this:

    <?php 
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array('paged' => $paged );
    query_posts($args); ?>
    

    If that doesn’t work it’s possible this will:

    <?php 
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array('paged' => $paged, 'page'=>$paged);
    query_posts($args); ?>
    
    • This reply was modified 7 months, 3 weeks ago by don benjamin.
    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Ignore that, I’ve just found the category pages and they’re working fine so it is to do with the search results.

    Plugin Author don benjamin

    (@dondon-benjamincouk)

    Hi,

    I’m not able to reproduce this problem locally. I can set up a search locally with the same url structure as you but the pagination works correctly for me.

    The plugin doesn’t actually handle pagination itself so I think the problem may be somewhere else? Is there anywhere on your site to view a list that hasn’t been filtered by the plugin, e.g. a full listing of products or a category page or similar? If not, maybe you could set one up. Does the pagination work on those pages? If not then it’s unlikely to be a problem with this plugin.

    Thanks,
    Don

    • This reply was modified 7 months, 3 weeks ago by don benjamin.
    Plugin Author don benjamin

    (@dondon-benjamincouk)

    2. I’m not familiar with CENA fields is this related to the CENA theme? Unfortunately that’s a premium theme so I can’t test it without buying a copy.

Viewing 15 replies - 1 through 15 (of 141 total)