• I have some posts from the past of my blog that don’t have titles. This causes an issue for me, because I defined a random view of posts from the past in my main page. But the module doesn’t link to post without titles. It just shows an empty square.

    Is there some way to automate titles for posts without titles? Say, taking it from the first words in the post, or from the tags?

Viewing 2 replies - 1 through 2 (of 2 total)
  • It would be interesting if it can be done, I don’t know how, though.

    However, unless you have THOUSANDS of posts, have you considered the possibility of updating each of them quickly ?

    If you have phpmyadmin access, you can open your database, and run this query:
    select * from wp_posts where post_title='' and post_status='publish'
    From there on, click the link to edit in place, and then you can very quickly add a new title each time.

    I briefly wondered if a search-and-replace couldn’t work, but I don’t think it can be conditioned to use data from each row’s individual info.

    UPDATE wp_posts SET post_title = REPLACE (
    post_content,
    '',
    'well, duh, something, but I think it would bulk replace EVERYTHING, not replace with something individual to each row where it is replacing');

    Feel free to correct me if I’m wrong – I love being wrong, it’s a chance to learn.

    Thread Starter shaygol

    (@shaygol)

    Actually I’m not really familiar with PHP programming, so You might be right as far as I know… ??

    But even if you’re right, I won’t be able to do that myself.
    It’s not thousands of posts, but it could be 200+, so doing it individually is not really an option…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dealing with posts from the past without titles’ is closed to new replies.