Home › Toolset Professional Support › [Resolved] display sorting indicator in table by always (instead of only in hover mode)
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
Tagged: Views plugin
This topic contains 31 replies, has 3 voices.
Last updated by hemaK 5 years, 2 months ago.
Assisted by: Shane.
Please let me know if the above login/password works
Hi Hema,
Using the CSS alone caused the icons to be constantly shown.
Please let me know if this is ok for you.
Thanks,
Shane
Update: all screenshots are deleted as per user request
Thanks for the css. Can we can get the other solution work, since it has better display of sorting option and search within the table. Greatly appreciate your help.
Hi Hema,
Would you mind providing FTP access as well so that I can make some changes to the functions.php file as some items are missing to get the data tables to work.
Please let me know
Hi Shane - I do not have the FTP access. I am using Plesk control from A2 Hosting.
Here is complete info from astra-child theme funtions.php
---------------------
<?php
/**
* Astra Child Theme functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Astra Child
* @since 1.0.0
*/
/**
* Define Constants
*/
define( 'CHILD_THEME_ASTRA_CHILD_VERSION', '1.0.0' );
/**
* Enqueue styles
*/
function child_enqueue_styles() {
wp_enqueue_style( 'astra-child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), CHILD_THEME_ASTRA_CHILD_VERSION, 'all' );
}
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 15 );
/**
* Tablepress for sorting - info from toolset support
*/
function wpb_data_tables() {
wp_register_script( 'datatables', 'hidden link', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables');
wp_register_script( 'datatables_bootstrap', 'hidden link', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables_bootstrap');
}
add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
Hi Hema,
Add these to the functions.php as well
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'); wp_register_script( 'datatables_bootstrap_css', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css'); wp_register_script( 'datatables_bootstrap_css_2', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css_2'); } add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
Once you have modded the code to reflect this please let me know.
Thanks,
Shane
My site broke. I cannot access my site.
Hi Hema,
It seems it could be an error in the function that i provided.
You are to replace this here
/** * Tablepress for sorting - info from toolset support */ 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' );
With this
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'); wp_register_script( 'datatables_bootstrap_css', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css'); wp_register_script( 'datatables_bootstrap_css_2', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css_2'); } add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
I am unable to login. Are you able to login to wp-admin?
Hi Hema,
Yes im able to access the admin page on the backend with the credentials you provided.
Also is there any way you can provide me with access to the functions.php file?
I also tried to add the snippets to the custom code section for toolset but im getting this message here.
"Unfortunately, this snippet cannot be edited directly. Check file permissions and wp-config.php constants DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS. Alternatively, you can edit the file manually."
It would go much faster if im able to edit the files myself to debug and get this setup for you.
Thanks,
Shane
Hi Shane -
Sorry, could not respond earlier.
I tried replacing the code send in the earlier response.
--> Good news - the site was still working 🙂
--> Bad news - the sorting indicator is not there. Also, earlier it was giving the search box above the table, including no. of rows to display option that is also now not available (see attached image)
I am not sure how I can give you access to the A2 hosting site to update the functions.php?
Can we do screenshare via skype or any other option?
Below is the updated info in the functions.php file
---------
<?php
/**
* Astra Child Theme functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Astra Child
* @since 1.0.0
*/
/**
* Define Constants
*/
define( 'CHILD_THEME_ASTRA_CHILD_VERSION', '1.0.0' );
/**
* Enqueue styles
*/
function child_enqueue_styles() {
wp_enqueue_style( 'astra-child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), CHILD_THEME_ASTRA_CHILD_VERSION, 'all' );
}
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 15 );
function wpb_data_tables() {
wp_register_script( 'datatables', '<u>hidden link</u>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables');
wp_register_script( 'datatables_bootstrap', '<u>hidden link</u>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables_bootstrap');
wp_register_script( 'datatables_bootstrap_css', '<u>hidden link</u>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables_bootstrap_css');
wp_register_script( 'datatables_bootstrap_css_2', '<u>hidden link</u>', array() ); //put any dependencies (including jQuery) into the array
wp_enqueue_script('datatables_bootstrap_css_2');
}
add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
--------
Update: all screenshots are deleted as per user request
Hi Hema,
Could you add the code again to the functions.php file ?
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'); wp_register_script( 'datatables_bootstrap_css', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css'); wp_register_script( 'datatables_bootstrap_css_2', '<em><u>hidden link</u></em>', array() ); //put any dependencies (including jQuery) into the array wp_enqueue_script('datatables_bootstrap_css_2'); } add_action( 'wp_enqueue_scripts', 'wpb_data_tables' );
You need to log into our forums before copying the link as you will get <u>"hidden link"</u> link text when you try to copy any link from our thread.
From what I can see this is what happened so the dependencies are not being loaded.
Thanks,
Shane
Hi Shane - I have updated the functions.php. (see attached file).
The sorting indicator are still NOT shown. Although the search table option with no. of rows to be displayed are back again. (see attached screen shot).
Update: all screenshots are deleted as per user request
Hello, Shane is out on holiday today but will return tomorrow to continue assisting you.
Thank you Christian for the update. Appreciate it.