Redirect Media to activity page


#1

Hello there, how can I redirect rtmedia uploaded photos to the activity status page rather than it’s media page?

Example: I want pictures I upload to redirect to (http://domain.com/members/username/activity/##/) rather than, (http://domain.com/members/username/media/##/)

Thank you. :smile:


#2

Hi @jacob,

You can edit media-gallery-item.php template and chagne the URL.


#3

Hi @jacob,

To explain it more,

media-gallery-item.php is a template used to render each media item/album in a gallery view.

Here is the line which determines the URL which is -> https://github.com/rtCamp/rtMedia/blob/master/templates/media/media-gallery-item.php#L18

You can override this template and add your own code to return new URL instead of rtmedia_permalink().


#4

Is there a “better” solution for this? With filters for example?


#5