Output Listing information on custom page

This topic contains 12 replies, has 2 voices, and was last updated by  scott hodgkiss 9 years, 8 months ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #11299

    scott hodgkiss
    Free User
    Post count: 6

    Hi,

    We are using a custom theme and would like to output the listing information via PHP in our template file. Is this possible?

    Thanks

    S.

    #11302

    Simone
    Expired Member
    Post count: 3515

    Hello Scott,
    yes it is possible, it depends on which field you want to output, it could , for example, something like

    geodir_get_post_meta($postid,'post_city',true);

    (that will output the city)

    S.

    #11305

    scott hodgkiss
    Free User
    Post count: 6

    Thank you very much.

    We have installed the plugin and entered a Place but when we go to view it there is just a blank screen, not sure why?

    S.

    #11306

    Simone
    Expired Member
    Post count: 3515

    HI, could you please write us your URL so we can take a look (in a private reply)

    S.

    #11307

    scott hodgkiss
    Free User
    Post count: 6
    This reply has been marked as private.
    #11311

    Simone
    Expired Member
    Post count: 3515

    Ok, you just need to enable the debug in the wp-config.php in the root of your website by adding this line:

    
    
    define('WP_DEBUG', true);
    

    Also, what steps did you take so far?

    #11312

    scott hodgkiss
    Free User
    Post count: 6
    This reply has been marked as private.
    #11313

    Simone
    Expired Member
    Post count: 3515

    Hmm…could you please try deactivating this language plugin and see if is this working?

    #11314

    scott hodgkiss
    Free User
    Post count: 6
    This reply has been marked as private.
    #11316

    Simone
    Expired Member
    Post count: 3515

    Nice, the file for the detail page is in /wp-content/plugins/geodirectory/geodirectory_template_actions.php

    but, you need to create a function in order to do not loose the modification if the plugin will be updated

    #11317

    scott hodgkiss
    Free User
    Post count: 6
    This reply has been marked as private.
    #11323

    Simone
    Expired Member
    Post count: 3515

    You have to place the function in your functions.php inside your child theme,

    for example, this function will add a text in the main content, in the detail page and it will add the author of the listing

    
    
    add_action( 'geodir_details_main_content', 'show_author', 45 );
    function show_author() {
    global $post; 
    
    $current_posttype = geodir_get_current_posttype();
    
    	$author = get_the_author();
    	echo '<p class="clearfix">Listed by' . $author . '</p>';
    }
    
    #11389

    scott hodgkiss
    Free User
    Post count: 6
    This reply has been marked as private.
Viewing 13 posts - 1 through 13 (of 13 total)

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

Open Support Ticket