MyListing Guide

Optimize Listing Type Revisions for MyListing

Get the knowledge your online business needs to succeed.

Guide Overview: 

The Optimize Listing Type Revisions for MyListing guide will show you how to further limit database bloat, by reducing the number of Listing Type revisions that are stored.

Listing Type Revisions

Out of the box, ML will store up to 15 versions of each Listing Type. Every time you click “update” on your Listing Type, another revision is added.

This is an awesome feature. But, for those that have an interest in keeping their database just a bit further in check…this is for you. Also, you can always export a revision at any time and name the export file to something meaningful.

For those that are actively developing your site, you may want to save this until right before launch altogether or configure enough revisions to go back a few.

Our recommendation is to set a revision limit of 5.

Note: Listing Type revisions are different from Post Revisions, which can normally be limited or cleaned up using code snippets or plugins.

Limit the Listing Type Revisions

  1. Within your Child Theme (/wp-content/themes/my-listing-child/), create the following folder structure: /includes/src/listing-types.
  2. Copy the revisions.php file from the parent theme (/wp-content/themes/my-listing/includes/src/listing-types/) to the new /wp-content/themes/my-listing-child/includes/src/listing-types/ directory.
  3. Edit the revisions.php file and edit the “15 value” from line 20 (shown below) as desired.

($this->max_revisioun_count = apply_filters( ‘mylisting/types/max-revision-count’, 15 );)

Let's empower others. Share the knowledge.

Share on twitter
Share on facebook
Share on linkedin
Scroll to Top

Find a bug or typo? Please let us know.