wp_list_pages and custom fields
-
I have a use for wp_list_pages that’s a little unconventional.
For a page, I have a long Title that’s optimized for SEO. I want to link to this page on the home.php page, but I want that link to say something different than the optimized title. Why? Because I wanna shorten it.
Here’s an example.
Page Slug: https://example.com/nurses
Page Title: Nurses know medicine and will protect your health
Link on home.php: Nurses and MedicineSo, in essence, I’d like to call a custom field to display “Nurses and Medicine” on the homepage using the wp_list_pages tag. If I display this page elsewhere using wp_list_pages, it would be the normal “Nurses know medicine and will protect your health” title.
Is this possible?
The only other thing I’d be interested to know is if it’s possible to link to an exact part of the page, such as https://example.com/nurses#medicine using wp_list_pages.
- The topic ‘wp_list_pages and custom fields’ is closed to new replies.