Title: Shortcode for multi projects
Last modified: July 20, 2021

---

# Shortcode for multi projects

 *  Resolved [Passl](https://wordpress.org/support/users/passl/)
 * (@passl)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/)
 * Hey,
    can I show multiple projects and use Filters?
 * I have a project with all services (myservice1, myservice2…) and one with a Service
   with city (eg. myservice-berlin).
 * Now on a separate MPG Project only with cities I want show all services in this
   City.
    So I must use a Join like in MySQL.
 * eg. My third project has only the city (eg. Berlin, Hamburg etc.)
    On these pages
   I want to show all the Services in this City. My idea was to have a shortcode
   or a function to get all projects and Filter.
 * Is it possible?
    -  This topic was modified 4 years, 10 months ago by [Passl](https://wordpress.org/support/users/passl/).

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

 *  [Oleksandr Lysyi](https://wordpress.org/support/users/lysyiweb/)
 * (@lysyiweb)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/#post-14679889)
 * Hi, Passl
 * No, it’s not possible to join a few others projects by field value.
    The closest
   functionality that you asking for, it’s [mpg_match]
 * Docs here: [https://docs.mpgwp.com/article/32-how-do-i-generate-list-of-nested-pages](https://docs.mpgwp.com/article/32-how-do-i-generate-list-of-nested-pages)
 * Regards
 *  Thread Starter [Passl](https://wordpress.org/support/users/passl/)
 * (@passl)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/#post-14680911)
 * I’ve created a custom shortcode for these function. I used the mpg_projects DB
   table and iterate trough the entries.
    But now I have another problem. In my 
   shortcode I can’t use the mpg_city variable of my CSV. Is there another option
   to get the current url or MPG variable?
 *  [Oleksandr Lysyi](https://wordpress.org/support/users/lysyiweb/)
 * (@lysyiweb)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/#post-14681383)
 * If you would like to replace shortcodes in a string – use `MPG_CoreModel::mpg_shortcode_replacer(
   $string_with_shortcodes, $project_id);`
 * Use this method to get requested URL:
    `MPG_Helper::mpg_get_request_uri();`
 *  Thread Starter [Passl](https://wordpress.org/support/users/passl/)
 * (@passl)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/#post-14681947)
 * Ok. I get the url by using $wp->request and extracted the url in an array.
    Then
   do something more 🙂 Ist works.

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

The topic ‘Shortcode for multi projects’ is closed to new replies.

 * ![](https://ps.w.org/multiple-pages-generator-by-porthas/assets/icon-128x128.
   gif?rev=3274397)
 * [MPG – Multiple Page Generator, Bulk Landing Pages & Programmatic SEO](https://wordpress.org/plugins/multiple-pages-generator-by-porthas/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-pages-generator-by-porthas/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-pages-generator-by-porthas/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-pages-generator-by-porthas/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-pages-generator-by-porthas/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-pages-generator-by-porthas/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Passl](https://wordpress.org/support/users/passl/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-multi-projects/#post-14681947)
 * Status: resolved