• Resolved anoctave

    (@anoctave)


    The archives template of my theme latte pro does not include a page heading to show the category name. The default category for the them is the blog for which I created a category called News and Events.

    It’s a one-page theme where a certain amount of posts appear on the front page and the older ones appear on the archive page. Because not having a page header was confusing, I manually added the code below.

    
    								   <div class="row"><h1 style="text-align:center;font-weight:bold; font-color:#4b2acc;front-family:EB Garamond; ">News and Events Archive</h1></div>	

    However, I am adding a two new categories that we plan to use heavily and so the above hard-wired coding doesn’t do the job.

    I looked on the web and got a lot of articles,but all had a differnt frame of reference and I found it
    confusing.

    All I need is the proper code in place of the

    News and Event

    so that the page heading will reflect the category of the listing.

    Much appreciated for any help

    • This topic was modified 5 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not a Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter anoctave

    (@anoctave)

    Thank you for your response.

    Unfortunately, my attemmpt to show the code in my first post did not print (I used the code/code before and after. Now I will attempt to print the code another way. I am not going to use the <>s in the code. I will use M as < and m as >.

    M div class=”row” m

    M h1 style=”text-align:center;font-weight:bold; font-color:#4b2acc;front-family:EB Garamond; ” m

    News and Events Archive

    M /h1 m

    M /div m

    It is code for the archive category that I need.

    Right, instead of putting the “News and Events Archive” text hard-coded, put
    <?php single_cat_title(); ?>
    as shown in the examples on the page I mentioned.

    Thread Starter anoctave

    (@anoctave)

    Thank you for being patient enough to answer my clueless response. I’m unfortunately one of those people who learn best by seeing a real life example.

    I found one in one of the 20xx themes. I copied it from the template, scanned my template and made the changes needed to make it fit my template. And it worked.

    The link you gave me helped me recognize when I saw it, but thereal example helped me understabd what I didn’t get from your link.

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The archives.php in my theme does not show the category title’ is closed to new replies.