• Resolved chris29888

    (@chris29888)


    How do I only display the listing’s excerpt instead of the entire content in the listings overview page? It looks terrible with everything showing up at once and each column being a different height.

    I also cannot for the life of me find a way to translate the words “new” and “used” that show up at the bottom of individual listings in the overview page.
    Example: https://i.imgur.com/CHkkM1D.png
    They’re not being translated with the “new” and “used” strings that Loco Translate discovers and I scanned the entire plugin folder via SublimeText and couldn’t find the file that generates these two words.

    Lastly, how do I make the listing status (“new” / “used”) show up on the individual listing’s page? Right now it only appears in the overview and once I click on the listing, there is no way of knowing whether it’s a pre-owned or a new car.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author autolistings

    (@autolistings)

    Hi,

    How do I only display the listing’s excerpt instead of the entire content in the listings overview page
    You will have to modify the template description.php in the loop -> description.php: https://i.imgur.com/inP5XDb.png. Please refer to this documentation to know how to modify a template: https://wpautolistings.com/docs/templates/

    I also cannot for the life of me find a way to translate the words “new” and “used” that show up at the bottom of individual listings on the overview page
    Have you checked your search form? That is the only place where the listing condition is displayed. And I don’t see any ‘new’ or ‘used’ string in your screenshots. The strings are located in the file ‘src/functions.php’ and the auto_listings_conditions() function.

    Lastly, how do I make the listing status (“new” / “used”) show up on the individual listing’s page?
    Please modify the template content-single-listing.php to add that string.

    Thread Starter chris29888

    (@chris29888)

    1) Thanks!

    2) I highlighted the part I was talking about: https://i.imgur.com/UmwBwcn.png
    It accepted my translation of “Fahrzeug”, but “Used” remains the same.

    3) What kind of string do I have to add in which line?

    Thread Starter chris29888

    (@chris29888)

    1) Setting it to “the_excerpt” instead of “the_content” does show the excerpt but it also breaks the entire overview page and nothing responds anymore…

    Hi Chri,
    No official support, but to shorten the text I’m using Classic Editor.
    There’s a function Read more, insert that where you want to end the text.
    https://superclassics.eu/listings/
    Hope it helps!

    Thread Starter chris29888

    (@chris29888)

    Bruh… that actually does work. Thanks a ton!

    Thread Starter chris29888

    (@chris29888)

    Even replacing the words in the functions.php auto_listings_conditions() does nothing, it still displays the English “Certified”, “New”, and “Used”

    https://i.imgur.com/cDqEfr0.png
    I also tried only replacing one of the worse at a time, but it still yielded the same (lack of) results.

    chris29888
    Given up on the new used certified issue a few years ago!
    Same with price on request still displaying 0 even when I say hide price

    Thread Starter chris29888

    (@chris29888)

    Aww maan, it can’t be impossible.
    I searched through all the plugin files again, nothing comes up that might suggest that “Certified” etc. is hardcoded anywhere.
    No idea where it comes from.

    @autolistings Any ideas? Changing it in the functions.php should have done it (from my limited understanding of PHP). It’s almost like there is some sort of cache that keeps holding on to the old version, but I don’t have any caching systems running right now.

    Thread Starter chris29888

    (@chris29888)

    I managed to display the $condition on the single listing page.
    Still hoping for a way to translate it because it’s quite useless otherwise.

    Plugin Author autolistings

    (@autolistings)

    Hi, That’s kind of strange. So you couldn’t translate the words ‘New’, ‘Used’ and ‘Certificated’, right?
    I’m not sure but there could be a problem in setting up with Loco Translate. Please send a ticket to [email protected]. We will handle this case for you.

    Thank you.

    @autolistings
    There are more strings that cannot be translated with Loco Translate, including Our Team in Multiple Dealers.
    Regards and stay safe
    Peter

    Thread Starter chris29888

    (@chris29888)

    @autolistings Correct.
    If it’s an issue with Loco Translate, it should at the very least show up when I actually edit the PHP files directly.
    Maybe one of the files links to a php file that’s hosted on one of your servers and that’s where the untranslateable files come from (just a wild idea though).

    I’ll give the support ticket a try, thanks!

    Plugin Author autolistings

    (@autolistings)

    @groenhart I have answered you on the ticket. Please check your inbox.

    Thread Starter chris29888

    (@chris29888)

    For anyone looking for a solution to this problem in the future:
    The developers kindly shared the solution and allowed me to post it here:

    The words “new”, “used” and “certificated” can’t be translated because they are values rather than strings within the plugin’s files.

    In order to get rid of them, you simply need to add this bit of code to your (child theme’s) functions.php

    add_filter( 'auto_listings_conditions', function( $options ) {
        return [
            'Neu' => __( 'Neu', 'auto-listings' ),
            'Gebraucht' => __( 'Gebraucht', 'auto-listings' ),
            'Zertifiziert' => __( 'Zertifiziert', 'auto-listings' ),
        ];
    } );

    (replace the each string with whatever you desire, of course)

    Afterwards, go to your Auto Listings settings, confirm the new phrases and open up each individual listing and set its specific condition one more time and hit save.

    Works perfectly for me now.
    Thanks for helping me out, @autolistings !

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Display excerpt instead of content + translate “new” / “used” in overview’ is closed to new replies.