get_template_part

I have tried to use the get_template_part from a page-templates in a subfolder of the theme of page-templates. But I always het an error of

Code im running

<?php get_template_part( ‘loop-templates/content’, ‘serviceicons’ ); ?>

But I get an error of
Warning: count(): Parameter must be an array or an object that implements Countable in /Applications/XAMPP/xamppfiles/apps/wordpress/htdocs/wp-includes/post-template.php on line 284

Is there another way to reuse template code than with get_template_part?

Read more here:: get_template_part

Leave a Reply

Your email address will not be published. Required fields are marked *