• Resolved andi_sf

    (@andi_sf)


    How can I echo/display the current directory name on the single page template? Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @andi_sf,

    Not quite sure how want to achieve this but if you want to echo/print directory type on a single listing page, this would be the code to do it:

    
    $directory_type = get_post_meta(get_the_ID(), '_directory_type', true);
    $directory_type_name = get_term_by('term_taxonomy_id', $directory_type)->name;
    echo $directory_type_name;
    

    Hope this helps, let me know if there’s anything else.

    Regards,
    Mahdi.

    Thread Starter andi_sf

    (@andi_sf)

    Hi Mahdi,

    thanks so much for the helpful code hint – you made my day and what a great plug-in support!

    All the best,
    andi_sf

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Echo current directory name on single page template’ is closed to new replies.