• Resolved Chantal

    (@chantalmariergmailcom)


    I am trying to add the following code to my single.php file so that I don’t have to manually add runners_log_basic and other graphs when I add a post. Where exactly do I need to add the code in my single.php? I have no php experience so I am not sure what to do here. Any help would be appreciated.

    <?php if ( in_category('3') ): ?>
    <?php if (function_exists(runners_log_basic)) echo runners_log_basic(); ?>
    <?php if (function_exists(runners_log_graph)) echo runners_log_graph(); ?>
    <?php if (function_exists(runners_log_graphmini_distance)) echo runners_log_graphmini_distance(); ?>
    <?php endif; ?>

    https://www.ads-software.com/extend/plugins/runners-log/

Viewing 2 replies - 1 through 2 (of 2 total)
  • What template do you use?

    In the template I use I did this to show runners_log_basic in a top of a post like this post: https://www.liljefred.dk/frederik/lob/45k-inkl-3k-13m49sek-aka-4m36skm-vdot41/

    In single.php

    FIND
    <div class="post-content clear-block">

    AFTER, ADD
    <?php if (function_exists(runners_log_basic)) echo runners_log_basic(); ?>

    And to have weather on post time under the content

    FIND
    <?php the_content(__('More >', 'mystique')); ?>

    AFTER, ADD
    <?php if (function_exists(runners_log_weather_footer)) echo runners_log_weather_footer(); ?>

    In general you need to put the code somewhere between:

    <!-- post -->

    <!-- /post -->

    Thread Starter Chantal

    (@chantalmariergmailcom)

    Adding it before <!-- /post --> worked for me. Thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Runners Log] Modifying single.php’ is closed to new replies.