Streamline
Member
Posted 2 years ago #
Hi!
I need to retrieve the index page title. I need something like function is_home(), but i don't need a true/false answer here but i need the title - something like this:
get_home(page_title)
Can anybody suggest anything, please!? Really need help here.
I'm trying to understand the environment where you need the title, and what you mean by the index page title.
If you can post a link to the page in question, and tell what you want to retrieve from it, and under what circumstances, I might be able to help. No promises, though.
Streamline
Member
Posted 2 years ago #
Thank you for responding! :)
The thing is that from the WordPress administration panel you can set a static first page and i need to know if there is a way to tell which page is set as the first page from all my 6 pages (Home, About me, Services etc.). I want to retrieve that static first page title.
I hope this helps :)
henkholland
Member
Posted 2 years ago #
Streamline
Member
Posted 2 years ago #
Thanks henkholland, but this is not what i am looking for!
This query will get the title of a static front page:
SELECT post_title
FROM $wpdb->posts as p, $wpdb->options as o
WHERE p.ID = o.option_value
AND o.option_name = 'page_on_front'
Streamline
Member
Posted 2 years ago #
vtxyzzy - you are my hero! :)
Thansk so much - this is what i needed! Thanks for pointing me which option is responsible for this first page :)
Many thanks!
s_ha_dum (was apljdi)
Member
Posted 2 years ago #
This query will get the title of a static front page:
Sweet. :)
Glad to help. Prowebdesign, please mark this topic 'Resolved'.