Advanced Custom Fields
Stripping out the forward slashes in "http://" (7 posts)

  1. Gregory9885
    Posted 3 years ago #

    Every time I publish my posts, ACF seems to be stripping out the forward slahes "//" in my html. I'm trying to append this to a link, but the link won't work because it's showing up as "http: example.com"

    Any suggestions on why it's doing this? Am I doing something wrong here?


  2. Jean Goodwyn
    Posted 2 years ago #


    I'm having this problem also; whether I use manual text entry to put in the URL or the inherent page link selection, the slashes are stripped out of the resulting URL.

    Anyone have a solution for this?

  3. Gregory9885
    Posted 2 years ago #

    I noticed that the code in my template file was wrong. If you post your template code somewhere I can take a look.

  4. Jean Goodwyn
    Posted 2 years ago #

    <a href="<?php the_field('hp1-link'); ?>" title="<?php the_field('hp1-alt'); ?>"><img src="<?php the_field('hp1-img'); ?>" alt="<?php the_field('hp1-alt'); ?>" /></a>

    That's what it looks like.

    All other fields are showing up just fine; the image URL does not have the slashes stripped. Only the 'hp1-link' field does this.

  5. Gregory9885
    Posted 2 years ago #

    Hmm... sorry, I'm not sure. Thought I could help, but my original problem when I posted was something really stupid... I just didn't have the "a" in the "<a href="#">"

  6. Jean Goodwyn
    Posted 2 years ago #

    Good call, Gregory.

    Though it's not in the code you can see here, there's an instance right before this missing a closing quote.

    You did help. :)


  7. Gregory9885
    Posted 2 years ago #

    Cool, glad I could help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic