1950 posts Do the Needful
  • Has been a member for 4-5 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • United States
  • Has attended an Envato Live event
  • Author had a Free File of the Month
  • Envato Studio (Microlancer) Beta Tester
  • Contributed a Blog Post
  • Beta Tester
+6 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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_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 been a member for 4-5 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • United States
  • Has attended an Envato Live event
  • Author had a Free File of the Month
  • Envato Studio (Microlancer) Beta Tester
  • Contributed a Blog Post
  • Beta Tester
+6 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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_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