Add content of a wordpress page in colorbox
-
Hello,
I want to place the content of a page in a colorbox.
Here is the code:
`$href = get_permalink(get_option(‘ProjectTheme_set_values_page_id’));
echo ‘<link media=”screen” rel=”stylesheet” href=”‘.get_bloginfo(‘template_url’).’/css/colorbox.css” />’;
echo ‘<script src=”‘.get_bloginfo(‘template_url’).’/js/jquery.colorbox.js”> </script>’;
?>
<script src=”//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery- ui.min.js”></script>
<script>
var $ = jQuery;
$.colorbox.settings.load = true;
$(document).ready(function(){
$.colorbox({closeButton:false, overlayClose:false, escKey:false, iframe:true,
href:”$href”} );
});
</script>`
It appear a small colorbox without any contentt. What is wrong whih this code? Which is the correct value for href in order to display the page?
- The topic ‘Add content of a wordpress page in colorbox’ is closed to new replies.