• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Store
  • Support
  • My Account
  • Cart

9seeds

Building Custom WordPress Solutions | Plugin Development

 
  • Custom Development
  • Themes
  • Plugins
  • About
  • Contact
  • Blog

custom post type

Plugin Update: CPT Speakers

Posted on April 8, 2011

Back in January I released a plugin that we put together when we were building the site for WordCamp Las Vegas to make it easy to display a page of speakers for the event. It’s was pretty basic, but it served our purpose. We released it in hopes that we could save somebody else some time if they had a similar need.

Fast forward a couple months… I received an email from Josh Harrison letting me know he used the plugin for WordCamp Seattle’s site, and, he had made several improvements to it. Nice! He sent the updates with a note:

I made some modifications to your plugin CPT Speakers. Go ahead and use them if you’d like. Here is what I added:

  • template tags for speaker information with filters and paragraph formatting
  • shortcode to include the speaker information on an agenda (like what I put on http://wordcampseattle.org/agenda)
  • post thumbnails. I did not remove the old way of uploading images though.

After merging in the changes Josh made, it made perfect sense to go ahead and remove the old way we were dealing with speaker image uploads and instead use the featured image method.

WordPress Community
One of the greatest parts about working with the WordPress community is their willingness to give back. It would have been very easy for Josh to use the plugin we provided, make his changes, use it for his site and go about his merry way. But instead, when he was done he bundled up the changes and did his part to make the plugin better for the next person who comes along. That’s what it’s all about. Thanks, Josh!

You can download the latest version (1.1) from the WordPress plugin directory.

Upgrading
If you are planning to upgrade from a previous version, keep in mind that you will need to go back and add the speaker’s photo as the featured image for their post as we’ve switched the way photos are handled. Also, you will need to manually move single-speakers.php and template_speakers.php from the plugin folder to your active theme folder.

Styling
After you install the plugin you will want to add some styling to it. There is no inline styling, so you will need to some CSS to your existing style sheet. You can use the following as a base and change it up as needed:

#speakers {
font-size: 12px;
min-height: 300px;
}

#speaker_image_section {
width: 150px;
float: left;
height: 300px;
margin-right: 18px;
}

#speaker_image img {
margin-top: 5px;
border: 1px solid #333;
padding: 3px;
background: #0099cc;
}

#speaker_name {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}

#speaker_url {
text-align: center;
}

#speaker_twitter_url {
text-align: center;
}

#speaker_pres_title {
margin: 5px 0px 5px 0px;
font-size: 13px;
}

#speaker_pres_description {
font-size: 12px;
font-family: arial, helvetica;
line-height: 16px;
}

#speaker_session_description {
font-size: 12px;
line-height: 18px;
}

#speaker_image_section_single {
width: 150px;
float: left;
height: 600px;
margin-right: 18px;
}

#speaker_image_section_single img{
margin-top: 5px;
border: 1px solid #333;
padding: 3px;
background: #0099cc;
}

#pres_url {
text-align: center;
}

.speaker_snippet .thumbnail {
float:left;
display:inline;
margin-right:10px;
border-bottom:0;
}
#content .speaker_snippet .thumbnail a {
border-bottom:0;
}
.speaker_snippet .name {
font-weight:bold;
line-height:16px;
}
.speaker_snippet .title {
font-size:0.9em;
line-height:15px;
}

Continue Reading

john

    More by john

    Footer

    Get in Touch

    • New Project Inquiry
    • Product Support and General Inquiry
    • Store Purchase Terms and Conditions
    • Store FAQ
    • Cookie Policy
    • Privacy Policy

    Our Services

    • Custom WP Development
    • Theme Store
    • Plugin Store

    WordPress Plugins for Sale

    • Time Tracker
    • Authorize.net SIM Gateway

    WordPress Plugins for Free

    • Simple Calendar
    • WP Chargify
    • Facebook
    • Twitter
    • LinkedIn
    • WordPress
    • GitHub

    Copyright 2021 | 9seeds, LLC