I created a separate page in Wordpress and I want to display a list of headings on it. I used the wp_list_categories function.

All displays only can not apply styles to headings displayed in the center.

Here is my code:

 <?php get_header(); ?> <div class="illustration">Пример текста <?php wp_list_categories('orderby=name&child_of=54'); ?> </div> <?php get_footer(); ?> 

In css registered the following code:

 .illustration { text-align: center; border: 3px solid green; } 
  • Well, can you see all the css property illustration ? - Raz Galstyan
  • Open the developer panel and see the code! What is inside <div class="illustration">Пример текста ? Immediately text or yet some other generated div or p for which other styles can be set! - HamSter
  • I did it like this. And it all worked. - Igor Kurilyak
  • <? php / * Template Name: illustration * /?> <! DOCTYPE html> <html> <head> <? php get_header (); ?> </ head> <body> <div class = "illustration"> Example text <? php wp_list_categories ('orderby = name & child_of = 54'); ?> </ div> <? php get_footer (); ?> </ body> </ html> - Igor Kuriliak

0