Tell us what you are trying to do?
Display sorting indicator in table by default always, instead only when hovering over the text in 1st row
Is there any documentation that you are following? Did not find related documentation
Is there a similar example that we can see?
What is the link to your site? hidden link
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Hema,
Thank you for getting in touch.
Actually to do this you will perhaps need to use the bootstrap data tables.
hidden link
Please try setting up your table like the example and it should allow you to have this option.
Thanks,
Shane
Thanks shane for the quick response !
Can you please elaborate, how I can get the bootstrap data tables as a part of the view loop wizard?
is there a plugin to install this option?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Hema,
Currently you are displaying your view as a table.
All you need to do is to replace the classes of the table with the one in the link that i've provided.
As well as adding the Javascript to the view.
The section below the table gives an example of how the data table is built. All you need to do is to replicate this structure in Views .
However the Javascript that you will need to use is the one below.
jQuery(document).ready(function() {
jQuery('#example').DataTable();
} );
Please let me know if this clears things up for you.
Thanks,
Shane
Hi Shane -
I followed the instructions i.e. created view and added the javascript as well class of the table. see attachment - 1
I am still not getting the sorting options in the 1st row of the table. see attachment - 2
Update: all screenshots are deleted as per user request
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Hema,
Could you send me a link to where you have this setup so that I can have a look ?
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Also could you try adding this to your functions.php
function wpb_data_tables() {
wp_register_script( 'datatables', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables');
wp_register_script( 'datatables_bootstrap', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables_bootstrap');
}
add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
Thanks,
Shane
Hi Shane - Are you looking for admin permission to access the defined view?
Hi Shane - I updated the functions.php with the code you shared. I am still not getting the sorting options - although I am getting the show no. of rows and search within table option (see attachment)
Update: all screenshots are deleted as per user request
Fyi - My originally request was to somehow have the "wpv-sorting-indicator" enforced by default
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Hema,
Could you send me a link to the page that you are testing this on ?
Also if possible could you provide admin access so that I can log in to see what is perhaps missing?
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
However what you can do is to just use this css to ensure that the arrows are always showing.
.wpv-sorting-indicator{
display: inline;
}
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Hema,
Could you provide the credentials once more ?
Also I tried them previously and they dont seem to work.
Could you check on this and let me know.
Thanks,
Shane