1950 posts Do the Needful
  • Has sold $125,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Has referred 10+ members
+10 more
JamiGibbs says

Hey guys,

I’m having a problem with the WP menu system stripping out the “rel” info I need passed onto an anchor tag.

I’m using shadowbox for a video that will launch directly from the navigation and to trigger the shadowbox, I need to add “shadowbox” to the rel tag. This works fine but I also need to set the video display size….

...like so:

But instead it’s passing through as:

shadowboxwidth500height306

Anyone have a suggestion of the best way to tackle this problem?

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

But the rel attribute is not for that, i guess you can´t pass a variable separated by ; into that.

Why you don´t put that info on parameters on the url path? Like so:

?autoplay=1&fs=0&width=500&height=200

Then via jquery you can manipulate that parameters to make what you need.

This way you can still use the XFN to put the rel=shadowbox only.

1950 posts Do the Needful
  • Has sold $125,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Has referred 10+ members
+10 more
JamiGibbs says

Thanks rg. I was trying to work within the parameters of the shadowbox plugin which adjusts the video size via the rel attribute. I wanted to avoid having to manipulate it with jquery but I’ll consider your suggestion.

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

Using jquery you can easily get the parameters from the url path and put them into rel attribute on the fly. I think is the best and also you will have a valid html.

by
by
by
by
by
by