Just need two things First-- I've looked around the files

Hi Just need two things

First-- I've looked around the files but cannot fine where to change the "Add Listing" to "Add Your Personal Listing"

Second, I need to Exclude the normal tags and category from this loop on the update listing template so I just get my custom fields and taxonomies. Not the standard tags and categories. Just want them to disappear and they appear to be called in the loop.

		//get related hierarchical taxonomies
		$taxonomies = get_object_taxonomies('directory_listing', 'objects');
		$taxonomies = empty($taxonomies) ? array() : $taxonomies;

		//Loop through the taxonomies that apply
		foreach($taxonomies as $taxonomy):
		if( ! $taxonomy->hierarchical) continue;
		$tax_name = $taxonomy->name;
		$labels = $taxonomy->labels;
		//Get this Taxonomies terms
		$selected_cats = array_values( wp_get_post_terms($listing_data['ID'], $tax_name, array('fields' => 'ids') ) );

  • Patrick
    • Support Monkey

    Hi there @mark singley

    I hope you're well today!

    To change text strings in a plugin, it's best not to actually edit the plugin files. Rather, create a custom language file in which you can customize any/all text strings to your heart's content. It's also update-proof as your translations (text changes) reside outside the plugin.

    We have a translations area here that you can use to translate our products to any language you need:

    But that is really for translating to another language. If you just want to tweak a few lines here and there, the easiest way is by using a program like PoEdit:

    Then, follow the instructions in the Using Translations section on this page to upload & activate your custom edits:

    As for removing the default categories & tags from the add-listing page, I'm honestly not quite sure how to get that done except via a bit of CSS.

    However, while the categories box on that page has a specific ID that can be targeted with CSS, the default tag box does not. A small edit to the template - I know, I said don't do that earlier, but this is how I know it can be done :slight_smile: - will fix that:

    In page-update-listing.php, change line 183 from this:
    <div class="dr_taxonomydiv">

    ...to this:
    <div id="taxonomy-<?php echo $tag_name; ?>" class="dr_taxonomydiv">

    You can then make 'em disappear from your page by adding the following CSS:
    #taxonomy-listing_category, #taxonomy-listing_tag {display:none;}

    I hope this helps! And thanks for being a member :slight_smile:

  • mark singley
    • Design Lord, Child of Thor

    Thanks Ash! That stinks!

    This is a problem for me. I wonder if I can just move the listing php out of the plugin to protect it.

    But can I keep a copy of it and upload it after updating the plugin so I don't lose my customizations?

    I reordered some of the elements. etc. So I imagine the update to the plugin might not affect the php files.

  • Ash
    • WordPress Hacker

    Hello @mark singley

    Which files did you update? Maybe you can try to move those files (if they are template file) into the theme folder.

    The best way is to keep a copy of your edited file and original file, after updating compare the original file with the new original file, if nothing is changed then the replace new original file with the edited file. If there are some changes in new original file, then adjust with edited file and overwrite.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.