• Resolved jungledsales

    (@jungledsales)


    I am trying to attach the post title to a URL but the output URL does not maintain the correct hyphens in between each word.

    <a href="https://www.domain.com/recommends/<?php echo strtolower(get_the_title()); ?>">Visit <?php the_title(); ?></a> | <a href="#review">Submit your review</a>

    Maybe there is a way to save “https://www.domain.com&#8221; as a URL and append the title to that URL? I’m stumped. Suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘the_title() does not maintain hyphens in url’ is closed to new replies.