• Resolved markgt

    (@markgt)


    Hi guys

    There’s an issue with the link output when an internal WP link is used. It seems the following characters – ,%20, – get added to the end of the URL, creating a 404 error.

    I’ve looked through the files and can’t find that – any help and/or a fix would be much appreciated.

    Thanks for the plugin!

    https://wordpress.org/plugins/acf-link-picker-field/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author caalami

    (@caalami)

    Unfortunately, I can’t replicate this on a test site (in WP 4.4.1).

    %20 is a space character–is it possible there’s an extra space being inserted at the end of your template href?

    Hi there I am having the same problem I have got this code
    <a href=" <?php $my_link_field = the_field('publication_link'); echo $my_link_field["url"]; ?>

    it will return the URL but has at the end of the url ,%20, is there anything that I am doing wrong.

    thanks

    Plugin Author caalami

    (@caalami)

    I think there may be a few problems. Try something like:

    <?php
      $my_link_field = get_field('publication_link'); ?>
    <a href="<?php print $my_link_field['url']; ?>"><?php print $my_link_field['title']; ?></a>

    Note the use of get_field rather than the_field and that there is only one PHP statement (print) inside the href attribute.

    Plugin Author caalami

    (@caalami)

    I’m going to mark this as resolved for now since issues are most likely related to extra spaces in templating.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error on internal link output’ is closed to new replies.