Archived topic
How do I move my logo?
24 replies · Started by stefanie on June 20, 2019
Hi David,
I hope you had a nice weekend!
I'm getting back to you about your last message which I'm not sure I understood fully. I think I am actually doing both on my site, as in displaying a featured image with a HTML description with a couple of relevant links in it, and also displaying a grid of categories too.
Please can you take a look for yourself on my website to see if that's what you mean? Here's the URL
https://zestforever.com
The reason I have done quite a lengthy description of all my categories with some scattered links is because I read from what I thought was a reliable source that this is the best thing for SEO 2019. Would be interested to know what you think? Maybe it's wrong and I should change it?
That is why I need the 2 extra plugins to be able to do this, which are the 'HTML in categories descriptions' and the 'categories Images'plugins.
Thanks
Stefanie :-)
Hi Stefanie,
so what i was expecting was a page that displays a grid of all your categories, with their featured image and they link to your category archives. If so then Tom provides a custom solution for that here that is also using the Categories Images plugin:
https://generatepress.com/forums/topic/grid-gallery-of-category-images/#post-871841
So the first part of the code needs to be added using one of the methods listed here:
https://docs.generatepress.com/article/adding-php/
Then add the CSS provided.
Once that is done you can add this shortcode to any static page to display the grid:
[category_grid]
Hi David, yes I do want my categories to be displayed how you have said here, but I'm afraid doing all of that is just something that I don't understand. I read over and over again the links you sent me but I don't understand where I am supposed to put either parts of those codes.
This is hard for me as I am out of my league with that. Is there a simpler way you could explain it - literally in complete dummies terms, otherwise I will just have to leave it as it is. I'm really sorry to be such a huge pain!! Or do you even have access to be able to do it for me?
Thanks so much
Hi Stefanie,
There isn't really a more simple way, unfortunately, which is why I built the solution David linked to.
I can explain things step by step if they helps?
First, copy this code:
add_shortcode( 'category_grid', function() {
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
);
$categories = get_categories( $args );
if ( $categories ) {
ob_start();
echo '<div class="category-grid">';
foreach ( $categories as $category ) {
echo '<div class="category-item">';
echo '<a href="' . get_category_link( $category->term_id ) . '">';
echo '<h3>' . $category->name . '</h3>';
echo '</a>';
if ( function_exists( 'z_taxonomy_image' ) ) {
z_taxonomy_image( $category->term_id );
}
$description = term_description( $category->term_id );
if ( $description ) {
echo '<div class="category-description">';
echo $description;
echo '</div>';
}
echo '</div>';
}
echo '</div>';
return ob_get_clean();
}
} );
Then add it to your site using one of these methods: https://docs.generatepress.com/article/adding-php/
Then, copy this code:
.category-grid {
display: flex;
flex-wrap: wrap;
}
.category-item {
padding: 40px;
width: 25%;
box-sizing: border-box;
}
.category-item img {
margin-bottom: 20px;
}
And add it to your site using one of these methods: https://docs.generatepress.com/article/adding-css/
Once you're done that, you can now add this shortcode to your site wherever you want the categories to display: [category_grid]
Hope this helps :)
Hi Tom,
I have done what you say and added both the codes to my site exactly as explained. However, nothing has changed and I think it could be because my categories are already in a grid (my bad). At least I think they are. I don't understand technical terms but please can you check out this link to one of my categories. If you scroll down past the description of that particular category you will find the posts in a grid format underneath. Is this right? I have the same thing going on for all my categories.
Sorry for the confusion. I have a feeling maybe David didn't realise to scroll down to find the posts, which I'm thinking will be the same issue to any visitor to my site. What do you think?
Thanks for your time :-)
https://zestforever.com/category/plant-based-sports-nutrition
Ah, that code adds a page which lists out your categories (not posts). Everything looks good on the page you linked to - are you having any issues with it? The plugins you're using to add images/HTML to your category descriptions should be fine :)
Hi Tom, I see exactly what you mean now that it lists out a grid of categories, which sounds like it could be better for SEO considering there would be less links coming from my home page right?
I did actually set up the two pieces of code like you said and it hasn't come up in a grid. I'm presuming I've done it right. I installed code snippets plugin then added the first piece of code and activated, then I headed over to my customizer and added the second piece of code into the additional CSS area then published, but nothing changed and my categories still looked the same. I double checked everything you said a few times and don't believe I made a mistake with it so I'm not sure what's going on. Anyway, I guess you have explained it as best you can and I will just have to get some kind of help at my end with it.
While I am here i would like to ask you one other thing. I have recently been trying to fasten up my site for mobile as I realised that it was pretty slow in this area, so I have been using page speed insights to check all my posts individually.
This has opened up a bit of a can of worms for me as I could see there wee=re quite a few problems coming up. I have taken measures to make things better; I have been put onto a faster server and have optimised and removed slow loading images, plus I have added lazy loading. However, some of may pages are still pretty slow and the one issue that keeps coming up in PSI is 'render blocking resources'and DOM. I'm not up on any of this stuff and my web hosting support have told me I need to ask my theme provider. If you have any advice on what I can do about these issues that would be great.
I know I'm asking a lot of questions but I'm just desperate to succeed with my website as it's 2 years of hard work and I'm not ranking very high so I am going deeper with SEO. Please just get back to me when you have time; there's no rush.
Thanks a million :-)
I see exactly what you mean now that it lists out a grid of categories, which sounds like it could be better for SEO considering there would be less links coming from my home page right?
I'm not sure it would make much of a difference. The way you have it set up now looks good.
but nothing changed and my categories still looked the same
The code I provided won't change your existing category pages. My code gives you a shortcode which you need to add to one of your existing pages. Then that page will display a grid of your categories. I don't actually think this is what you need - you can safely remove the codes I gave you.
the one issue that keeps coming up in PSI is ‘render blocking resources
Have you tried using Autoptimize, yet? I wrote an article on it here: https://generatepress.com/fastest-wordpress-theme/
It might be worth a shot :)
Hi Tom, yes I think I ill leave the categories as they are and just take the code out.
Thanks for all your advice; I will install autoptimize and see what happens.
Please can you thank the other guy David for his help too as he was really great, but I don't know how to contact him now.
Thanks again for your time, it is so appreciated :-)
Stefanie
Absolutely! Glad we could help :)