Community Forums › Forums › Archived Forums › Design Tips and Tricks › Different description text for different categories – Help needed
- This topic has 11 replies, 2 voices, and was last updated 11 years, 4 months ago by Turturelo.
-
AuthorPosts
-
December 2, 2012 at 10:15 am #2858TurtureloMember
Hey All,
I desperately want to customize my blog but I am experiencing problems doing this.
I am using the Minimum theme and I want to add different category description text before the footer line of my blog for the different categories of the site.
For example I want to use one text for this category http://www.thecupcakeuniverse.com/category/birthday-cupcakes/
Another text for http://www.thecupcakeuniverse.com/category/cute-baby-shower-cupcakes/
I need this texts to appear above the footer grey line ( the line above the copyright text) after all the posts.
I have searched the old forum for a solution and from what I get this zone is probably above_footer and instructions must be specified for every category, but I am not sure if I am right and I am not able to figure it how to do it.
I will greatly appreciate if you help me with this problem of mine.
I want to thank you in advance for your precious time and kind cooperation!
Thank you!
December 2, 2012 at 10:46 am #2866SoZoMemberSee this tutorial for instructions on adding a new sidebar down there. You'll want to use the genesis_before_footer hook. Then you can place text widgets into the new sidebar and use widget logic to control which widget shows up for each category.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
December 2, 2012 at 11:30 am #2872TurtureloMemberDear SoZo,
Thank you very, very much for your kind and prompt reply!!
I will immediately check the info.
Thanks! 🙂
December 2, 2012 at 3:11 pm #2912TurtureloMemberHi All,
I have used the information so kindly pointed by SoZo and of course thank to NickTheGeek for preparing the guide.
With the information in the guide I have managed to add the new widget as follows:
genesis_register_sidebar( array(
'id' => 'after-products-text',
'name' => 'After Products Text',
'description' => 'This is a sidebar that goes after the products lists.',
) );add_action( 'genesis_before_footer', 'child_after_products_text_sidebar' );
/** Loads a new sidebar after the products lists */
function child_after_products_text_sidebar() {echo '<div class="after-products-text">';
dynamic_sidebar( 'after-products-text' );
echo '</div>';}
Can you please be so kind and prompt me how I can set the logic for the different texts to show in the different categories without the help of a plugin, but with a code instead.
Thank you in advance for the cooperation!
December 2, 2012 at 5:38 pm #2921SoZoMemberDecember 2, 2012 at 6:05 pm #2924TurtureloMemberDear Sozo,
Thank you very much for your continued support.
I have one last question about the conditional tags.
Where should I put the code for them.
The code I have provided in my previous post I have included into the Functions.php section.
Should I put the conditional tags code in the Functions.php section also, or in another section.
I am using the Minimum them and I have :
- Functions.php
- Home.php
-Page_landing.php
- Style.css
Please excuse me for my question that I realize can be a little lame, but I am not experienced with coding, so I hope to get your kind understanding on the matter.
Thank you!
December 2, 2012 at 7:06 pm #2932SoZoMemberActually you should use the plugin to enter the conditional tag
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
December 3, 2012 at 9:23 am #2995TurtureloMemberDear Sozo,
Thank you very much for your kind cooperation.
You help is much appreciated!!
From what I get from the info you have been so kind to provide there is a way to add them without plugin.
Can someone help with this?
And once again thanks SoZo!!
December 3, 2012 at 9:24 am #2996SoZoMemberUse the plugin. Otherwise you have to add a lot of different sidebars.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
December 3, 2012 at 9:35 am #2997TurtureloMemberThanks for the prompt reply!
I only need 7 texts, and I have added 7 text fields in the widget area that I have created using the tutorial that Nick has set up.
Now I only need the code for the logic which text to be used for which category.
is_home and is_category ()
If I can see an example how this needs to be st I will replace the info and of course in which file to include the code that is my biggest problem.
Thanks!
December 3, 2012 at 9:37 am #2998SoZoMemberAnd is written "&&" so is_home() && is_category()
There are more syntax examples aplenty here.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
December 3, 2012 at 11:46 am #3087TurtureloMemberThank you SoZo!! 🙂
-
AuthorPosts
- The topic ‘Different description text for different categories – Help needed’ is closed to new replies.