• brute force, not elegant, but working for beginner
    note: This process won’t change “product categories” display, but only categories display.

    In some themes (e.g.storefront commerce rcd. theme) the functions are looped a lot (for data save, more clear code output).
    This basically means u will not find any magic order row to change or delete, unless ur skilled, or even then no, as the bounded function serves also to basic displaying.
    After 16 hours looking for proper plugin, studying templates, taxonomy, custom pages, categories (and all custom stuff around) and other articles and mistake-tries tests with archive.php edit in theme editor I realized that “full” non loop code for archive.php is needed, at least for a beginner … ?? omg

    1.Save ur old archive.php code in text a editor (u can combine it with the new after couple of tries if u wish to keep its appearance).

    2.U can get the template code here
    https://www.wpbeginner.com/wp-themes/how-to-create-category-templates-in-wordpress/
    THX!

    3. Remove row numbers and some rows displaying additional info (heading, meta data) and u get:

    <?php
    /**
    * A Simple Category Template
    */

    get_header(); ?>

    <section id=”primary” class=”site-content”>
    <div id=”content” role=”main”>

    <?php
    // Check if there are any posts to display
    if ( have_posts() ) : ?>

    <?php
    // Display optional category description
    if ( category_description() ) : ?>
    <div class=”archive-meta”><?php echo category_description(); ?></div>
    <?php endif; ?>
    </header>

    <?php

    // The Loop
    while ( have_posts() ) : the_post(); ?>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>

    <div class=”entry”>

    </div>

    <?php endwhile;

    else: ?>
    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>
    </div>
    </section>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    4. rewrite archive.php code in theme editor

    Refreshing … indeed ??

    If somebody knows how to make the titles smaller without influencing basic settings pls let me know (its again bounded so simple order <small> … <small> does not work :). Thx and Thx to all wordpress makers, it s a great system.

Viewing 1 replies (of 1 total)
  • Thread Starter motmat

    (@motmat)

    PS if u later want content or excerpt, then add between fields
    <div class=”entry”>
    </div>
    this syntax:
    <?php the_content(); ?>

    (for excerpt display replace “content” with excerpt” in the syntax …)

Viewing 1 replies (of 1 total)
  • The topic ‘Category page with titles only for complicated (loop) themes’ is closed to new replies.