WordPress.org

Ready to get started?Download WordPress

Forums

All posts are titled [Title]">[Title] when logged in?! (9 posts)

  1. Ollie Ford
    Member
    Posted 3 years ago #

    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!

  2. transom
    Member
    Posted 3 years ago #

    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

  3. Ollie Ford
    Member
    Posted 3 years ago #

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

  4. hotinthenews
    Member
    Posted 3 years ago #

    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

  5. Ollie Ford
    Member
    Posted 3 years ago #

    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.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  7. Ollie Ford
    Member
    Posted 3 years ago #

    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,

  8. Ollie Ford
    Member
    Posted 3 years ago #

    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!

  9. Ollie Ford
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.