WordPress.org

Forums

HMS Testimonials
[resolved] Metabox IDs (8 posts)

  1. SirBlackhand
    Member
    Posted 1 year ago #

    Great plugin, but could you please add HTML IDs to the meta boxes on the testimonial editing page? I would like to remove some unused boxes such as the 5-star rating and "read more page", but currently all the meta boxes just have one class (.stuffbox or .postbox for the sidebar) and no IDs, so I am unable to remove them. This would be great so I could reduce clutter for my clients and make it a bit less confusing.

    Thanks!

    https://wordpress.org/plugins/hms-testimonials/

  2. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    This will be in the next updated. I will push it in the next couple of days.

    Here are the IDs:

    #hms-testimonials-author
    #hms-testimonials-date
    #hms-testimonials-website
    #hms-testimonials-rating
    #hms-testimonials-testimonial
    #hms-testimonials-cf-{id} or .hms-testimonials-cf
    #hms-testimonials-readmore
    #hms-testimonials-groups

    Since you can have one or more custom fields the numerical id of the custom field is added on the end of the HTML id. All custom fields also get a class of "hms-testimonials-cf".

  3. SirBlackhand
    Member
    Posted 1 year ago #

    Excellent, thank you! I will keep an eye out for the update and add the actions now so I don't forget.

  4. SirBlackhand
    Member
    Posted 1 year ago #

    Just remembered that I need the post type to remove meta boxes - what custom post type does HMS Testimonials use? I tried "testimonial" and "hms-testimonial" but they didn't seem to work. Also tried looking around in the plugin files but couldn't find any mention of you registering a custom post type. Thanks!

  5. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    This plugin doesn't use a custom post type. The updated I rolled out last night added the IDs to some boxes.

  6. SirBlackhand
    Member
    Posted 1 year ago #

    I got the update with the new IDs, but WordPress' "remove_meta_box" function requires that you specify a post type to remove meta boxes from (the parameter isn't optional). Do the testimonials not fall under any post types at all? And if so, how would you suggest I go about removing meta boxes? :)

  7. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    No they don't fall under any post types at all.

    I would suggest using CSS to hide them.

    #hms-testimonials-rating,
    #hms-testimonials-website,
    #hms-testimonials-readmore {
    display:none;
    }

  8. SirBlackhand
    Member
    Posted 1 year ago #

    Okay, thanks very much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • HMS Testimonials
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic