Forums

How to get category slug(nicename) in image path? (1 post)

  1. PuNK
    Member
    Posted 3 years ago #

    Hi...
    i m setting up a new blog.
    i want to put all the content(images) of a particular categ in separate folder. which is named as categ-slug name
    Path is wp-content/uploads/categ-slug/

    how can i get the slug name in the image path?
    i want to use this code
    <textarea rows="2" cols="80"><img src="http://www.mysite.com/wp-content/uploads/<category slug folder>/imagename.jpg"></textarea>

    i want to use this in the loop for each post
    so that it get each post's categoery & display dat category-slug in the image src path.

    how can i do that?
    thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.