Merge codes

This topic contains 6 replies, has 2 voices, and was last updated by  Josh Ovett 5 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #437277

    Josh Ovett
    Expired Member
    Post count: 19

    I would like to merge the Title with the Company Name and append with First Last of user of record.
    example

    General Chiropractic LLC, Dr. George Claney

    Can that be done?

    #437283

    Alex Rollin
    Moderator
    Post count: 27815

    Well, there isn’t a concept or feature for
    merge” f fields.

    Is Company Name a custom field? Maybe just delete it?

    And then you can use the CPT options and translation metod if necessary to change “Title” to “Company Name”?

    https://wpgeodirectory.com/docs/custom-post-types-add-on-overview/
    https://wpgeodirectory.com/support/topic/changing-labels-on-add-listing-page/#post-218159
    https://wpgeodirectory.com/docs/faqs/how-do-i-change-place-and-places/
    https://wpgeodirectory.com/docs-v2/translation/overview/

    Tell us more about your setup, aybe I am missing some information that could be used to give you a better fit.

    You can also attach a screenshot of what you are trying to change, or even make a private reply and include the URL and a pointer to what you are trying to change.

    #437291

    Josh Ovett
    Expired Member
    Post count: 19

    On our site we want to import data to gl_places and into the title or in the description show the First Name and Last name in the description since the data is already in the system.

    I was looking at this https://wpgeodirectory.com/support/search/?bbp_search=add+html+variable
    that Guust posted . I can add this in using snippets. Just not sure what do to show the First and Last name using short coded in the title or description attached is a mock up.
    Thanks

    To enable shortcodes in an HTML field added in a Fieldset, add this code snippet:

    add_filter(‘geodir_tab_show_geodir_XXX’,’my_enable_shortcodes_on_field’,10,2);
    function my_enable_shortcodes_on_field($html, $variables_array){
    return apply_filters(‘the_content’, $html);
    }
    Replace XXX with the HTML variable name of your HTML field.
    Keep the HTML field admin only, do NOT give your users access to it, it is a security risk.

    #437293

    Josh Ovett
    Expired Member
    Post count: 19
    This reply has been marked as private.
    #437294

    Alex Rollin
    Moderator
    Post count: 27815

    That snippet allows users of the site to enter shortcodes into an HTML Custom Field. I am not sure how that is related to what you want to do.

    Other members have used the Title field to store a name, like, the name of a doctor, or the name o a freelancer or the name of a group member. You can really use the Title field to store a name, that shouldn’t be a problem.

    If First and Last name are separate fields in your current data, you could merge them using a spreadsheet so they show up in the title as First Space Last, how about that?

    I you are keen to have that information in the Description field also then duplicate it into that field too.

    Import and Export are described on this page. Read it thoroughly to learn about options and requirements.

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

    If you need hands on help from a GD Expert for CSV ninja skills or stup then you can check here for someone : http://geodirectoryexperts.com

    If you have more questions, though, write back and we will do our best to answer them.

    #437296

    Josh Ovett
    Expired Member
    Post count: 19

    How can I show the First and Last name field in any of the sections in line. vs stacked.
    Is that just CSS?

    #437301

    Alex Rollin
    Moderator
    Post count: 27815

    I would not try that with CSS.

    I would:

    1. Export the listing data
    2. Open the exported CSV in LibreOffie
    3. Merge First and Last
    4. Use the new Merge as the post title (and delete fist and last in the sheet and the field in the site).
    5. Import the listings to update the existing listings.

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