I am trying to include some PHP inside a piece of jQuery code.
The PHP pulls a static block from within WordPress and I need a way to add this into the jQuery. Each time I add it in the block either doesn't show at all or the contents don't show.
The code which gets the PHP is
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cat_block')->toHtml() ?>
And the jQuery is
jQuery(document).ready(function () {
jQuery(".catalog-category-view .last li.item:nth-child(7)").after("<li class='category-block-call'>PHP NEEDS TO GO HERE</li>");
});
As you can see I need to get the PHP code or the contents of the PHP code inbetweeen the li tags in the jQuery.