Title: Import manipulate with shortcode / function
Last modified: October 7, 2020

---

# Import manipulate with shortcode / function

 *  Resolved [Francisco Mendieta](https://wordpress.org/support/users/franciscomendieta/)
 * (@franciscomendieta)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-manipulate-with-shortcode-function/)
 * I need to make an import for JSON url files.
    I will need scheduling and some
   data transformation. I tested the shortcode method to call a custom function 
   to change a source date field. But the shortocode is not running, and the function
   is not running. The shortcode: [wpie_function custom_function=”fm_getdate” ] 
   The documentation about using the shortcode: [http://plugins.vjinfotech.com/wordpress-import-export/documentation/add-shortcode/](http://plugins.vjinfotech.com/wordpress-import-export/documentation/add-shortcode/)
   The function in functions.php: function fm_getdate ( ) { $fecha = new DateTime();
   return $fecha->format(“Y-m-d H:i”); }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimport-manipulate-with-shortcode-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [vjinfotech](https://wordpress.org/support/users/vjinfotech/)
 * (@vjinfotech)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-manipulate-with-shortcode-function/#post-13508825)
 * Hi,
 * Thanks for getting in touch.
 *     ```
       [wpie_function custom_function="fm_getdate" date="{customdate[1]}" ]
   
       function fm_getdate( $attr = [], $content = "" ) {
               $date = isset( $attr[ "date" ] ) ? $attr[ "date" ] : "";
               if ( empty( $date ) || strtotime( $date ) === false ) {
                       return "";
               }
   
               return date( 'Y-m-d H:i', strtotime( $date ) );
   
       }
       ```
   
 * **{customdate[1]}** is your date field so replace it with your field from list
 * let me know if you have any questions
 * Thanks and have a nice day
    -  This reply was modified 5 years, 8 months ago by [vjinfotech](https://wordpress.org/support/users/vjinfotech/).

Viewing 1 replies (of 1 total)

The topic ‘Import manipulate with shortcode / function’ is closed to new replies.

 * ![](https://ps.w.org/wp-import-export-lite/assets/icon-256x256.png?rev=2129449)
 * [WP Import Export Lite](https://wordpress.org/plugins/wp-import-export-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-import-export-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-import-export-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-import-export-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-import-export-lite/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [vjinfotech](https://wordpress.org/support/users/vjinfotech/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/import-manipulate-with-shortcode-function/#post-13508825)
 * Status: resolved