- This topic has 15 replies, 3 voices, and was last updated 5 years, 4 months ago by
Tom.
-
AuthorPosts
-
October 5, 2015 at 4:12 pm #142142
Fernando
Hello!
First of all, I love GeneratePress. So versatile, clean, and efficient.
I have created categories as my main menu navigation pages. I added text description and it was displayed perfectly. I then added the CategoryTinymce plugin so I could add links and images in my Category descriptions. Nothing is displayed though.
How can I solve this issue? I would like each category page to have its own description, images and links.
Thank you so much, I really appreciate your time.
October 5, 2015 at 4:50 pm #142152bdbrown
Hi Fernando. If you downloaded that CategoryTinymce plugin from the WP plugin repository I don’t think there are any guarantees that it will work. As the author stated a year ago in his sticky post on the plugin support forum:
I have no plans to update this plugin.
No further support will be offered to this plugin. Hopefully someone else will develop a replacement plugin.
There are too many WordPress updates that happen for me to commit any time to maintaining any of my plugins.The author does provide paid support on his website at http://wp.ypraise.com/.
If you can post a link to your site I’ll take a look but don’t know that I’ll be able to fix it.
October 5, 2015 at 5:22 pm #142155Fernando
Thanks for answering bdbrown.
My website is http://www.ginytonic.com
Do you know any other plugins/methods of enabling links and images in category descriptions?
Thanks in advance.
October 5, 2015 at 6:29 pm #142167bdbrown
The only category archive page I see is Prueba Soundcloud. The description on that page looks like the default category description. Is the plugin active? You can, I believe, add links directly to the default category description by inserting an anchor tag. Not sure about the images. Might be something you could do with the pre_get_posts() function in a child theme; I’d have to do some more checking on that.
October 5, 2015 at 6:42 pm #142168Tom
Lead DeveloperLead DeveloperI think the category description field allows HTML.
For links: A link to GeneratePress
For images:
<img src="URL TO YOUR IMAGE" alt="" />
Worth a shot 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 5, 2015 at 8:15 pm #142185bdbrown
The anchor tag works but apparently the img tag gets stripped out.
Here’s a plugin that should help:
https://wordpress.org/plugins/allow-html-in-category-descriptions/October 6, 2015 at 12:01 am #142215Tom
Lead DeveloperLead DeveloperNice find!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 6, 2015 at 3:46 pm #142433Fernando
Thanks bdbrown! I am sorry I did not specify where my category page was ( Its called Prueba Soundcloud under Audio menu and only visible when Spanish language is selected.
I downloaded the plugin and tried the anchor tag, and still couldn’t get it to display the anchor tag. The results are shown on the page.
Do you think you could take a look at this?
Thank you so much.
October 6, 2015 at 8:32 pm #142461bdbrown
I don’t think you need any of the document structure tags and you shouldn’t even need the plugin for just the anchor tag. You should be able to enter something like this into the category description:
Estaría increible si la descripción se viera aquí. <a href="http://www.w3schools.com">Visit W3Schools.com!</a>
And it should end up being displayed like this:
Estaría increible si la descripción se viera aquí. Visit W3Schools.com!
If it doesn’t work that way, the only thing I can think of would be something in the language translation that’s keeping it from correctly interpreting the tag. But that’s just a guess.
Another option that might work (and Tom can confirm this) is to leave the category description blank, then use the “generate_after_archive_title” hook and enter your links and images there based on the category. Actually that might be an even better idea as then you have it all centralized in one place. Just a thought.
October 6, 2015 at 9:55 pm #142467Tom
Lead DeveloperLead DeveloperLet me know if the above doesn’t work I can show you how to use the hook @bdbrown mentioned. It involves some PHP, but should be mostly copy/paste once I give the code to you 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 7, 2015 at 6:28 am #142524Fernando
Thanks so much for your help bdbrown, unfortunately it didn’t work, its probably something to do with the translation as you say.
Tom would you be so kind to help me with the hook?
Thanks!
October 7, 2015 at 10:27 am #142594Tom
Lead DeveloperLead DeveloperYou can use a function like this:
add_action( 'generate_after_archive_title','generate_add_category_descriptions' ); function generate_add_category_descriptions() { // First category - assuming the category ID is 10 if ( is_category( 10 ) ) : ?> Anything and everything can go in here. Including links and images. <?php endif; // Second category - assuming the category ID is 20 if ( is_category( 20 ) ) : ?> Anything and everything can go in here. Including links and images. <?php endif; // Third category - assuming the category ID is 30 if ( is_category( 30 ) ) : ?> Anything and everything can go in here. Including links and images. <?php endif; }
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
You just need to find the ID of each category, and then add your content 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 7, 2015 at 10:42 am #142598Fernando
Thank you so much Tom, I will gladly give this a try and let you know if it works.
Have an excellent day.
October 7, 2015 at 10:48 am #142605Tom
Lead DeveloperLead DeveloperYou too! 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 12, 2015 at 10:21 am #143753Fernando
Issue resolved, it worked! Thank you so much for your help bdbrown and Tom.
-
AuthorPosts
- You must be logged in to reply to this topic.