• Ollie Ford

    (@ollie-ford)


    Hi, new to WP and need some help with weird issue here.

    Recently, any new posts are showing up as:

    Test post”>Test post

    Where “Test post” is the title entered. This only happens when logged in.

    In the title field, it still only shows “Test post”, and removing this just makes the whole thing blank.

    At the same time (I have since removed the code) it caused the stumbleupon, digg, reddit etc. links using a function call on the title to display weirdly.

    From memory, it showed as (on the main and single post pages):

    [Title]” class=”stumbleupon ?> | [Title]” class=”digg” ?>

    etc.

    Any help appreciated, as it looks ugly when logged in and makes it hard to edit and appreciate what the site looks like to any visitors!

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • transom

    (@transom)

    Based on your description – it looks like something in the theme is cutting the alt link off prematurely.

    Most likely a typo in the theme file where the post title is output

    Thread Starter Ollie Ford

    (@ollie-ford)

    I’ve just realised, it must be this code that’s wrong:

    <div class="title">
    						<div class="thetitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>

    As it’s the:

    <?php the_title(); ?>"><?php the_title(); ?>

    That is showing up to the logged in user. It seems the first the_title(); is being shown as text rather than hidden as the title=”” field.

    How do I prevent this? All tags look closed to me…

    hotinthenews

    (@hotinthenews)

    Load up the Twenty Ten Theme, set it as your default.
    See if you still have the problem.
    If not, it’s in your coding somewhere.
    Just patience and due-diligence and you’ll find the prob.

    Hope this helps

    Lode

    Thread Starter Ollie Ford

    (@ollie-ford)

    Is the alt/title needed?

    If not, I could just do away with it. On the main page have the title link to the single post, and on the single post just have the title?

    Or does it need to be there for feeds, SEO, or something?

    Thanks.

    esmi

    (@esmi)

    Is the alt/title needed?

    Yes. It’s needed for any image that is not purely decorative. Not every visitor to your site can see images or uses a graphical browser – Googlebot, for example.

    Thread Starter Ollie Ford

    (@ollie-ford)

    Thanks all for your help, but I still can’t get it working!

    I don’t know what code it could possibly be that affects it only when logged in.

    It’s also fine when viewing from the Android app.

    It was fine with my current theme until I made a new post with Adobe Contribute, and it was in the [Title]”>[Title] format.

    Thanks,

    Thread Starter Ollie Ford

    (@ollie-ford)

    OK, I switched back to Twenty Ten theme. It was fine.

    Activated my preferred and customised theme again, it reverted to the above issue.

    So, where do we think the issue lies in the code? It must be something wrong with the ‘the_title()’ function somewhere, because everywhere that is present (in the title line, and in postbottom with share links) it messes up.

    Cheers!

    Thread Starter Ollie Ford

    (@ollie-ford)

    Is the alt/title needed?

    Yes. It’s needed for any image that is not purely decorative. Not every visitor to your site can see images or uses a graphical browser – Googlebot, for example.

    It’s not an image, it’s the title of each post. As I said in the title of this tread and my original post.

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘All posts are titled [Title]">[Title] when logged in?!’ is closed to new replies.