Forums

[Resolved] Add Page Title/Slug To Link (1 post)

  1. slamdunksy21
    Member
    Posted 2 years ago #

    I'm trying to add the page slug/title to a link to dynamically change the link based on the page title.

    For example:
    My Page Title: Chicago Cubs
    External Link I Want To Have: http://www.stubhub.com/chicago-cubs-spring-training-tickets/

    In the sidebar, I want to have links to Stubhub that change based on the page the user is on.

    The code would be something like <a href="http://www.stubhub.com/<PAGE TITLE or SLUG>-spring-training-tickets/">Buy Tickets</a>

    How do I call the page to include the dashes in the title to make the link work? Or what is the best way to call the page slug?

    RESOLVED HERE: http://wordpress.org/support/topic/128046?replies=9

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.