• InHouse

    (@inhouse)


    Hi, I’m trying to add a word to the end of a permalink but I can’t seem to get this right. Right now, the “-arbitrary-word” is not appear directly after the permalink. Basically, I’m linking the featured image to a page with the same URL + “-pdf”. There’s probably a cleaner way of doing this but I can’t find a way.

    Current URL
    domain.com/page-name/-pdf

    Desired URL
    domain.com/page-name-pdf

    echo '<a href="' . $permalink = get_permalink($post->ID) . '-pdf' . '">
    the_post_thumbnail()
    echo </a>
Viewing 2 replies - 1 through 2 (of 2 total)
  • noahjonah

    (@noahjonah)

    Thread Starter InHouse

    (@inhouse)

    I’m not trying to modify the permalinks across the board. I’m trying get to add a word to the end of the permalink. This is so the featured image links to the secondary page we create. The secondary page has an embedded PDF that opens full screen. The secondary page will always have the same url PLUS the word PDF at the end.

    domain.com/page

    Then the PDF page
    domain.com/page-pdf

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permalink Add On Word’ is closed to new replies.