WordPress.org

Support

Support » How-To and Troubleshooting » How to Get a Partial Attachment URL?

How to Get a Partial Attachment URL?

  • Andrew

    @ndrwglrzayahoocom

    Hello.

    How can I get only a part of the URL of a post attachment?

    For example, the normal attachment URL would be like: http://www.domain.com/wp-content/uploads/year/month/attachment.ext

    I need to get only from the uploads directory on, like this:

    uploads/year/month/attachment.ext

    …so that I can include the URL in my theme.

    Is there a way to get only a part of the URL with a function like wp_attachment_image_url?

    Please help.

    I want to include part of the post in a part of the theme separate from the the_content part. i.e. the_content will be in a different table cell etc…

Viewing 1 replies (of 1 total)
  • Andrew

    @ndrwglrzayahoocom

    Is there anyway to get only part of an attachment’s url for use in the theme?

    Please help.

Viewing 1 replies (of 1 total)
  • The topic ‘How to Get a Partial Attachment URL?’ is closed to new replies.
Skip to toolbar