WordPress.org

Ready to get started?Download WordPress

Forums

How to Get a Partial Attachment URL? (2 posts)

  1. Andrew
    Member
    Posted 2 years ago #

    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...

  2. Andrew
    Member
    Posted 2 years ago #

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

    Please help.

Topic Closed

This topic has been closed to new replies.

About this Topic