Thanks for checking out Theadsensefamily-Online Money Making Forum In Nigeria!

You're currently viewing the forum as a guest which gives you limited browsing options, why don't you take 37 seconds and Sign up. Once you do you'll be able to enjoy all the great benefits of membership like
  • Ability to interact with other Theadsensefamily-Online Money Making Forum In Nigeria members
  • Create new discussions
  • Reply to existing discussions
  • Modify your profile to have a custom avatar, signature and more!
  • To many membership perks to list! Join today for free!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

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

Loading...
Tags:
  1. Andy

    Andy Vip Member Jr.Vip

    Messages:
    178
    Likes Received:
    91
    Trophy Points:
    44
    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...