Is there a way to remove the total_sales
custom field when displaying the_meta
for a product?
I can change the entry in the editor to another name and value, but it magically appears again and won’t be deleted.
Is there a way to remove the total_sales
custom field when displaying the_meta
for a product?
I can change the entry in the editor to another name and value, but it magically appears again and won’t be deleted.
You must be logged in to post a comment.
I would use the ‘the_meta_key’ filter for this. you have a few options, and of course you can combine them.
Control what to hide with CSS
Control what to hide via PHP & CSS
Control what to Display with PHP
Control what not to Display with PHP
Since
total_sales
ends up as the last list item of it’sul
group (in this caseul.post-meta
), just enter:ul.post-meta li:last-child{
display: none;
}