wp_list_pages – how to shorten title for footer display on smaller screens
-
I have a wordpress site, and I am using the wp_list_pages in my footer (as an automated sitemap list) as follows:
<ul style="list-style-type: none;"><?php wp_list_pages('exclude=143,1040,1045,1048&title_li='); ?></ul>
On a couple pages I have longer titles. This works fine for larger sized screens, but not so good on smaller screen sizes (too much line wrapping).
Is there a way I can code to check for specific page ids to take advantage of the @media Media Queries, and change the title for smaller screen sizes?
I’ve seen someone doing something like this to change a title for some pages to be ‘Poetry’:
`<?php wp_list_pages( array(
‘include’ => array( 5, 9, 23 ),
‘title_li’ => ‘<h2>’ . __(‘Poetry’) . ‘</h2>’`
); ?>, but I wouldn’t know how to adjust it to allow the rest of the pages to display with their normal titles, and only use the media query code to change to shorter titles on specific pages for specific sized screens.
Is this even possible?
Thanks for any help.
- The topic ‘wp_list_pages – how to shorten title for footer display on smaller screens’ is closed to new replies.