{"id":49912,"date":"2018-06-24T21:13:02","date_gmt":"2018-06-24T19:13:02","guid":{"rendered":"https:\/\/de.wordpress.org\/support\/topic\/sidebar-wird-in-category-php-nicht-angezeigt\/"},"modified":"2018-06-24T21:13:02","modified_gmt":"2018-06-24T19:13:02","slug":"sidebar-wird-in-category-php-nicht-angezeigt","status":"publish","type":"topic","link":"https:\/\/de.wordpress.org\/support\/topic\/sidebar-wird-in-category-php-nicht-angezeigt\/","title":{"rendered":"Sidebar wird in category.php nicht angezeigt."},"content":{"rendered":"<p>Hallo Zusammen,<\/p>\n<p>ich habe folgendes Problem, meine sidebar wird in der category.php nicht ausgeben, in der page.php klappt es aber. Ich wei\u00df leider nicht wo der Fehler liegt und w\u00e4re \u00fcber Hilfe dankbar.<\/p>\n<p>Anbei der Code der page.php (wo es klappt) und von der category.php (wo es nicht klappt)<\/p>\n<pre><code>&lt;?php get_header();?&gt;\n \n\n &lt;!-- Headerimage f\u00fcr Seiten Teil2  --&gt;\n  \n\n &lt;?php if (has_post_thumbnail()) { the_post_thumbnail(&#039;headerimage&#039;); } \n\t\t\t\/\/ hier wird das Header Bild eingebunden?&gt; \n    \n&lt;\/figure&gt;\n\n &lt;\/div&gt; &lt;!-- End Header-Image Container --&gt;\n\n  &lt;!-- Headerimage --&gt;\n\t\n\t\t&lt;div class=&quot;main-wrapper&quot;&gt; &lt;!-- Main Wrapper Start --&gt;\n\t\t&lt;main class=&quot;main&quot; role=&quot;main&quot;&gt;\n\t\t\t\n\t\t&lt;div id=&quot;content&quot; class=&quot;site-content&quot;&gt; &lt;!-- Content Start --&gt;\n\n\t\t&lt;?php\n\t\t\/\/ Show the selected front page content.\n\t\tif ( have_posts() ) :\n\t\t\twhile ( have_posts() ) :\n\t\t\t\tthe_post();\n\t\t\t\tget_template_part( &#039;template-parts\/page\/content&#039;, &#039;front-page&#039; );\n\t\t\tendwhile;\n\t\telse :\n\t\t\tget_template_part( &#039;template-parts\/post\/content&#039;, &#039;none&#039; );\n\t\tendif;\n\t\t?&gt;\n\t\t\n\t\t&lt;\/div&gt; &lt;!-- Content End --&gt;\n\t\t\n\t\t&lt;\/main&gt;&lt;!-- #main --&gt;\n\t\t\t\n\t\t\t&lt;div class=&quot;baustein3-background-container baustein3-background-page flex&quot;&gt; \n\n   &lt;div class=&quot;baustein3 baustein3-page&quot;&gt;&lt;?php the_field(&#039;baustein3&#039;); ?&gt;&lt;\/div&gt;  \n   &lt;\/div&gt;      \n\t\t\t\n\t\t\t&lt;div class=&quot;baustein4-background-container baustein4-background-page flex&quot;&gt; \n\n   &lt;div class=&quot;baustein4 baustein4-page&quot;&gt;&lt;?php the_field(&#039;baustein4&#039;); ?&gt;&lt;\/div&gt;  \n   &lt;\/div&gt; \t\t\n\t\t\t\n\t\t\t&lt;!-- Background-Container-End --&gt;\n\t\t\t&lt;?php get_sidebar(); ?&gt;\n\t\t\n\t\t&lt;\/div&gt; &lt;!-- Main Wrapper End --&gt;\t\n\n&lt;?php get_footer();?&gt;<\/code><\/pre>\n<p>Anbei nun die category.php wo es nicht klappt. Hier wird mir auch die schwarze Bearbeitungsleiste, oben nicht angezeigt. <\/p>\n<pre><code>&lt;?php get_header();?&gt;\n \n\n &lt;!-- Headerimage--&gt;\n  \n    \n&lt;\/figure&gt;\n\n&lt;\/div&gt; &lt;!-- End Header-Image Container --&gt;\n\n\t\n\t\t&lt;div class=&quot;main-wrapper&quot;&gt; &lt;!-- Main Wrapper Start --&gt;\n\t\t&lt;main class=&quot;main&quot; role=&quot;main&quot;&gt;\n\n\t\t\t&lt;?php if ( have_posts() ) : ?&gt;\n\t\t\t\n\t\t\t\n\t\t\t&lt;div class=&quot;beschreibung-category&quot;&gt; \n    \n    \n     &lt;h1&gt;&lt;?php single_cat_title();?&gt;&lt;\/h1&gt;\n     \n     &lt;?php echo category_description();?&gt;\n    &lt;\/div&gt;\n\n\t\t\t&lt;div class=&quot;container-beitraege-category&quot;&gt; &lt;!-- Container Beitr\u00e4ge --&gt; \n\t\t\t\t&lt;?php\n\t\t\t\t\t\/\/ Show an optional term description.\n\t\t\t\t\t$term_description = term_description();\n\t\t\t\tif ( ! empty( $term_description ) ) :\n\t\t\t\t\tprintf( &#039;&lt;div class=&quot;taxonomy-description&quot;&gt;%s&lt;\/div&gt;&#039;, $term_description );\n\t\t\t\t\tendif;\n\t\t\t\t?&gt;\n\t\t\t\n\n\t\t\t&lt;?php\n\t\t\t\t\t\/\/ Start the Loop.\n\t\t\twhile ( have_posts() ) :\n\t\t\t\tthe_post();\n\n\t\t\t\t\/*\n\t\t\t\t* Include the post format-specific template for the content. If you want to\n\t\t\t\t* use this in a child theme, then include a file called content-___.php\n\t\t\t\t* (where ___ is the post format) and that will be used instead.\n\t\t\t\t*\/\n\t\t\t\tget_template_part( &#039;template-parts\/post\/content&#039;, &#039;category&#039;, get_post_format() );\n\n\t\t\t\t\tendwhile;\n\t\t\t\t\t\/\/ Previous\/next page navigation.\n\t\t\t\t\ttwentyfourteen_paging_nav();\n\n\t\t\t\telse :\n\t\t\t\t\t\/\/ If no content, include the &quot;No posts found&quot; template.\n\t\t\t\t\tget_template_part( &#039;template-parts\/post\/content&#039;, &#039;none&#039; );\n\n\t\t\t\tendif;\n\t\t\t?&gt;\n\t\n   &lt;\/div&gt; &lt;!-- Container Beitr\u00e4ge End --&gt; \n\t\t\t\n        \n        \n         &lt;nav class=&quot;pagination&quot;&gt;\n        &lt;?php previous_posts_link();?&gt;\n        &lt;?php next_posts_link();?&gt;\n        &lt;\/nav&gt;\n        \n   \n&lt;\/main&gt;&lt;!-- #main --&gt;\n\t\t\t &lt;?php get_sidebar(); ?&gt;\n\t\t\n\t\t&lt;\/div&gt; &lt;!-- Main Wrapper End --&gt;\n    \n\n&lt;?php get_footer();?&gt;\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-49912","topic","type-topic","status-publish","hentry","topic-tag-sidebar"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/49912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/49912\/revisions"}],"wp:attachment":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=49912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}