detail page add company details main content

This topic contains 3 replies, has 3 voices, and was last updated by  webquest 10 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #17793

    webquest
    Free User
    Post count: 1

    Hi All

    Im trying to add company details to the main section on the details page. any help with this would be great 😀 i have attached an image with what Im trying to achieve.

    Cheers

    #17803

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    In this topic you can find the pointers needed. Just FYI, this requires avarage knowledge of php and wordpress API.

    https://wpgeodirectory.com/support/topic/logo-for-listing-listing-details-page-stylemay-be-a-feature-request/

    Thanks

    #17804

    Simone
    Expired Member
    Post count: 3515

    Hello, you can add the details with a functions, add this in your child theme, in functions.php

    
    
    add_action( 'geodir_details_main_content', 'custom_details', 45 );
    function custom_details() {
    global $post; 
    global $wp_query;
    
    $postid = $wp_query->post->ID;
    
    $current_posttype = geodir_get_current_posttype();
    
    	$myauthor = get_the_author();
    	$myauthorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ).'?post_type='.$current_posttype;
    	echo '<p class="clearfix">Listed by <a href="' .$myauthorlink . '">' . $myauthor . '</a></p>';
    	
    	
    	$customtitle= geodir_get_post_meta($postid,'post_title',true); //title
    	
    	$customaddress= geodir_get_post_meta($postid,'post_address',true); //address
    	$customphone= geodir_get_post_meta($postid,'geodir_contact',true); //phone
    	$customemail=geodir_get_post_meta($postid,'geodir_email',true); //email
    	
    		echo '<h3>'.$customtitle.'</h3>';
    	
    	echo '<p class="clearfix">Address: '.$customaddress.'</p>';
    
    	echo '<p class="clearfix">Phone: '.$customphone.'</p>';
    		echo '<p class="clearfix">Email: '.$customemail.'</p>';
    		
    	
    //do_action( 'geodir_sidebar_detail_top', 'geodir_action_geodir_sidebar_detail_top','' );
    	do_action( 'geodir_action_details_slider');
    }
    

    This is not styled, so you should also need some CSS knowledge along with PHP

    Edit: crossposted with Paolo 🙂

    #18251

    webquest
    Free User
    Post count: 1

    Hi Guys

    Thanks for the help managed to sort this out.

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