Title: Additional parameters to shortcode
Last modified: April 19, 2018

---

# Additional parameters to shortcode

 *  Resolved [Allixria](https://wordpress.org/support/users/allixria/)
 * (@allixria)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/)
 * I would like to know if it’s possible somehow to “associate” the post ID of the
   post where the shortcode was generated, and save it as custom field in post meta.
 * Example: In a “single” page of a custom post type, I use the shortcode with pre-
   filled “to” id with the current post author. I would like to push the postID 
   also, and have it saved to the “new” message (as hidden field) ?
 * Thank you!

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

 *  [keya](https://wordpress.org/support/users/keya/)
 * (@keya)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10200794)
 * Which shortcode you are using? [https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_new_message_form/](https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_new_message_form/)?
 *  Thread Starter [Allixria](https://wordpress.org/support/users/allixria/)
 * (@allixria)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10200891)
 * I am using this one : fep_shortcode_message_to
 * The one you point to doesn’t seem to show for whatever reason.
 * I need to add custom parameters to this shortcode and then being able to have
   access to them in your hook ‘fep_action_message_after_send’
 * I could modify the core in your class form and inject a hidden field with a GET
   variable but it is still a core modif and I don’t like that..
 * Thank you very much for your insight!
 *  [keya](https://wordpress.org/support/users/keya/)
 * (@keya)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10203075)
 * for `fep_shortcode_new_message_form` Form will not show if current user can not
   send message to “to” user. So non logged in user or if logged in user and “to”
   user is same then no form will be shown.
 * For your case you can use `fep_after_form_fields` action hook to output a hidden
   field and access them using `fep_action_message_after_send` hook when message
   sent.
 *  Thread Starter [Allixria](https://wordpress.org/support/users/allixria/)
 * (@allixria)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10203102)
 * You are a life-saver!
 * About your other shortcode, I am logged in as Administrator.. And I made sure
   to check this role in “new message” sending access.
 * Not working :
    `echo do_shortcode('[fep_shortcode_new_message_form to="'. $post-
   >post_author . '" subject="I am making an offer"]');`
 * And the one I am using (working) :
    `echo do_shortcode('[fep_shortcode_message_to
   to="'. $post->post_author . '" subject="I am making an offer" text="Make an Offer"
   class="pm_offer"]');`
 *  Thread Starter [Allixria](https://wordpress.org/support/users/allixria/)
 * (@allixria)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10203117)
 * Oh.. The primary step is kind of missing..
 * How can I append the new parameters to the shortcode?
 * Thanks!
 *  Thread Starter [Allixria](https://wordpress.org/support/users/allixria/)
 * (@allixria)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10203288)
 * Nevermind about the primary step, I could make it work by placing the
 * `add_action('fep_after_form_fields', 'iv_pm_after_form_fields', 10,3);`
 * right before the shortcode generation instead of in functions.php file.
 * It seems your suggested shortcode to display inline message form isn’t working
   with userIDs.. Only with usernames..
 * So.. Everything is fine now, thank you very much!

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

The topic ‘Additional parameters to shortcode’ is closed to new replies.

 * ![](https://ps.w.org/front-end-pm/assets/icon-256x256.gif?rev=2309447)
 * [Front End PM](https://wordpress.org/plugins/front-end-pm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-pm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-pm/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-pm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-pm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-pm/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Allixria](https://wordpress.org/support/users/allixria/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/additional-parameters-to-shortcode/#post-10203288)
 * Status: resolved