Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

Displaying a Title Above a Category Page


  #1  
Old Apr 6, 2013, 07:00 PM
vinceesq
 
32 posts · Jun 2011
Displaying a Title Above a Category Page

Hello,

I am trying to add a title to the category page. Let's say I have 5 cats and upon clicking each category, I'd like to have a title for the category to display above all the posts in that specific category. Therefore, I will need 5 different titles to be displayed for each category.

I tried to search for a solution in the forums here, however, nothing really worked for me. I tried solutions found in this thread: http://forum.bytesforall.com/showthr...category+pages but as I am using the latest version of the theme, I can't use php inserts. I did try to create a new widget area in the central column and add a text widget as suggested, but that would add a blanket title to all category pages and pages, and I need the title to be category specific.

I also found this suggestion at wordpress.org support forum:

__________________________________________________ ________
in category.php (or in archive.php, if the former does not exist)

after:

<div id="content">

add a line like this:

<?php if( is_category() ) { ?><h1 class="entry-title full-title"><?php single_cat_title(); ?></h1><?php } ?>
__________________________________________________ ____________

I think it pulls the category Name and uses it as the Title for the specific category (which would work for me), but we don't have category.php or archive.php in Atahualpa, so I am not sure if this solution is of any use to us.

Are there any easy solution?

Thanks for looking into this for me.
  #2  
Old Apr 7, 2013, 05:30 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You might be able to copy the 'multi column/custom query' template and add some code to look to see if the category name changed (the code example you gave wouldn't to that) and get that to work.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 7, 2013, 11:34 AM
vinceesq
 
32 posts · Jun 2011
Quote:
Originally Posted by juggledad
You might be able to copy the 'multi column/custom query' template and add some code to look to see if the category name changed (the code example you gave wouldn't to that) and get that to work.
I am sorry to say this, but I truly do not understand the answer above.

Are you saying there is a code corresponding to categories that I can copy from the 'multi column/custom query' template and add it somewhere else in the theme (I can't see any category-related code , though); or, are you suggesting I should experiment with the codes I can find on the internet and add those to the template to see if they might work. If the latter is the case, could you please tell me why the code I found won't work (it looks fine to me; but, then, I am not a coder)? Should I be looking for something similar or totally different? Does this template accept php codes?

Thanks.
  #4  
Old Apr 7, 2013, 04:06 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you could duplicate the file 'template_multi_column_custom_query.php' - which is in the theme folder, and add your code to it, Then use this template in a page on your site.

If you don't understand how to do this and are not a coder, you might want to hire someone to do it for you if it is somthing that you have to have.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Apr 7, 2013, 07:27 PM
vinceesq
 
32 posts · Jun 2011
Quote:
Originally Posted by juggledad
you could duplicate the file 'template_multi_column_custom_query.php' - which is in the theme folder, and add your code to it, Then use this template in a page on your site.

If you don't understand how to do this and are not a coder, you might want to hire someone to do it for you if it is somthing that you have to have.
Of course, I am not a coder. If I were a coder why would I come here and bug you with a solution? Tell me, why???

I guess what you are saying is that you know how to do it but won't tell me because you want to get paid for it. Correct? I think it's time for you to let us know the type of questions we can ask here for free and for a fee. That would be honest and would make things simple - for you and for us.

With regard to my question, I came here to ask you how to do it because none of the solutions I found on wordpress.org could be applied to Atahualpa because the theme does so many things in its own unique way that we are, the non-coders, can't even figure out where to begin. I read a lot of threads here, and I can see a lot of people struggling with the same issues.

Anyways, if it is still within the scope of the free support, please let me know if the following solution that I found on wordpress.org can be implemented with Atahualpa:

__________________________________________________ _________________________

Different Text on Some Category Pages

A slightly more complex possibility is that you want different text to display depending on which category page the visitor is viewing. Then you would add the "default" text to the main category.php file, and create special category-#.php files (with their own version of the text, as described in the Introduction) for each category that needs special text at the top.

This does however create a lot of files in your theme directory, and can be avoided using the following code OUTSIDE the loop:

<?php if (is_category('Category A')) : ?>
<p>This is the text to describe category A</p>
<?php elseif (is_category('Category B')) : ?>
<p>This is the text to describe category B</p>
<?php else : ?>
<p>This is some generic text to describe all other category pages,
I could be left blank</p>
<?php endif; ?>

This does the following. Checks to see if we are looking at Category A, if we are then show the first bit of text, but if we're not then check if we are looking at Category B. If we are then show that bit of text, and finally, if it is neither Category A or B, then show this default text.

__________________________________________________ _____________________

If it is applicable then please let me know which template I should use and what modifications I could possibly make to the code to have it work with Atahualpa.

Thanks
  #6  
Old Apr 7, 2013, 09:04 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
@vinceesq

It is sometimes difficult to know how to answer many of the questions and some, such as yours, are more complex. I believe Juggledad made the suggestion he did to hopefully point you in the direction of a solution because of the amount of time it might take to implement, test and write instructions.

I am not a coder so I can't suggest a coding solution but you could perhaps use the List Category Posts plugin to do what you want.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to prevent the title 'Home' displaying on the home page? kitfreeman Center area post/pages 0 Jan 28, 2011 12:41 PM
[SOLVED] Home page title not displaying ... edkopec Atahualpa 3 Wordpress theme 7 Oct 6, 2010 07:43 PM
'Read More' not displaying on custom category-posts-in-a-page maija Excerpts, Read more, Pagination 2 Mar 8, 2010 04:29 PM
Category title on category page, not on each post excerpt kicker paulae Excerpts, Read more, Pagination 4 Jun 22, 2009 11:33 AM


All times are GMT -6. The time now is 06:14 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.