• Resolved elani

    (@elani)


    Hello,
    I’m new to WordPress, I am making my own theme and I have installed FIFU recently.
    I tried inserting a URL in a post for the featured image and I noticed this adds some HTML code automatically before each post. I would like to remove this, because I’d like to manually put in my own code the featured image URL as a background image for a div. How can I achieve this?

    I have another question, is it possible to use relative URLs and not absolute URLs for the featured image?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcel

    (@marceljm)

    Hi, @elani.

    I tried inserting a URL in a post for the featured image and I noticed this adds some HTML code automatically before each post

    Which code, please?

    I have another question, is it possible to use relative URLs and not absolute URLs for the featured image?

    Not possible. FIFU was designed to work with external images. If your images are internal, you should use the regular Featured image field provided by WordPress.

    • This reply was modified 2 years, 10 months ago by Marcel.
    Thread Starter elani

    (@elani)

    Hi @marceljm and thank you for answering so quickly.

    The code in question is a simple <img src="" /> which I can see on my index.php page when I look at the source, before each post.

    <img fifu-featured="1" width="2048" height="1152" src="https://.....jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="..." title="..." title="..." loading="lazy" />

    I was asking for the relative URLs because even though my images are on my server, I don’t want to use the WordPress Media Library.

    • This reply was modified 2 years, 10 months ago by elani.
    Plugin Author Marcel

    (@marceljm)

    Hi, @elani.

    The code in question is a simple which I can see on my index.php page when I look at the source, before each post.

    That img tag and most attributes are NOT added by FIFU. But FIFU may include attributes there if necessary.

    I was asking for the relative URLs because even though my images are on my server

    You CAN use images from your server with ABSOLUTE URLs as well. What’s the point here?

    Thread Starter elani

    (@elani)

    OK thanks. I found where it comes from. The <?php the_post_thumbnail(); ?> added this.

    I just wanted not to use absolute URLs at all since I never do that and in case I change domains I won’t have to worry about this.

    • This reply was modified 2 years, 10 months ago by elani.
    Plugin Author Marcel

    (@marceljm)

    in case I change domains I won’t have to worry about this.

    That’s not a big deal. You just need to run a simple SQL command. In a few seconds it would “fix” all the URLs. In the next version you will find a troubleshooting for that.

    FIFU supported relative URLs before but sites had different directory patterns and many times it was impossible to find the right prefix. It started to cause too many problems and needed to be removed.

    Thread Starter elani

    (@elani)

    OK, I understand. Thank you for taking the time 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change HTML code’ is closed to new replies.