April 6, 2012 at 11:01 am #11164
I would like to have a subtitle on each of my portfolio items, like on all the pages. It only need show up when you visit the single portfolio page. Could you tell me how I’d go about doing this.
SamApril 9, 2012 at 5:14 pm #70802
You could use a custom field and then add an if statement to see if the portfolio is single to then display it.
DevinApril 9, 2012 at 6:22 pm #70803
I’m nearly there. I’ve created a custom Meta Box and called it into my single-portfolio.php file. all working great, except, I can’t pull it up into the title area. Here’s my example:
How do i pop it up under the title like on all the other pages?
SamApril 10, 2012 at 3:16 pm #70804
Move the sub-title function into loop-portfolio-single.php in your includes folder underneath this line.
echo "<h1 class='post-title portfolio-single-post-title'>".get_the_title()."</h1>";
Note: This line is a part of a PHP statement so you’ll need to follow the format above or close the PHP statement and open a new one.
MyaApril 13, 2012 at 10:33 am #70805
That line isn’t in my loop-portfolio-single php. There is something similar in my single-portfolio.php file:Code:
echo “<h3>”.get_post_meta($post->ID, ‘ecpt_subtitle’, true). “</h3>”;
Try as i might, I simply cannot get that second h3 subtitle above the line. it looks like there is some styling on the h2 title that includes the horizontal line. I simply cannot find that anywhere. This is the last thing I need to do before getting this site done and live – please could you offer any other suggestions.
SamApril 13, 2012 at 11:48 am #70806
I’ve manged to come up with a sort of solution by applying a negative not top-margin to the subtitle.
That’s worked in terms of positioning it underneath the title. However, as a it’s not technically placed inside the title div and so it takes up no space. Therefore the grey bottom border does not expand with it. Could you tell me how to add additional padding to the title to get it to push the bottom border lower down, without affecting other pages?
SamApril 13, 2012 at 3:09 pm #70807April 14, 2012 at 10:57 am #70808April 17, 2012 at 3:14 pm #70809
The topic ‘Subtitle on portfolio items’ is closed to new replies.