• Resolved prowebdesign

    (@prowebdesign)


    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • 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.

    Thread Starter prowebdesign

    (@prowebdesign)

    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 🙂

    Thread Starter prowebdesign

    (@prowebdesign)

    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'

    Thread Starter prowebdesign

    (@prowebdesign)

    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!

    This query will get the title of a static front page:

    Sweet. 🙂

    Glad to help. Prowebdesign, please mark this topic ‘Resolved’.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to retrieve index (home) page title?’ is closed to new replies.