- Envato Staff
- Sold between 100 000 and 250 000 dollars
- Support Staff
- United States
- Author had a Free File of the Month
- Microlancer Beta Tester
- Beta Tester
- Interviewed on the Envato Notes blog
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?
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 5 000 and 10 000 dollars
- Uruguay
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.
- Envato Staff
- Sold between 100 000 and 250 000 dollars
- Support Staff
- United States
- Author had a Free File of the Month
- Microlancer Beta Tester
- Beta Tester
- Interviewed on the Envato Notes blog
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.
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 5 000 and 10 000 dollars
- Uruguay
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.
