• Hi
    I was wondering what the best way to achieve these two goals would be.

    I’m trying to use WooCommerce as a directory listing (it’s working really well), but I need to change a couple of things.

    Where the two dropdown lists are on the main shop page where it says Show 12, 24, and 36 products, I want that to say businesses instead of products.

    The other thing is I want to remove Filter by price in the other dropdown list.

    Any advice greatly appreciated. Thanks
    Geoff

    https://www.ads-software.com/plugins/woocommerce/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey djaef,

    There are two free plugins for adding statuses:
    https://www.ads-software.com/plugins/woocommerce-extra-product-sorting-options/
    https://www.ads-software.com/plugins/woocommerce-products-per-page/

    Removing may take a bit of custom code. I believe SkyVerge has a post coming out shortly about that.

    I’m going to chat about it on my show tomorrow https://daniel.gd/office-hours/
    and then let you know what we come up with!

    Thread Starter djaef

    (@djaef)

    Thanks Daniel,
    Neither of those plugins allowed me to change the label products to something else. One gave me sorting options but I couldn’t find any way to rename Products to Businesses. I read somewhere else hat you could use a PO file, but surely a simple plugin has been made for this.

    This is the plugin which will edit the relevant .po file and compile it:
    https://www.ads-software.com/plugins/codestyling-localization/.

    Please post a url to a page showing the Filter by Price in the dropdown.

    Thread Starter djaef

    (@djaef)

    Thanks. I will have a look at that plugin.

    https://re-scape.com/bizscapes-business-directory/
    A third of the way down on the left you can see the “Sort by Default order” list. I want to remove Sort by Price from this list.

    Try this in your custom css:

    .order-dropdown li ul li:nth-child(3) {display:none}

    This page shows browser support for the nth-child selector.

    Thread Starter djaef

    (@djaef)

    Thank you Lorro, that worked to hide the selector. ??

    I was thinking about a PO file. I don’t know anything about them, but wouldn’t it change all instances of that word to another word? I only want Products changed in the WooCommerce Selectors, not in the body text. Someone might use that word in a normal sense.

    Some messages are grouped. The .po file tells you where a message is being used.

    Bring up wp-config.php and look for the line:
    define(‘WPLANG’, ‘en_GB’);
    This will give you your language identifier, in this case its “en_GB” if your site uses English. I don’t think this method works if the identifier is empty.

    Go to wp-content/plugins/woocommerce/i18n/languages
    and look for:
    woocommerce-en_GB.po, not the admin one.

    Rename it with a .txt extension so you can edit it.
    Add or find a pair of lines at the end for each form label translation. The first is the English/American that appears now, the second line is the translation in your language. For example:
    msgid “Company Name”
    msgstr “Nombre de compa?ía”

    Change the file back to .po and download it to your hard drive.
    Compile your .po to .mo using this tool:
    https://po2mo.net/

    Ensure you get the underscores and hyphens right.
    Upload the .mo to
    wp-content/plugins/woocommerce/i18n/languages
    overwriting the file that was there. Keep a copy!

    If you have a page caching plugin, delete cached pages.

    You may have to update to the en_GB version of WordPress, sorry not sure about that bit. It will be in Dashboard / Updates if you do.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing the default labels and removing one of the dropdowns’ is closed to new replies.