Forums

[resolved] Permalinks break pictures (5 posts)

  1. synchole
    Member
    Posted 1 year ago #

    Hi,
    I'm hoping someone can help.
    I've been trying to update our site to reflect better SEO standards and so this morning I changed our permalink structure from numeric to /%category%/%postname%/. I'm using custom fields to pull out an ad banner on each custom page and now they've disappeared. After searching around on the forum I understand that my problem is that I'm using a relative path to my images, however I've tried using php template tags to grab the images and I still can't get it to work. I've used both:
    <img src="<?php bloginfo('template_directory') ?>/style/images/warranty_banner.jpg"/>
    and
    <img src="<?php bloginfo('template_url'); ?>/style/images/warranty_banner.jpg"/>
    With no luck.
    The website is: centurionsystems.com, when you click onto any of the pages there should be a banner like on the home page but they don't appear.
    Any help is greatly appreciated.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I changed our permalink structure from numeric to /%category%/%postname%/.

    Bad choice. See http://ottopress.com/2010/category-in-permalinks-considered-harmful/

  3. synchole
    Member
    Posted 1 year ago #

    Just in case anyone else has this problem, I eventually did find a solution, however it only works if your images are wrapped in an anchor tag, which luckily mine were.

    add
    <base href="<?php echo get_settings('home'); ?>" />
    to your head tag.

  4. bettylocal
    Member
    Posted 1 year ago #

    I believe I have a similar issue: the most obvious example can be seen here --> http://bettylocal.com/betty-local-seattle/ <-- notice there are two broken images. Everything else in the site appears just fine. My host is suggesting that I need to disable permalinks. (Not sure how to do that or whether it's even warranted.)

    Will give the head tag trick a go...crossing fingers it might help me.

    Any other ideas out there???

  5. viviangee
    Member
    Posted 1 year ago #

    @Synchole - just wanted to say you are a GODSEND! I could kiss you.

Topic Closed

This topic has been closed to new replies.

About this Topic