This topic has 1 reply, 2 voices, and was last updated 8 years by Laura.

  • Author
  • #92653
     wiseguys72
    Participant

    I have been trying to try different codes with this theme and cant seem to get anything to work, for example, i would create and new page and then insert code from google maps api samples such as:

    COPY CODE
    <span class="dec"><!DOCTYPE html></span><span class="pln">
    </span><span class="tag"><html></span><span class="pln">
      </span><span class="tag"><head></span><span class="pln">
        </span><span class="tag"><title></span><span class="pln">Simple Map</span><span class="tag"></title></span><span class="pln">
        </span><span class="tag"><meta</span> <span class="atn">name</span><span class="pun">=</span><span class="atv">"viewport"</span> <span class="atn">content</span><span class="pun">=</span><span class="atv">"initial-scale=1.0"</span><span class="tag">></span><span class="pln">
        </span><span class="tag"><meta</span> <span class="atn">charset</span><span class="pun">=</span><span class="atv">"utf-8"</span><span class="tag">></span><span class="pln">
        </span><span class="tag"><style></span><span class="pln">
          html</span><span class="pun">,</span><span class="pln"> body </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">height</span><span class="pun">:</span> <span class="lit">100%</span><span class="pun">;</span><span class="pln">
            </span><span class="kwd">margin</span><span class="pun">:</span> <span class="lit">0</span><span class="pun">;</span><span class="pln">
            </span><span class="kwd">padding</span><span class="pun">:</span> <span class="lit">0</span><span class="pun">;</span><span class="pln">
          </span><span class="pun">}</span><span class="pln">
          </span><span class="pun">#</span><span class="pln">map </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">height</span><span class="pun">:</span> <span class="lit">100%</span><span class="pun">;</span><span class="pln">
          </span><span class="pun">}</span><span class="pln">
        </span><span class="tag"></style></span><span class="pln">
      </span><span class="tag"></head></span><span class="pln">
      </span><span class="tag"><body></span><span class="pln">
        </span><span class="tag"><div</span> <span class="atn">id</span><span class="pun">=</span><span class="atv">"map"</span><span class="tag">></div></span><span class="pln">
        </span><span class="tag"><script></span><span class="pln">
    
    </span><span class="kwd">var</span><span class="pln"> map</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">function</span><span class="pln"> initMap</span><span class="pun">()</span> <span class="pun">{</span><span class="pln">
      map </span><span class="pun">=</span> <span class="kwd">new</span><span class="pln"> google</span><span class="pun">.</span><span class="pln">maps</span><span class="pun">.</span><span class="typ">Map</span><span class="pun">(</span><span class="pln">document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">'map'</span><span class="pun">),</span> <span class="pun">{</span><span class="pln">
        center</span><span class="pun">:</span> <span class="pun">{</span><span class="pln">lat</span><span class="pun">:</span> <span class="pun">-</span><span class="lit">34.397</span><span class="pun">,</span><span class="pln"> lng</span><span class="pun">:</span> <span class="lit">150.644</span><span class="pun">},</span><span class="pln">
        zoom</span><span class="pun">:</span> <span class="lit">8</span><span class="pln">
      </span><span class="pun">});</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    
        </span><span class="tag"></script></span><span class="pln">
        </span><span class="tag"><script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"https://maps.googleapis.com/maps/api/js?key=</span><var class="apiparam replaceable-credential"><span class="atv">my api key here </span></var><span class="atv">&callback=initMap"</span><span class="pln">
            </span><span class="atn">async</span> <span class="atn">defer</span><span class="tag">></script></span><span class="pln">
      </span><span class="tag"></body></span><span class="pln">
    </span><span class="tag"></html>
    
    this will not display anything, just the header and footer of the theme page. I have also tried code from other websites that will not work, what could stop these codes from working within the theme? I am using GoDaddy for the hosting not sure if that would matter though. Thank you for any help you can provide.
    </span>
    #93070
     Laura
    Moderator

    Hello, just add it to header.php ( copy it from main theme folder and paste it at the child theme foler, then edit and ad the codes below <head>
    Let me know if it helps 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?