• Resolved markroth

    (@markroth)


    This regards my static home page at Ain’t Complicated.

    Here is the pertinent php-free part of the custom template I’m using:

    <title>Ain't Complicated -- Mark's Views blah blah</title>

    WordPress is stripping it down to (or replacing it with) Ain’t Complicated and no more.

    I’ve searched high and low with Google as well as here…and have been unable to find the solution (or even the cause).

    I know there are plug-in solutions, but I want to understand the cause and non-plug-in solution.

    Thanks,
    Mark

Viewing 8 replies - 1 through 8 (of 8 total)
  • can you paste the full code of the custom template into a https://pastebin.com/ and post the link to it here?

    Thread Starter markroth

    (@markroth)

    Thanks for your reply, alchymyth.

    I just got done posting the code here.

    Thread Starter markroth

    (@markroth)

    Update: Despite further research and experimentation, I still haven’t found this solution.

    One experiment I tried was using the following hard-coded title in the template:

    <title>Dumb</title>

    And I still got the blog name (Ain’t Complicated) in the title meta tag.

    It’s all very weird and mysterious to me!

    Your static front page isn’t Twenty Eleven, but the your blog is Twenty Eleven.

    What are you using (Plugin, etc.) to generate your static front page?

    Thread Starter markroth

    (@markroth)

    Thanks for your comment, Chip.

    I hand-coded, hard-coded the template for the static front page.

    My blog is powered by the latest version of WordPress, using a homemade child theme of Twenty Ten.

    Thread Starter markroth

    (@markroth)

    OK, I did more trial-and-error experimentation today.

    I’ve pinpointed the problem (it seems) to this line:

    <?php query_posts('showposts=1'); ?>

    When I comment it out, then the title displays as I wish it to display.

    So…what is there about the above line that replaces the hard-coded <title> contents with the blog name?

    Thanks.

    esmi

    (@esmi)

    That’s a custom query that effectively replaces the current page’s title & content with the title & content of your latest post.
    https://codex.www.ads-software.com/Function_Reference/query_posts

    Thread Starter markroth

    (@markroth)

    Thank you, esmi.

    I’m happy to report that I finally got the issue resolved a few minutes ago.

    I posted the solution in a comment on my blog.

    For here, suffice it to say that closing the <?php query_posts('showposts=1'); ?> block with <?php wp_reset_query(); ?> does the trick nicely.

    To those of you who commented on my question here, many thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Title Stripped from Static Page’ is closed to new replies.