Title: additional options
Last modified: August 31, 2016

---

# additional options

 *  Resolved [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/)
 * Is it possible to get the following options
    1.For each post is generated google
   map with points of post and routes as selected in the setting of the plugin in
   the format <iframe src=”[https://www.google.com…&#8230](https://www.google.com…&#8230);.
   ></iframe> as it does when google generates the code for insert map on the site.
   This code is inserted in a custom field with the name that specify in the plugin
   settings (as set in the settings the width and height of the map, for example
   height 300, width 100%). 2.For all categories, automatically generated maps in
   the format <iframe src=”[https://www.google.com…&#8230](https://www.google.com…&#8230);.
   ></iframe> and inserts in user-inserted custom field with the name that you specify
   in the plugin settings (in the general case, is another name in another table!)
   and set the configuration parameters of the width and height of the map, on the
   example height 300, width 100%) but this field belongs to the table name that
   is also specified in the settings pagina. In my case this table is generated 
   by the plugin “Category Meta plugin” and called “wp-termsmeta” (this table specifies
   each category (id) meta field with the name specified by the user)
 * [https://wordpress.org/plugins/codepeople-post-map/](https://wordpress.org/plugins/codepeople-post-map/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013426)
 * Hi,
 * Answering to your questions:
 * Q: For each post is generated google map with points of post and routes as selected
   in the setting of the plugin in the format <iframe src=”[https://www.google.com…&#8230](https://www.google.com…&#8230);.
   ></iframe> as it does when google generates the code for insert map on the site.
   This code is inserted in a custom field with the name that specify in the plugin
   settings (as set in the settings the width and height of the map, for example
   height 300, width 100%).
 * A: In reality the solution is simpler. Inserts the piece of code below in the
   template used by your active theme to display the posts:
 * `<?php echo do_shortcode('[codepeople-post-map width="100%" height="300"]'); ?
   >`
 * Q: For all categories, automatically generated maps in the format <iframe src
   =”[https://www.google.com…&#8230](https://www.google.com…&#8230);.></iframe> 
   and inserts in user-inserted custom field with the name that you specify in the
   plugin settings (in the general case, is another name in another table!) and 
   set the configuration parameters of the width and height of the map, on the example
   height 300, width 100%) but this field belongs to the table name that is also
   specified in the settings pagina. In my case this table is generated by the plugin“
   Category Meta plugin” and called “wp-termsmeta” (this table specifies each category(
   id) meta field with the name specified by the user)
 * A: Similar to the previous answer, in the template file used by your active theme
   to display the archive pages (the pages of categories are archive pages), you
   should insert a map’s shortcode, but this time, using the attributes to select
   the category whose points will be loaded in the map.
 * Pay attention, some plugins call to their own taxonomies as “category” but its
   real name (the name managed by WordPress) is different, in this case you should
   use in the shortcode the attribute: “taxonomy”. For example, if the new taxonomy
   is called my_custom_taxonomy, and you want to display in the map the points defined
   in the posts with the taxonomy: “my_custom_taxonomy” assigned, and with the value:“
   my_value”, the shortcode would be:
 * `[codepeople-post-map taxonomy="my_custom_taxonomy" my_custom_taxonomy="my_value"]`
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013561)
 * You don’t quite understand. I’m not inserting it in the body of the post.I insert
   the maps instead of the header (using additional code). using as a data source
   custom fields
    [http://selftrips.ru/2016/01/25/24156](http://selftrips.ru/2016/01/25/24156)
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013570)
 * Hi,
 * I’m sorry, but from the public website is not possible to know the structure 
   of the shortcode, however, if you want to use a structure of shortcode for single
   pages, and another different for the archive pages from the same template file,
   you simply should use a conditional statement to know the type of page where 
   it is used:
 *     ```
       if(is_singular())
       {
       echo do_shortcode( .... );
       }
       else
       {
       echo do_shortcode( .... );
       }
       ```
   
 * The piece of code, allows insert a different shortcode (you should replace the….
   symbols by the correct structure of the shortcodes) for singular pages or for
   pages with multiple entries. The is_singular function returns true for posts,
   pages, or attachments, so, if you want to display the map only in posts, use 
   is_single(), for pages: is_page(), for attachments: is_attachment()
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013582)
 * It did not fit me. Could you provide some form with input any [codepeople-post-
   map …] and output cod of google map in iframe format?
 *  Many of the sites historically built to use google code. If you make in one 
   form or another, the ability to get maps iframe, this will facilitate the migration
   to your plugin.
 * And very important question. If after building the map in the iframe format will
   be amended in the original data (points added or new posts with dots) map to 
   be displayed in iframe will change automatically or need to do on the new iframe
   code? If the last use of the plugin for me is meaningless.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013588)
 * Hi,
 * An iFrame tag load another webpage into the DOM of the main page, each of them
   in their own context, so, if you want load the map through an iFrame, you should
   insert a the map in a webpage without other tags, only the map’s shortcode, generating
   your own template files in the theme active in your website, and then, to load
   it through the iFrame the pages using the new templates, but this behavior is
   not part of the plugin.
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013590)
 * Could you help me to adapt your plugin to use on my website? I put the map in
   iframe format in the header of my site with the following code
 * >  if ( is_category() and $althimg = get_terms_meta(get_query_var(‘cat’), ‘**
   > my_map**‘, true) ) {
   >  echo $althimg; unset ($himgsrc); }
 * where “**my_map**” the name of the meta field stores the code of the map in the
   format of iframe with width 100% and height 300. How can this code be modify 
   to get the same result with your code <?php echo but this do_shortcode(‘[codepeople-
   post-map width=”100%” height=”300″]’); ?>
 * Or it isnt possible?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013594)
 * Hi,
 * The “get_terms_meta” function is not part of WordPress kernel, so, I don’t know
   exactly the value of the $althimg variable, furthermore the logical operator “
   and” in PHP is represented by a double ampersand symbol “&&”. However, if you
   are using a custom taxonomy, for example, xyz, and you want to display in the
   map all points created in the pages or posts associated the taxonomy: xyz, where
   term’s slug is for example: abc, the shortcode would be:
 * `echo do_shortcode('[codepeople-post-map taxonomy="xyz" xyz="abc" width="100%"
   height="300"]');`
 * So, if you are referring to the “get_term_meta” function, and the $althimg variable
   contains the term, the shortcode would be:
 * `echo do_shortcode('[codepeople-post-map taxonomy="my_map" my_map="'.$althimg.'"
   width="100%" height="300"]');`
 * and that’s all.
 * I’m sorry, but you’re needing a custom coding service, and not simply a support.
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013616)
 * doesnt work
 * > Tempera: theme-functions.php (includes/theme-
   >  functions.php)
 * >  /**
   >  * Adds title and description to heaer * Used in header.php */ function
   > tempera_title_and_description() { $temperas = tempera_get_theme_options(); 
   > foreach ($temperas as $key => $value) { ${“$key”} = $value ; } // Header styling
   > and image loading // Check if this is a post or page, if it has a thumbnail,
   > and if it’s a big one global $post;
   >  if (get_header_image() != ”) { $himgsrc=get_header_image(); }
   >  if ( is_singular()&&
   > has_post_thumbnail( $post->ID ) && $tempera_fheader == “Enable” && ( $image
   > = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘header’))&&
   > $image[1] >= HEADER_IMAGE_WIDTH ) : $himgsrc= $image[0]; endif;
   >  if ( is_singular() ) {
   >  **echo do_shortcode(‘[codepeople-post-map]’);** unset(
   > $himgsrc); }
 * I need some way get iframe!((
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013617)
 * Hi,
 * As I said in a previous entry, an iFrame loads another page in its own context:
 * `<iframe src="..."></iframe>`
 * In the previous tag you should replace the “…” symbols by the URL you want load
   into the iFrame.
 * You should not insert other tags directly in to the iFrame.
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013618)
 * Your plugin can provide URL with map for iframe?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013621)
 * Hi,
 * In our plugin the maps are not custom post types by itself, so, you don’t have
   an URL associated to a map. You should insert a map in a post/page, and use its
   URL in the iFrame.
 * That is the reason I don’t understand the reason why you want to use iframes,
   instead to insert the shortcodes directly in the webpage.
 * Best regards.
 *  Thread Starter [selftrips-ru](https://wordpress.org/support/users/selftrips-ru/)
 * (@selftrips-ru)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013622)
 * Look [http://selftrips.ru/2016/01/25/24156](http://selftrips.ru/2016/01/25/24156)
   for example, or [http://selftrips.ru/2016/01/23/24099](http://selftrips.ru/2016/01/23/24099)
   
   Map (click able) on the top of the post. Maps is important and has 1st place!
   But this I do it by my hands – use google service to get code for site (iframe)
   copy and insert in post (using custom field)
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013623)
 * Hi,
 * As I said previously you can get the same behavior simply inserting the shortcode
   directly in the header template.
 * Best regards.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘additional options’ is closed to new replies.

 * ![](https://ps.w.org/codepeople-post-map/assets/icon-256x256.jpg?rev=980165)
 * [CodePeople Post Map for Google Maps](https://wordpress.org/plugins/codepeople-post-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/codepeople-post-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/codepeople-post-map/)
 * [Active Topics](https://wordpress.org/support/plugin/codepeople-post-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/codepeople-post-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/codepeople-post-map/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/additional-options-2/#post-7013623)
 * Status: resolved