March 22, 2013 at 3:10 pm #21458
What would I need to change to have 4 or more lines of text below a portfolio thumbnail on the overview page? Right now enters or hard enters don’t work, it just places the text after each other instead of going to the next line.
I added an image for you to better understand what I’m asking.March 24, 2013 at 4:38 pm #111881
You would need to create some custom fields and attach them to the portfolio cpt so that they appear on add/edit portfolio item. Then on the portfolio archive you need to display their values.
I made the first part for you. See post below yours.
NickMarch 25, 2013 at 9:15 am #111882
I added the pastebin code to functions.php. I then added the 2 extra lines to /include/loop-portfolio.php, not -items because I dont have that file.
That didn’t work, so I created a .php file with just those 2 lines of code and named it loop-portfolio-item.php and uploaded it into /includes.
That also doesn’t work.
It gives me the extra “port-box” field, and the ‘click here to add name and extra lines’, but when I enter tekst and publish the item, it’s not displayed below the portfolio thumbnail unfortunately.March 26, 2013 at 9:54 am #111883
Ok lets redo, the way i wanted it originally won’t work. So remove the stuff from functions.php that you previously added (everything after line 213) and in its place add this to the end of functions.php —> http://pastebin.com/229wAygm
Now you will get the same 2 fields in portfolio items. In the second field, just add your lines of text (into the same textbox) but separate each line by
So that it would look like this http://www.clipular.com/c?2509477=QJlk0QblsKJ43tkBkaqUdAxwCVA&f=.png (ignore the /br or br/ .. my mistake, in html5 , br by itself with no slashes is appropriate)
Now in /include/loop-portfolio.php remove the previous 2 lines and instead find line 49 which looks like
delete line 49, and in it’s place paste these two lines below.
echo "</a> ( ".get_post_meta($post->ID, 'nick_empname', true)." )</h1>";
echo get_post_meta($post->ID, 'nick_empline', true);
I tested it and works fine. Just needs some styling. http://www.clipular.com/c?3017517=6w2Ntr-TZYmYJWfbkJkZorWUiio&f=.png
NIckMarch 29, 2013 at 1:20 pm #111884
The topic ‘Multiple lines of text on portfolio tiles / thumbnails’ is closed to new replies.