GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Another Wordpress Integration Question (https://gfy.com/showthread.php?t=1032085)

bean-aid 07-28-2011 10:34 AM

Another Wordpress Integration Question
 
Somebody who is fluent with wordpress may know the answer.

I want to break up the home page of a wordpress site and add a programmed google map. Basically the map is a calculator and calls some php files.

How can the home page be modified to include this and have it stay so updates don't erase the code?

Inter-Sex 07-28-2011 12:39 PM

Create a post as sticky ?
Or hardcode it in your index.php ?

CS-Jay 07-28-2011 12:44 PM

Quote:

Originally Posted by Inter-Sex (Post 18314595)
Or hardcode it in your index.php ?

There ya go

CurrentlySober 07-28-2011 12:47 PM

Just delete wordpress entirely - Problems solved and job done... :2 cents:

MediaGuy 07-28-2011 12:49 PM

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

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

Inter-Sex 07-28-2011 02:17 PM

Harvey the wp-ninja :thumbsup

harvey 07-28-2011 02:21 PM

Quote:

Originally Posted by Inter-Sex (Post 18314937)
Harvey the wp-ninja :thumbsup

ha ha, no, not even close, Fris is the ninja, I'm just a little grasshopper :)

fris 07-28-2011 04:52 PM

many ways to do it, 1 is harveys way, im sure their are 20+ ways to do it, depending on your skill set, etc.

Ace_luffy 07-28-2011 05:07 PM

fris is a guru!!


All times are GMT -7. The time now is 10:05 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc