Forums

Recover Original Post Title from DB (3 posts)

  1. Gilad
    Member
    Posted 6 years ago #

    I have several blogs, and I am trying to create a table with all recent posts from all my blogs at the bottom of each page.
    I am quering the db directly for post names and urls, and found that both entries are in the table wp_posts, under post_title (for title) and guid (for url).

    My problem is that an original post title which was:
    Win $1000 Dollars!
    Appears in in post_title as:
    win-1000-dollars
    And when I remove dashes (-) and capitalize the first letter I only get:
    Win 1000 dollars

    Is there a way to convert it appear as the original?

  2. McShelby
    Member
    Posted 6 years ago #

    Are you sure you are not mixing up post_title and post_name? post_title should always contain the title in the form you typed it in during creation of the post (if no intercepting plugins are active). The title text with dashes should only be generated for the field post_name.

  3. Gilad
    Member
    Posted 6 years ago #

    You're right, I looked million times and with my 'selective vision' I never noticed that there is two entries...

    Problem solved, thanks a lot.

Topic Closed

This topic has been closed to new replies.

About this Topic