Forums

[resolved] How to retrieve index (home) page title? (9 posts)

  1. 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.

  2. vtxyzzy
    Member
    Posted 2 years ago #

    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.

  3. 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 :)

  4. henkholland
    Member
    Posted 2 years ago #

  5. Streamline
    Member
    Posted 2 years ago #

    Thanks henkholland, but this is not what i am looking for!

  6. vtxyzzy
    Member
    Posted 2 years ago #

    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'
  7. 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!

  8. s_ha_dum (was apljdi)
    Member
    Posted 2 years ago #

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

    Sweet. :)

  9. vtxyzzy
    Member
    Posted 2 years ago #

    Glad to help. Prowebdesign, please mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic