Where to add code for custom fields in main profile tab?

This topic contains 1 reply, has 2 voices, and was last updated by  Kor 7 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #438843

    Greg Bengston
    Free User

    I found the post on this forum for the code to add/edit to put custom fields in the main profile tab instead of in a sidebar or as separate tabs. I’m trying to create my own custom template using custom fields and I’d prefer to not have tabs at all but rather whatever custom template I come up with per my client’s requirements.

    Anyway, I have the sample code (shown below) but I’m not sure where it goes. Does it go into the theme’s functions.php file? Or is it code to change in a specific template file that I place in my theme in a new geodirectory folder? Thanks in advance for any help you can offer to point me in the right direction.

    This is the sample code from a previous post:
    add_action(‘geodir_before_description_on_listing_detail’, ‘gd_profile_custom_content’);
    function gd_profile_custom_content() {
    global $post;
    ?>
    <div class=”gd_profile_custom_content_wrapper”>
    <div class=”column1″>
    <div>
    <?php echo geodir_get_post_meta( $post->ID, ‘custom_field_key_goes_here’, true ); ?>
    </div>
    <div>
    <?php echo geodir_get_post_meta( $post->ID, ‘custom_field_key_goes_here’, true ); ?>
    </div>
    </div>
    <div class=”column2″>
    <<div>
    <?php echo geodir_get_post_meta( $post->ID, ‘custom_field_key_goes_here’, true ); ?>
    </div>
    <div>
    <?php echo geodir_get_post_meta( $post->ID, ‘custom_field_key_goes_here’, true ); ?>
    </div>
    <div>
    <?php echo geodir_get_post_meta( $post->ID, ‘custom_field_key_goes_here’, true ); ?>
    </div>
    </div>
    </div>
    <?php
    }

    #438857

    Kor
    Moderator
    Post count: 16516

    Hi Grey,

    Thanks for your post. I’d like you to know that you can switch to a “List View” using the option shown in the attached image. You can find that option GD > Design > Detail

Viewing 2 posts - 1 through 2 (of 2 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