980px

WEB170 » 10) Create a Pull-Quote for Your Site Using Custom Fields

Let’s say… I want to put a quote in my sidebar on my pages. But, I only want to put the quote in the sidebar if one exists. How would I do that? Use Custom Fields in your WordPress Site!

Requirements:

  1. Go to your “About” page and set up a custom field…
  2. First, if you don’t see your custom fields, go to your screen options and show them on your screen.
  3. Once you have turned them on… 1) fill in the name filed, 2) fill in the value field and 3) click add custom field.
  4. In your sidebar.php file, use an “if” statement to ask is the key exists using the Get Post Meta function.
  5. Write the markup to display your quote and place the value of custom filed’s key in an element.
  6. Give your quote a bit of style to make it look nice.
  7. I will check your Protosite’s “View” and “Code” links from your Client Staging Area according to the class Schedule (Spring) to review and grade.

This portion of the Premium Design Works website is written by Mike Sinkula for the Web Design & Development students at Seattle Central College and the Human Centered Design & Engineering students at the University of Washington.

10 Comments:

  1. Han Sue Yu says:

    11) Create a Pull-Quote for Your Site Using Custom Fields
    I just styled the Pull-Guote, and resubmit it now.

  2. Han Sue Yu says:

    11) Create a Pull-Quote for Your Site Using Custom Fields

  3. Manitasha Arora says:

    Hi Mike,
    I tried debugging for pull-quote but there were no error logs regarding custom field :(

  4. Alec Martin says:

    I did finish the custom field/feature images as well. Don’t forget to mark me off for that! thank you

    http://alecmartin25.com/web170/web170-staging-area.html

  5. Shihpei Lin says:

    webaff.net/web170/

  6. Dwayne Linde says:

    This is now complete, and the code has been synced to GitHub.

    http://lindese.com/web170/wordpress-sp16/about/

    Dwayne

Trackbacks:

Leave a Comment:

Don't forget to get your Globally Recognized Avatar.

css.php