harvey |
07-28-2011 02:02 PM |
Quote:
Originally Posted by MediaGuy
(Post 18314627)
If you hardcode it into you index.php (in your menu goto Appearance/Editor and change to default style sheet), you'd have to maybe limit the number of posts on the index page to one or two if you want to put the map below the main content, otherwise it will appear a long scroll down from first loading.
You could also hardcode it above the main content so it's the first thing they see - but I don't think you can break up the posts themselves with the map - unless you want it occurring beneath every post?
:D
|
first paragraph is true. Second isn't, it's very easy to "break" into the loop, but I don't know if this is what he wants, to me it looks like he wants what you say in the first paragraph
anyway, a neat way to achieve this without affecting flow is as follows:
first add this code between <head></head> tags:
Code:
<script language="javascript">
function toggle() {
var ele = document.getElementById("hideMap");
var text = document.getElementById("showMap");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "show";
}
else {
ele.style.display = "block";
text.innerHTML = "hide";
}
}
</script>
then, right before the loop starts (in index.php), add this:
Code:
<a id="showMap" href="javascript:toggle();">Show Map</a>
<div id="hideMap" style="display: none">{insert your map code here}</div>
and that's it, now you can hide and show your map without affecting the flow! :thumbsup
|