Title: Custom Field String
Last modified: October 25, 2021

---

# Custom Field String

 *  [glaukabazi](https://wordpress.org/support/users/glaukabazi/)
 * (@glaukabazi)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-field-string/)
 * Dear,
 * I have made a website which uses WP GRID BUILDER. In the grid builder i have 
   added the custom field options which gets the data from a custom field i have
   created called ‘datapostimi’. What i want to know is that is it possible to get
   a string in this custom field (in posts) so i can use a differen format and not
   the one wordpress offers.
 * The data format i want to use is for example just 20 Aug and this should show
   in this form
 * 20
    Aug
 * I hope i was clear, and i am sorry if i was not.
 * Thank you very much in advance.

Viewing 1 replies (of 1 total)

 *  Thread Starter [glaukabazi](https://wordpress.org/support/users/glaukabazi/)
 * (@glaukabazi)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-field-string/#post-15003621)
 * I have found a solution by creating a custom shortcode and then using it.
 * But i am having trouble with this code i’ve created. I have been doing this for
   a long time and maybe this is something simple but my brain isn’t working.
 *     ```
       <?php 
   
       function fshk_fakulteti_menu_shortcode() {
        echo '<div class="total">
           echo '<div class="example">' . get_the_date( 'd' ) . "<br>";
   
          echo '<div class="example">' . get_the_date( 'M' ) . ;
   
          </div>';
       }
       add_shortcode('datapostimi', 'fshk_fakulteti_menu_shortcode');
   
       ?>
       ```
   
 * Please, anyone? what is wrong here
 * it alerts
    ** Parse error:** syntax error, unexpected token “class”, expecting“,”
   or “;” in C:\xampp\htdocs\s3\wp-content\themes\twentynineteen\glauk-shortcodes.
   php on line 6

Viewing 1 replies (of 1 total)

The topic ‘Custom Field String’ is closed to new replies.

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [date format](https://wordpress.org/support/topic-tag/date-format/)
 * [string](https://wordpress.org/support/topic-tag/string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [glaukabazi](https://wordpress.org/support/users/glaukabazi/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/custom-field-string/#post-15003621)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
