Can’t grab author info outside of the loop

For your author box to work, it needs to be inside the loop. You have one fundamental flaw though with your second loop. You are currently using two different loops in one, the first one being the main loop, and the second one a custom loop to fetch related posts

As it stand, and where you placed your author box, it is getting its information from the second loop, and not the main loop, that is why your author that is returned is wrong

To solve this, you will need to reset your second loop. Always reset a custom query (like the one you’ve used) which you’ve created with get_posts or WP_Query. To do this, you’ll have to call wp_reset_postdata after your loop is done. Your second loop should look like this

<!--BEGIN #related--><?php $related = get_option('dt_related');

    if($related == 'true') : ?>


    <div id="related" class="clearfix">
        <div class="inner">
            <h3>Recommended</h3>

            <?php

            $related = dt_get_posts_related_by_taxonomy(get_the_ID(), 'category', get_the_ID());

            ?>

            <ul>

                <?php  if($related->have_posts()) : while ($related->have_posts()) : $related->the_post(); ?>

                <!--BEGIN li -->
                <li id="featured-post-<?php the_ID(); ?>">

                    <div class="featured-image">
                        <div class="da-hover">
                            <span class="da-wrap">
                                <span class="title"><?php the_title(); ?></span>
                                <?php dt_overlay_icon(); ?>
                            </span>
                        </div>
                        <a href="https://wordpress.stackexchange.com/questions/151834/<?php the_permalink(); ?>"><?php dt_image(200, ''); ?></a>
                    <!--END .featured-image -->

                <!--END li-->
                </li>

                <?php endwhile;  wp_reset_postdata(); else: ?>
                    <p><?php _e('There are no related posts.', 'engine'); ?></p>
                <?php endif; ?>

            </ul>

        </div>
    </div>

    <?php endif; ?><!--END #related-->

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)