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 7 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 7 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by