Magazine Style on Frontpage

One of the things you see on magazine style websites is a category and links to articles within that category. To do the same thing with a wordpress site is not that hard and can be done with a few lines of code. First you need to find out how many categories there are, next we need to find out how many post there are in the category. Making sure that when you call a post it doesn´t hit an error because you asked for post 4 in category 5 while there are only 4 categories.
I will post the code here when I write it  (will use the function count)

(count(get_the_category())



				
				

				

				

Leave a Reply