Jason Weber
Jason Weber

Reputation: 5741

Why is adding this html snippet in a php page working, but disabling other Wordpress functions?

There's a snippet of code near the top my WP theme's index.php (which other themes have as home.php). It looks like this:

<?php } ?>
<div class="postwrap">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>

So, to insert a slideshow and a news ticker to my site's home page, I altered that, and turned it in to this:

<?php } ?>
<div class="postwrap">

<script type="text/javascript" src="http://www.domain.org/wp-content/themes
/flexibility3/js/richhtmlticker.js">
</script>

<style type="text/css">
.tickerstyle{width:200px; height:243px; border:1px solid black; background:#adcbff; 
padding:8px; overflow:hidden; margin-left:0px; font-size:12px; font-weight:bold;}
.messagediv{display: none;background:#d7e2f7;}
</style>

<table>
<tr>
<td style="vertical-align:top">
<div id="myhtmlticker" class="tickerstyle">
<strong>What's News?</strong><br />
<div class="messagediv">
<strong><a href="http://www.domain.org/medicaid-medicare/">Medicaid, Medicare Being 
Slashed</a></strong><br /><br />
Medicaid and Medicare are two governmental programs that provide medical 
and health-related services to specific groups of people in the United States.  But 
they're in danger of the impending spending cuts. Read more ... 
</div>
</div>
</td>
<td style="vertical-align:top">
<?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); } ?>
</td>
</tr>
<tr>
<td colspan="2">
<h2>More News &amp; Issues:</h2>
</td>
</tr>
</table>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

And so on ... Then the blog excerpts show underneath. The ticker and slideshow are working perfectly. But for some reason, this screwed up a plugin -- a contact plugin that's supposed to float at the side of the page.

Now, the contact plugin works on every other page or post on my blog, but on the home page, it's "stuck" in my right sidebar and you can't enter any values (email, name, subject, message, etc.). So I don't think it's an issue with the plugin, but rather the html markup I put in that page.

Does anybody know why entering the html code may have screwed up that plugin -- but just for the home page? And if so, any guidance you could offer on how to rectify this issue would be greatly appreciated!

EDIT:

I was mistaken in thinking that it was the html markup that caused this issue. I believe the issue was caused by me importing posts from a separate blog domain. But when I do a 2011 or 2012 on it, things work fine. But the theme has no support. So I think I'll have to rephrase my question in another thread, or figure it out on my own. So I asked a moderator for this thread to be closed.

Upvotes: 0

Views: 136

Answers (1)

david.binda
david.binda

Reputation: 1068

Maybe a CSS deal? Slideshow with it's z-index or position absolute is laying on the top of the constact form? You can check it with Firebug, Developer Tools, Dragonfly...whatever your browser provides for CSS debugging...

Upvotes: 1

Related Questions