• Hi everyone, got a little problem here, i’m a noobie at PHP and I’m struggling…

    I made a Custom post type with ACF whitch say I sould use :
    the_field(‘motcle’)
    I have added a plugin portfolio and I found where it display the content of the project :

    $html .= “<h2 class=’title’>{$title}</h2>”;
    $html .= “<h2 class=’title’>{$title}</h2>”;
    $html .= $content;

    So first I tried this :

    $html .= “<h2 class=’title’>{$title}</h2>”;
    $html .= “<h2 class=’title’>{$title}</h2>”;
    $html .= $content;
    $html .= <p>the_field(‘motcle’);<p>”;

    Didn’t worked.

    Then I tried to add this to another part of the document :

    $size = ‘full’;
    $thetags= the_field(‘motcle’);
    $current_post[‘title’] = get_the_title();

    and then modify :

    $html .= “<h2 class=’title’>{$title}</h2>”;
    $html .= $content;
    $html .= $thetags;

    Didn’t work either. Thanks for you help..

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Add Custom Post field in Portfolio’ is closed to new replies.