Tag Info

Hot answers tagged


pre_get_posts does not work as expected on true pages and static front pages. You should create a custom query using WP_Query to return the posts that you need. EDIT Thanks to @birgire in comments, here is an interesting approach using pre_get_posts with a static front page


Assuming that your html is outputted by a wordpress menu sitting in a sidebar, you have to extend the Walker_Nav_Menu Class which is used by menu template functions like wp_nav_menu. As stated in the reference of wp_nav_menu, you could modify its output like: class My_DataId_Walker_Nav_Menu extends Walker_Nav_Menu { // other code found in original ...

Only top voted, non community-wiki answers of a minimum length are eligible