Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21458

    Hi,

    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.

    http://imgur.com/DS2sMoy

    DS2sMoy.png

    #111881

    Hi,

    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.

    Thanks,

    Nick

    #111882

    Hi Nick,

    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.

    #111883

    Hi,

    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

    <br>

    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

    echo "</a></h1>";

    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

    Thanks,

    NIck

    #111884

    Thanks Nick,

    that worked great!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Multiple lines of text on portfolio tiles / thumbnails’ is closed to new replies.