• I would like to ask if there is an alternative to fetching the current template directory on the Settings field like for example using %home%. Is there like %template_directory% ?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Havlik

    (@mtekk)

    I’m not sure I fully understand your question/what you are trying to do. Breadcrumb NavXT doesn’t have template directories, and does not deal with template directories.

    For the breadcrumb templates, please see the documentation for the available template tags: https://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/#using_bcn_settings

    Note that you can add your own template tags using the bcn_template_tags filter.

    • This reply was modified 8 years, 5 months ago by John Havlik.
    Thread Starter Arvin Guerra

    (@sudobash)

    I have this on my home template settings field: <a href="%link%"><img src="%home%images/icon_header.png" alt="HOME" /></a>

    Is there a way that I can set the “%home%” to my current active theme directory? say for example “%template_directory%” same as calling <?php bloginfo('template_directory'); ?>

    Thanks

    • This reply was modified 8 years, 5 months ago by Arvin Guerra. Reason: code edit
    Plugin Author John Havlik

    (@mtekk)

    Yes, this is possible, you just need to write a hook into the bcn_template_tags filter. Something like the following should do the trick:

    function my_bcn_template_tag($replacements, $type, $id)
    {
        //Add the %template_directory% template tag
        $replacements['%template_directory%'] = get_bloginfo('template_directory');
        //Return our new set of templates and replacements
        return $replacements;
    }
    add_filter('bcn_template_tags', 'my_bcn_template_tag', 3, 10);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fetch Template Directory on settings page’ is closed to new replies.