Add random content and HTML to the Add Listing Form

This topic contains 6 replies, has 3 voices, and was last updated by  Paolo 9 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #55074

    Dylan
    Expired Member
    Post count: 40

    Hello,

    We want to add additional content and html to the Add Listing form. We would like to place this content in specific locations, between certain fields.

    How can this be done?

    Thanks.

    #55122

    Guust
    Moderator
    Post count: 29970

    You can use the translation file for that.
    For example if you would like a heading above the ZIP code you would translate

    Please enter listing address. eg. : <b>230 Vine Street</b>

    to

    Please enter listing address. eg. : <strong>230 Vine Street</strong><h3>Heading for ZIP code</h3>

    https://wpgeodirectory.com/docs/translate-core/

    #55620

    Dylan
    Expired Member
    Post count: 40

    Hi Guust,

    The translation file works for small changes. But for instance, if I want to add this:

    <p class="food-cat-desc">Select one or more Food Categories. Have a suggestions for a new category, let us know at [email protected]</p>

    prior to the Category section of the Add listing form, it cannot be done by translating the “Category” word, because it inserts the HTML within the <label> tag, and not above it. So it does not display correctly, and CSS cannot be used to adjust the position, because the <label> tag contains the new html/text.

    Thanks.

    #55785

    Paolo
    Site Admin
    Post count: 31206

    Hi Dylan,

    you will need to modify the add-listing template and also some of it’s function to do something like that.

    Thanks

    #55842

    Guust
    Moderator
    Post count: 29970

    As per the ZIP example I gave, you can add it to the bottom of the previous text, see image.
    Or do it as Paolo suggests.

    #56068

    Dylan
    Expired Member
    Post count: 40

    Hi Guust,

    Adding it to the bottom of the previous text will not work in our case, because the previous is a fieldset, and they are not in the PO file.

    So we would have to modify the add-listing template to add even a single line of text. How would the function target the exact area we would like to add our text? Is it by function priority only, on the hook?

    Thanks!

    #56137

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    fieldset and custom fields text can be added to the PO file.

    Please see: https://wpgeodirectory.com/docs/translating-custom-fields/

    Let us know how you went.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount