This snippet is useful when you want to hide particular actions (Promote, Edit, Stats, Delete, etc.) from the Listing Cards found under the /my-account/my-listings/ endpoint.
Option 1 – JavaScript
// PROMOTE
jQuery(document).ready(function($){
$('.cts-listing-action-promote').remove()
});
// EDIT
jQuery(document).ready(function($){
$('.cts-listing-action-edit').remove()
});
// STATS
jQuery(document).ready(function($){
$('.cts-listing-action-stats').remove()
});
// SWITCH PLAN
jQuery(document).ready(function($){
$('.cts-listing-action-switch').remove()
});
// DUPLICATE
jQuery(document).ready(function($){
$('.cts-listing-action-duplicate').remove()
});
// DELETE
jQuery(document).ready(function($){
$('.cts-listing-action-delete').remove()
});Option 2 – CSS
Remove the ‘Switch Plan’ Action
For this example, we remove the 4th action, as they appear in order from left to right on the Listing Cards, which applies to the ‘Switch Plan’ action.
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(4) {
display: none !important;
}Remove the ‘Switch Plan’ and ‘Duplicate’ Actions
For this example, we remove the 4th and 5th actions, as they appear in order from left to right on the Listing Cards, which applies to the ‘Switch Plan’ and ‘Duplicate’ actions.
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(4),
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(5) {
display: none !important;
}Remove the ‘Stats’, ‘Switch Plan’, and ‘Duplicate’ Actions
For this example, we remove the 4th and 5th actions, as they appear in order from left to right on the Listing Cards, which applies to the ‘Switch Plan’ and ‘Duplicate’ actions.
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(3),
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(4),
#job-manager-job-dashboard table ul.job-dashboard-actions li:nth-child(5) {
display: none !important;
}