Static posts above category pages
-
I want to add static texts above posts on category pages (it is described here: https://codex.wordpress.org/Category_Templates) but I don’t know how to access my template file to add the code for this.
Also – can images be added to the static text above the category posts?
-
Hello there,
You can’t access to the template file of any themes here at WordPress.com. The reason is because the themes are shared with all the people that are using your same theme, therefore by changing the template at your best convenience, you’re going to change also their layout. The link you mentioned refers to WordPress.ORG, which is different than WordPress.COM.
However, if you want to place a static text above the category pages you can use a workaround.
The theme you have in use can display the category descriptions. You can use them to write any static text – even if you want to use the same text for a number of different categories, you can do it. Go to Dashboard>Posts>Categories to customise your categories pages.Hope that helps. Let me know if that all makes sense to you or if you have any other questions, happy to help :)
-
Hi! Thank-you so much for your response.
I have edited the category descriptions and see them showing on the category pages – great start!
Is there a way to add an image to this text?
I just added a basic <b> </b> HTML code into the description and it is working – the font appears bolded! Does this mean I can add an image through HTML code as well?
Is there a way to remove the “Categories: XXXXX” that displays above this text?Thanks for your help
Christina
-
Hello Christina,
You can try to put an image by using the following HTML code:
<img src="your image URL">You’re going to need the exact URL of the image you want to place in there.
You can upload the image (if you haven’t yet) on your Media Library and then get its URL as it says here: https://en.support.wordpress.com/widgets/image-widget/#getting-image-url.If you need to adjust the size of the image, you may want to use the following HTML string instead of the above:
<img src="your image URL" style="width:128px;height:128px;">Just change the numbers of the width and height accordingly. You may need to try different sizes before finding the perfect one for your page layout, you have to experiment a little bit :)
As for removing the Categories title, you need edit the CSS with some code in order to do that. You can do it already if you have the CSS customiser, otherwise you have to purchase the patch.
Hope this is helpful to you. If you get stuck at any step, just let me know and I’ll be glad to help.
-
Thank-you for the instructions. I’ve followed each step but it doesn’t save the image… perhaps it is just not possible to place an image in the category description?
-
Hey Christina,
I’ve tried the same trick on my blog but it didn’t work as well! I’m afraid it’s not possible to do that. Probably it’d be possible with the CSS customisation.
I’m so sorry you couldn’t be able to place your images there :(
- The topic ‘Static posts above category pages’ is closed to new replies.