Welcome to Theadsensefamily Forum

Dear Guest Welcome To Theadsensefamily!

Biggest Internet Marketing Forum In Nigeria!

Please Sign up Below!

How to display Your Mood Or Music You’re Listening To On WordPress

Discussion in 'Help, Niches & Tutorials' started by Theadsensefamily, Nov 28, 2017.

Tags:
  1. Theadsensefamily

    Theadsensefamily Jr.Vip Jr.Vip

    What this feature doez is it allows users to display their current mood and the music they were listening to while blogging.
    Even though I wouldn’t use this feature on my blog, I figure many bloggers would be interested in knowing how to do this in WordPress.
    lets role.....Open your single.php file (or modify your index.php file), and paste the following code anywhere within the loop:

    Code:
    $customField = get_post_custom_values("mood"); if (isset($customField[0])) { echo "Mood: ".$customField[0];
    }
    
    Save the file. Now, when you write a new post, just create a custom field called mood, and type in your current mood as the value.

    Note:This is a very basic use of custom fields, not all that different from the well-known hack for displaying thumbnails beside your posts’ excerpts on the home page. It looks for a custom field called mood. If the field is found, its value is displayed.
     
    Last edited: Dec 8, 2017

Share This Page

Loading...
Loading...