Home Forums Front-end Issues Template Code doesn't work


Template Code doesn't work

  • Hi, I face some problem. One of my wordpress theme doesn’t work Template Code.
    I want to add ACF template code after H2 tag.
    Here is my ACF template code
    <?php the_field('subtitle'); ?>

    & This is my WordPress theme code:

      $data = $data . '<article class="blog-thumb style_1 clearfix"><h2 class=" blogtitle"><a class="title" href="'.$permalink.'">';
      	$data = $data . '<span class="sticky icon-paper-clip"> </span> ';
      $data = $data . $the_title.'</a></h2>';
      $data = $data . '<ul class="meta-entry clearfix"><li><p><span class="icon-user"> </span> '.$the_author_posts_link.'</p></li><li><p><span class="icon-tag"> </span> '.$cat_echo_p.'</p></li><li><p><span class="icon-calendar"> </span> '.get_the_time('F') .' '. get_the_time('j') .', '. get_the_time('Y').'</p></li>';

    Please plugin author or Someone give me the solution.

    • Elliot

    • January 31, 2014 at 12:06 pm

    Hi @mrhossen

    Your ‘theme code’ shows no use of any ACF functions such as get_field or the_field. This is why no value is being displayed.


  • Thanks @elliot for reply.
    There no way to add the ACF function ? Is it possible to add ACF function through shortcode on my theme template ?

    • caju

    • February 1, 2014 at 2:11 am

    Hi Elliot,

    I’m having some trouble with the plugin, but I cant seem to create a Topic, how can I do that?


    • Elliot

    • February 2, 2014 at 12:53 pm

    Hi @mrhossen

    Yes, there is a shortcode for outputing text based values. You car read about it here:

    Normally, you would edit your template files to output any ACF values.


    • Elliot

    • February 2, 2014 at 12:53 pm

    Hi @caju

    You can create a new topic here:


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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.