Support » Plugin: DPortfolio » modifying output template

  • Resolved tkhan

    (@tkhan)


    hi dinamiko,

    Great plugin, I am trying to add a like button under each of the portfolio thumbnails. I have tried editing class-dportfolio-ptype.php

    $content .=if( function_exists('zilla_likes') ) zilla_likes();
    results a syntax error, and $content .=zilla_likes();
    displays the heart icons before the dportfolio-container-main div.

    Any help would be appreciated

    Tkhan

    https://wordpress.org/plugins/dportfolio/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hi tkhan, sorry for the delay.

    I don’t know nothing about zilla_likes, but maybe you can put first the result of zilla_likes() in a variable and test the result, something like this:

    if( function_exists('zilla_likes') ) {
    $zilla_likes = zilla_likes();
    } else {
    $zilla_likes = '';
    }
    
    echo $zilla_likes; // here you test the value $zilla_likes

    if $zilla_likes has some value, add to the $content variable:

    $content .= $zilla_likes;

    try it and tell me if works, thanks.

    Thread Starter tkhan

    (@tkhan)

    Hi dinamiko,

    Sorry for not responding I overlooked the email, the function works but the like icons are still being output before the actual portfolio items, have got a feeling it may be a jquery. I have stopped working on it for the moment. will mark as resolved and get back to you at a later date.

    tkhan

    Plugin Author dinamiko

    (@dinamiko)

    Hi tkan,
    I marked it as resolved but if you like I can reopen it in the future, no problem 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘modifying output template’ is closed to new replies.