As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Wordpress/Web design help: New problem

LewiePLewieP Registered User regular
edited July 2010 in Help / Advice Forum
Update:
Uh oh, new problem.

Category pages appear to be broken.

http://savygamer.co.uk/category/deals/pc/

I don't remember fiddling with them. Any idea?

I've done a bit of fiddling with my wordpress site recdently, I managed to fix a few things, but now I've got another problem.

Posts are displaying the tweetmeme button twice. Like so:
http://savygamer.co.uk/2010/07/28/best-of-indie-bundle-vol-3-pc-19-95-2/

Any suggestions?

LewieP on

Posts

  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    Without access to your Theme files it's hard to know exactly whats going on.

    It looks like you have the code for the button in two separate places.

    One is within the .article-teaser div, and another within the .box-left div.

    This could be due to a bunch of things, but it might be as simple as you having the code pasted twice within a single template, or you having it within two separate templates and the single post page is using both.


    - edit

    Yeah, looking at your homepage, you have a tweetme button for each entry, which is within the .box-left div (most likely from your main template)

    Check out your Single Post (single.php) template and try removing the button code from there. (this would be the one within the .article-teaser div)


    But I could be wrong!

    Sharp101 on
  • Options
    LewiePLewieP Registered User regular
    edited July 2010
    I can't see anything that looks like a tweetmeme button in single.php.

    This is the contents of single.php:
    <?php get_header(); ?>

    <div id="content-left">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="box-left clearfix">

    <h2 class="article-title"><?php the_title(); ?></h2>

    <div class="article-meta"><?php the_date(); ?> <?php _e('in'); ?> <?php the_category(', '); ?></div>

    <div class="article-teaser"><?php $more = 0; the_content(''); ?></div>

    <?php after_more_content($post->post_content); ?>

    <?php the_tags('<p class="tags">'.__('Tags','destyle').': ', ', ', '</p>'); ?>

    <?php edit_post_link(__('Edit Post','destyle'), '<p>', '</p>'); ?>

    </div>


    <?php if(!get_option('destyle_auth_dsp')) : ?>
    <div class="box-left box-author clearfix">

    <?php echo get_avatar(get_the_author_email(), '100'); ?>

    <h3><?php the_author_posts_link(); ?></h3>

    <p><?php the_author_description(); ?></p>

    </div>
    <?php endif; ?>

    <?php comments_template('', true); ?>

    <?php endwhile; ?>

    <?php else : ?>

    <div class="box-left">

    <h2 class="article-title"><?php _e('Not found!','destyle'); ?></h2>
    <p><?php _e('Sorry, no posts matched your criteria.','destyle'); ?></p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    </div>

    <?php endif; ?>

    </div><!-- end content-left -->

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    LewieP on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    Hmm, ok. so we know for sure that the second button is within the .article-teaser div, so it probably coming from:

    <div class="article-teaser"><?php $more = 0; the_content(''); ?></div>

    more specifically the <?php $more = 0; the_content(''); ?> part...

    Not sure how to edit that...

    Sharp101 on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    I should have asked before, is this tweetme thing a plugin that you just activated? or did you have to edit your templates to add it in?

    Looking deeper, the_content('') just calls get_the_content() which is something you don't want to touch.

    If you don't want to worry about actually getting rid of it, you can take the easy way out just hide one of the buttons using CSS.
    .article-teaser .tweetmeme_button { display:none; }
    

    So it will still be there in the code, just not displaying on the page.

    Sharp101 on
  • Options
    LewiePLewieP Registered User regular
    edited July 2010
    Well I tried deleting "<?php $more = 0; the_content(''); ?>" to see what happened, and if appears to be fixed.

    Everything else is working fine too....

    Erm...Do you (or anyone else) know what that bit of code is doing?

    Edit: It was a plugin I had, but then I resintalled my theme and changed a few things, and then there was two.

    Edit2: wait, that broke something else, the tweetmeme buttons now don't display on the homepage, I'll try the easy way out.

    LewieP on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    Well, the_content(''); should be getting the content of your post... so I wouldn't go removing that :P


    and make sure to add that code I gave you to your css file (right at the bottom), not the template file.

    Sharp101 on
  • Options
    LewiePLewieP Registered User regular
    edited July 2010
    Yeah I just realised that too, it stopped posting just the teaser.

    Adding that to the css file has made it just show one, but now they aren't showing on the homepage.

    LewieP on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    Hmm, that's weird. Why did it completely remove it from the homepage? it's not even in the source code anymore....

    Remove that css I gave you and lets take another look..

    Sharp101 on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    I'm refreshing the page as you work, and I think you got it now.

    Sharp101 on
  • Options
    LewiePLewieP Registered User regular
    edited July 2010
    I am an idiot and turned it off whilst fiddling with the settings to get it to work.

    It appears to be behaving exactly how I want it to now, so thanks a lot. It's a little wierd, and I'd prefer to know why it went wrong in the first place, but unless any problems come up then this is fine.

    Cheers.

    LewieP on
  • Options
    Sharp101Sharp101 TorontoRegistered User regular
    edited July 2010
    Yeah, if it was just a plugin that automatically added the button to your posts, it's probably just a conflict with how the plugin was made and how the theme was made.

    But this should be fine.

    Sharp101 on
  • Options
    LewiePLewieP Registered User regular
    edited July 2010
    Uh oh, new problem.

    Category pages appear to be broken.

    http://savygamer.co.uk/category/deals/pc/

    I don't remember fiddling with them. Any idea?

    LewieP on
Sign In or Register to comment.