Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7935747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:01:00+00:00 2026-06-03T22:01:00+00:00

I’m making a website for a freelance educator, who makes his lectures on 3-4

  • 0

I’m making a website for a freelance educator, who makes his lectures on 3-4 different places. I would want to have a google map attached on bottom of the posts where these lectures are occurring.
Is it possible to have a selection of 3-4 radio buttons with these places in the Admin Post-editor, which would insert the google maps iframe through the theme?

Thanks for the help.

BR-:g

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:01:01+00:00Added an answer on June 3, 2026 at 10:01 pm

    There’s probably an easier way, but one way of doing this would be:

    1. create a custom post type (CPT) called Location
    2. install WP Geo (or similar) and enable it for your new CPT, so each one can be associated with a specific location, and
    3. Use the Posts 2 Posts plugin to associate the posts (lecture details) with a Location

    You may have to write a little code to determine the linked Location for a post, and call the WP Geo functionality to render the map, but it should be fairly straightforward if you have some coding experience.

    EDIT

    Ok, since you’re keen on custom fields, try this. Install the Advanced Custom Fields plugin, which’ll give you radio buttons for the custom fields (I don’t think it’s possible by default). Set up a new Field Group called “Course Details”, with a single field called “Location”. Associate it with a the appropriate entry type (page or post):
    Field definition

    The field will appear in the entry editor like this:
    Page Edit

    To get the map to appear in the code, add something like this to the template:

        <?php 
            switch (get_field('location')) {
                case "melbourne":
                    ?><iframe width="560" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=-37.81609,144.967175&amp;spn=0.011866,0.024033&amp;z=15&amp;output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=-37.81609,144.967175&amp;spn=0.011866,0.024033&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small><?php
                    break;
                case "london":
                    ?><iframe width="560" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=51.508101,-0.128059&amp;spn=0.018697,0.048065&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=51.508101,-0.128059&amp;spn=0.018697,0.048065&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small><?php
                    break;
                case "geneva":
                    ?><iframe width="560" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=46.198369,6.142302&amp;spn=0.020793,0.048065&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?gl=uk&amp;ie=UTF8&amp;t=m&amp;ll=46.198369,6.142302&amp;spn=0.020793,0.048065&amp;z=14&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small><?php
                    break;
            } ?>
    

    The code’s just a quick and ugly example, but it should give you an idea of how to use the field. The URLs come straight from Google Maps – I just clicked the link icon, followed by “Customise and preview embedded map” to get the size I was after.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.