{"id":18710629,"date":"2025-11-07T12:05:52","date_gmt":"2025-11-07T12:05:52","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/loop-template-not-called\/"},"modified":"2025-11-07T12:05:52","modified_gmt":"2025-11-07T12:05:52","slug":"loop-template-not-called","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/loop-template-not-called\/","title":{"rendered":"Loop Template not called"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Dear Support,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">i try to add a text after the title in every couse in a Category list.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h3 class=\"course-title\"&gt;&lt;?php the_title(); ?&gt; <br \/>&lt;?php <br \/>$course_id = get_the_ID();<br \/>$tage = array(\"So. \", \"Mo. \", \"Di. \", \"Mi. \", \"Do. \", \"Fr. \", \"Sa. \");<br \/>date_default_timezone_set(\"Europe\/Berlin\");<br \/>$tag = date(\"w\",  strtotime(get_post_meta($course_id, \"_lp_course_startdate\")&#091;0]));<br \/><br \/>echo ( $tage&#091;$tag] . date('d.m.Y', strtotime(get_post_meta($course_id, \"_lp_course_startdate\")&#091;0])). \" ab \". date('H:i', strtotime(get_post_meta($course_id, \"_lp_course_startdate\")&#091;0]))  );<br \/>?&gt;&lt;\/h3&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I have overwritten the <strong>wp-content\\plugins\\learnpress\\templates\\loop\\course\\title.php<\/strong> with  <strong>wp-content\\themes\\generatepress_child\\learnpress\\loop\\course\\title.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And I Use the filter in the functions.php<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'learn-press\/override-templates', function(){ return true; } ); <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I have also tried to write in the <strong>wp-content\\plugins\\learnpress\\templates\\loop\\course\\title.php<\/strong> directly but the code will not be called.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What can I do?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Best regards<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Collie-IT<\/p>\n","protected":false},"template":"","class_list":["post-18710629","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18710629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18710629\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18710629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}