• Resolved stooryduster

    (@stooryduster)


    I’m using the comicpress theme which stores all the images I use in a single directory – one for each post. I also have secondary images I need to use each time – one for each post.

    There is a static version of what I am trying to build in WordPress here https://www.stooryduster.co.uk/word

    Every post has two images. One is the cartoon illustrating a word and the second one is an image of the word in the phonetic alphabet that shows how to pronounce the word. The text in the post is a caption.

    I thought I was being clever using a relative link within each post to incorporate the second image from the same directory.

    Of course it worked up until I changed the permalink setting to use the post title.

    Now all these secondary image links are broken. Main image is fine.

    I’m developing it locally on my laptop so far – as I have several years of content to add. Trying to get it functioning well before I begin the full content transfer.

    Uploading all these files to the media section of WordPress seems overkill. That method would also end up a chore on future posts.

    One solution is to make these links absolute.

    I’d have to search and replace all of them in the database when it moves to its final host though. Removing localhost stuff.

    I could stick with ugly links. address?p=123

    Does anyone have any other ways? Please.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I thought I was being clever using a relative link within each post to incorporate the second image from the same directory.

    It’s always a bad idea to use relative urls in WordPress. It doesn’t handle them very well. I’d recommend turning them all into absolute urls. You could save yourself a lot of heartache in the future. Have a look at the Search & Replace plugin. It may make the job a bit easier.

    Thread Starter stooryduster

    (@stooryduster)

    OK…

    then

    That makes it straightforward then. I can manage all that no problem. I’ll make sure I use logical directory structure and naming and it could become almost simple. Search and replace plugin I’ve used before but you’ve saved me trying to find it. Cheers esmi.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘setting nice permalinks breaks relative blog links – looking for alternatives.’ is closed to new replies.