Join

Hide Actions From My Account Listing Cards

Don't want to mess with code snippets? Request for this to be a feature of MyListing Pro.

Instructions

  1. Create a new JS code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

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;
}