Forums

Platinum SEO plugin problem (5 posts)

  1. SorenHK
    Member
    Posted 1 year ago #

    Hello,

    I've already located the problem, and for someone a bit more clever than me, it should probably be pretty easy to correct this problem - at least that's what I'm hoping :)

    If I remove the following code, the plugin rewrites the titles without a problem, but if I leave this code be, all posts and pages will have the title of this php file.

    What the about.php actually is, is a small preview of the about me page, shown just above the widget sidebar.

    <!--about-->
    <div id="about">
    <?php query_posts('pagename=om mig'); ?>
    <?php while (have_posts()) : the_post();
        $myphoto = get_post_meta($post->ID, "myphoto", TRUE);
        $mydesc = get_post_meta($post->ID, "mydesc", TRUE); ?>
    
    <h3>Om mig</h3>
    <a href="<?php bloginfo('url'); ?>/om-mig"><img src="<?php echo $myphoto; ?>" alt="<?php bloginfo('blogname'); ?>" title="<?php bloginfo('blogname'); ?>"  /></a><span><?php echo $mydesc; ?> ... <a href="<?php bloginfo('url'); ?>/om-mig">mere</a></span>
    <?php endwhile; ?>
    </div><!--about-end-->
  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    add wp_reset_query(); after endwhile;
    http://codex.wordpress.org/Function_Reference/wp_reset_query

  3. SorenHK
    Member
    Posted 1 year ago #

    Hi alchymyth,

    Thank's for your answer, but unfortunately it did not make any difference.

    I've left 'rewrite titles' on for now, and here's a link to my website in case someone have any other ideas http://søgemaskineoptimeringgoogle.dk/

  4. alchymyth
    The Sweeper
    Posted 1 year ago #

    as i can see the text 'wp_reset_query(); ' in your site, is it possible that you added the wp_reset_query() into the wrong location?

    i was thinking of the last lines of your posted code:

    <?php endwhile; wp_reset_query(); ?>
    </div><!--about-end-->
  5. SorenHK
    Member
    Posted 1 year ago #

    Thank you so much :D It works. I did not understand you correctly the first time and just pasted it after the whole ?>

    I really appreciate your help!

Topic Closed

This topic has been closed to new replies.

About this Topic