WordPress.org

Ready to get started?Download WordPress

Forums

How to place enter in function.php? (2 posts)

  1. Avinash Bhageloe
    Member
    Posted 3 years ago #

    I have a code :
    // [date]
    function displaydate(){
    return date('F jS');
    }
    add_shortcode('date', 'displaydate');
    // end date

    This displays in my page like: June 13th
    But i want is like:
    June
    13th

    I tried to use
    tags and \n in the code.
    If i am useing \n than i get something like this:

    June
    n13th

    How do i get rid of the "n"?

  2. s_ha_dum
    Member
    Posted 3 years ago #

    return date('F<b\r />jS');

    ... pretty sure but untested.

Topic Closed

This topic has been closed to new replies.

About this Topic