Permalink breaks image addresses (2 posts)

  1. achindra
    Posted 3 years ago #

    When I set permalink to use %postnames%, my Page address becomes something like
    and the logo will not show up as the logo URL becomes
    Logo address: http://domain/web/contact-us/wp-content/uploads/logo.png

    If I set permalink to /index.php?t=%postname%, page address becomes http://www.gigabits.co.in/web/index.php/contact-us and logo won't load.
    Logo address: http://domain/web/index.php/wp-content/uploads/logo.png

    However, now blog posts will have correct URL -
    and thus logo image will load correctly.
    Logo address: http://domain/web/wp-content/uploads/logo.png

    How do I fix this? Need permalink to be able to work for both; posts and pages. The only problem I see is with loading logo, other images loads just fine.

    I have seen some posts here talking about modifying the header to include site url as below:
    <img src="<?php echo get_option('siteurl'); ?>/images/logo.jpg" />

    My theme allows me to add html code. And thus I am using absolute address as a temporary workaround.
    <img class="size-auto" src="domain/wp-content/uploads/logo.png" width="260" height="90" alt="logo" />

  2. achindra
    Posted 3 years ago #

    My template uses

    <?php if ($this['modules']->count('logo')) : ?>
        <a id="logo" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['modules']->render('logo'); ?></a>
     <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic