WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Gregory9885
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. Jean Goodwyn
    Member
    Posted 1 year ago #

    Bump.

    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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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. :)

    Thanks!

  7. Gregory9885
    Member
    Posted 1 year ago #

    Cool, glad I could help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic