embed HTML5 interactive animation in Category
-
Hello, I’ve done a ton of searching on this and no luck, plus I’m much more of a graphic designer than web designer, so please forgive my noob-ish understanding of code. I can get it to work in Pages and Posts using the below code, but in Category it just displays the code, which I enter into Description, as text. I have a child theme, and have created a category.php for it with this code:
<?php get_header(); if(have_posts()) : ?> <div id="post"> <div class=" post-list-content"> <h1><?php echo single_cat_title('', false); ?></h1> </div> </div> <?php if (is_category('Room Signs')) : ?> <[iframe src="http://technologyvcc.com/GOOGLE_DESIGNER_TEST/GOOGLE-DESIGNER-TEST.html" width="1200" height="600"] shortcode> <p>This is the text to describe Room Signs</p> <?php elseif (is_category('Kiosks')) : ?> <p>This is the text to describe Kiosks</p> <?php else : ?> <p>This is some generic text to describe all other category pages, I could be left blank</p> <?php endif; ?> <?php get_template_part('content', 'postlist'); else : get_template_part('content', 'none'); endif; get_footer(); ?>This is the code that works on Posts and Pages:
[iframe src="http://technologyvcc.com/GOOGLE_DESIGNER_TEST/GOOGLE-DESIGNER-TEST.html" width="1200" height="600"] shortcodeI’ve also added the below to a new functions.php in my child theme:
<?php add_shortcode('iframe', 'ag_iframe'); function add_iframe($initArray) { $initArray['extended_valid_elements'] = "iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]"; return $initArray; } add_filter('tiny_mce_before_init', 'add_iframe');Any help is greatly appreciated, thanks!
The blog I need help with is: (visible only to logged in users)
-
That site is not being hosted by WordPress.COM and we do not provide support for it here. You are posting to the wrong support forum.
WordPress.com and WordPress.org are completely separate, have different log-ins and run different versions of some themes with same names. http://support.wordpress.com/com-vs-org/
We provide support only for free hosted WordPress.COM blogs and not for WordPress.org software installs. If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there and receive advice from WordPress.ORG bloggers.
-
-
- The topic ‘embed HTML5 interactive animation in Category’ is closed to new replies.