In this session, we add another Custom Post Meta of “Court References” to the Custom Post Type “Course Case”.
Rick: Hey, Reese.
Reese: Another day in paradise.
Rick: It certainly is. So are we ready to dive into it?
Reese: You bet.
Rick: Okay. So what we’re doing now is… because I feel like I’ve been off my game tonight. What we’re doing now is continuing our little project of these custom post types. And so we come on over to your dashboard and you have court cases and those court cases are all in here. And court cases is a custom post type and if we look at the way they’re described, they are described court-cases so that’s the kind of post type it is which is something that we’ll need here in just a minute. And so what we’re going to do then… the other thing we need to do is we need to add some post meta to these court cases which I don’t think you have done yet.
Reese: No, sir. I did not.
Rick: Okay so we’ll add a couple of bits of post meta using Verve Meta Boxes. We’re going to create a box and… oh. Okay we’re going to create a new meta box and this is going to be called court case references. It’s going to apply to court cases and we’re going to create that box. We’re going to go ahead and delete this box that I created inadvertently. So we’re going to have 2 fields. We’re going to have a text field that is going to be called… let’s see, we’re going to call it code name and this will… this is the shortcode name of the case. And then we’re going to create another box which is another field which is a text field and it’s going to be called full reference and this is the full reference. And actually, in this case, that’s all we’re doing.
Reese: Well then, the only other thing we might want is a short reference but the short reference…
Rick: The short reference is the title.
Reese: Right. But the short reference will also have a link back to the case.
Rick: Well, that’s not a piece of post meta though. That’s a piece of code so we’ll be creating that.
Reese: The short reference, for instance, if you’re dealing with a case of Cohan v Commmissioner of Internal Revenue, the short reference will just be Cohan which is different from the title.
Rick: Okay well, let’s do that then. Let’s add a short reference. So are we ever going to refer to the title?
Reese: In the… as part of the anchor information, yeah.
Rick: Okay. So…
Reese: It’ll be part of the… you know, the title field in the anchor tag.
Rick: Okay well, we don’t need that as a… that’s fine. We’re just going to update this then. We’re going to come over and take a look at our court cases.
Reese: And 2 good ones to work with will be Appeal of McKenna and Appeal of Frey because of the Appeal of Frey refers to the McKenna case.
Rick: So is there any place in here where you have a full reference and a short reference?
Reese: Not in the McKenna case since it’s one of the very, very, very earliest cases. But if you look at the Appeal of Frey case, yes.
Rick: Okay so what’s its code name?
Rick: Okay, what’s its full reference?
Reese: That would be the site tag, Appeal of McKenna.
Rick: What are the chances you emailed this to me once upon a time?
Reese: Yes and it’s one…
Rick: Did you do that?
Reese: I’m sorry?
Rick: Did you ever email that to me?
Reese: Yes I did and I also posted it in my forum answer.
Reese: Plus the reference to it is 1B…
Rick: Yeah, I’m not going to type it out. I’m just going to find a copy and paste it.
Reese: Here, I can send it to you real quick. I can probably do that faster.
Reese: I just sent to you.
Rick: What do you mean you just sent it to me?
Reese: On the little text messaging box on the webinar stuff, the chat?
Reese: Where it has questions and I can type my question?
Rick: Okay so, full reference, Appeal of McKenna. Short reference… what’s the short reference going to be?
Rick: Just McKenna?
Reese: Well, it’ll be just like everything above with the citation italicized and all that but instead of Appeal of McKenna, it would just be McKenna.
Rick: So it still gets a citation in it.
Reese: Correct. So it’s the cite McKenna cite. But it will need to link to the exact same…
Rick: Well, the link is something entirely apart from this so we don’t care about the link at the moment. The link is something that’s saved by WordPress. WordPress already knows the link. All we have to do is relate this to the link. So we don’t want to type the link or store the link or save the link. We just want to access the link from WordPress.
Reese: This is… what you have typed in is what should be displayed between the anchor tags.
Rick: Right. So that’s the Appeal of McKenna. Now let’s just do one more of those. What was the other one that you want to do? Appeal of Frey?
Reese: Right. If you go and you take a look at Appeal of Frey…
Rick: Actually, you didn’t give me the Appeal of Frey information. Let’s see, do you have Eisner v. McComber? I’ve got Town v Eisner but I don’t have that. Cohan v. Commissioner of Internal Revenue… no, you didn’t give me that one. Well okay, we’re just going to use one then because all the references that you gave me previously… none of the references that you gave me previously are reflected on these posts.
Reese: Okay. I just sent the full reference on Frey to you. It’s actually the same page. They’re just 3 days apart.
Rick: Okay, great. You’re going to make me type this shit out so let’s do it. Appeal of Frey… okay, does that look right?
Reese: Yes. Then the short reference is just cite Frey.
Rick: And the code name?
Reese: And if you go back…
Rick: I only need two.
Reese: Okay well, the text box, the Appeal of Frey in the text box, it refers to the McKenna case.
Rick: Okay, we’ll talk about using… actually using the reference after we’ve done something… after we’ve created the code.