Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Well hello there again. I’m just going to leave a link to the solution on StackExchange here, seeing as this is the same questioned pasted over here.

    Sweet! If you can mark this thread as resolved using the dropdown on the right side of this page it will let people know it is solved.

    Okay, I’ve updated my answer above. Try that second snippet.

    Awesome! No problem ??

    Ah, well that would be because that text is not a link. Just remove the “a” part for the h2 element. So, like:

    .site-header h1 a, .site-header h2, .entry-header h1.entry-title a {
    color: #CC0033;
    display: inline-block;
    text-decoration: none;
    }

    Edit: Oh, I see what you mean now. Added the bit for that part too.

    In Chrome, Firefox, and IE8-10 it appears red ( #CC0033 ) to me.

    Try this

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    $link = get_post_meta($postid, 'website', true);
    echo "<a href=\"$link\">$link</a>";
    ?>

    Edit: Okay, I see your response. I’m guessing that you aren’t including the https:// bit in your “website” field. You either need to do that, or use this snippet instead:

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    $link = get_post_meta($postid, 'website', true);
    $protocol = is_ssl() ? 'https:' : 'http:';
    echo "<a href=\"$protocol//$link\">$link</a>";
    ?>
    Thread Starter null

    (@xiroxas)

    Thanks for the replies!

    I know it probably isn’t a best practice to be using the attribute “class” due it being confusing ( and I’ve already changed it to something else ), but what’s interesting is that according to the Codex it is supported.

    Enclosing shortcodes support attributes in the same way as self-closing shortcodes. Here’s an example of the caption_shortcode() improved to support a ‘class’ attribute

    Taken from the Shortcode API Codex Page

    I just wandered what the logic behind restricting it’s use in the Visual Editor was since I can’t imagine how it would really mess up the formatting since shortcodes aren’t actual HTML elements.

    Forum: Fixing WordPress
    In reply to: Weird image issue

    Nice! Glad to see that it’s working now.

    Forum: Fixing WordPress
    In reply to: Weird image issue

    Hmmmm – this is strange. Okay. Here are some bits of advice I’ve scraped from across the internet.

    • Try updating TimThumb by replacing the one that is in your theme
    • Make sure TimThumb itself has permission set to allow execution
    • *Try setting wp-content/uploads to proper permissions

    *I don’t think this one applies so much, it seems that it’s something to do with the cache directory. But then again, none of these are really aimed at that. We already tried setting the cache directory’s permissions, and that didn’t work which is really, really weird

    Hopefully one of those will do it. If not, then, well, I’m not sure what to try next D:

    Forum: Fixing WordPress
    In reply to: Weird image issue

    Ah, the purchase button at the top deceived me ??

    Apart from that, I think I’ve found the problem! I tried accessing the image’s SRC url directly, and BAM! TimThumb spits out an error:

    Could not get a lock for writing.

    So, I would assume that the problem is that you just need to set the proper permissions ( perhaps 0755 ? ) for TimThumb’s cache directory, which should be located at
    wp-content/themes/danko/script/cache

    Awesome! Let’s try and get the second part working, too ??

    Perhaps some screenshots would help?

    Open your WordPress Dashboard. Go To Appearance->Editor. In the drop down at the top right choose the Twenty Eleven theme (not the child theme). Click on functions.php on the right.

    1) Use the find function in your browser to find twentyeleven_comment

    2) Copy from
    if ( ! function_exists( ‘twentyeleven_comment’ ) ) :
    all the way down to and including
    endif; // ends check for twentyeleven_comment()

    and then switch back to editing your child theme using the drop down and paste that chunk into your child theme’s functions.php

    3) Replace the part that starts with
    /* translators: 1: comment author, 2: date and time */
    and ends with
    );

    in the child theme with the second chunk of code from my first post and it should work! ??

    Let me know how it goes!

    Awesome! I’m glad it worked for you ??

    Haha I’m not even sure why that chunk of code would do that even that in demon of a browser. I know you said you are fine with that, but I kind of like to get it 100% right. If you want to, you could post your child theme’s functions.php and I could take a look at it ( maybe upload it to Pastebin or something? ) ??

    If not, I understand – you don’t want to break the part that you just fixed ??

    Forum: Fixing WordPress
    In reply to: Weird image issue

    Because that is a commercial theme, there is no way for me to really dig into this one without purchasing it, but I’ll tell you what I can see from the outside.

    The problem appears to be in the image element. The src attribute is totally messed up!

    <a href="https://richbeaumont.com/charity/wp-content/uploads/2012/06/slider2uc.png"
    class="pirobox first last" title="Empowering" rel="1?of?1" rev="0">
    <img class="slider_img_holder" id=""
    src="https://richbeaumont.com/charity/wp-content/themes/danko/script/timthumb.php?src=https://richbeaumont.com/charity/wp-content/uploads/2012/06/slider2uc.png&w=248&h=138&zc=1&q=100"
    style="opacity: 1; ">
    </a>

    Something has obviously gone nasty with your theme (as you can see it is a PHP script being called from a ‘danko’ subdirectory). I’m not sure but it appears to be trying to pass the URL of the image to some sort of thumbnail processing script and things are going bad from there.

    However, it turns out that the weirdness of you being able to click on the broken image and go directly to the image isn’t all that weird. The image is actually wrapped in another element, a, which contains a valid hyperlink to the image.

    So, seeing as this is a commercial theme, you should probably contact them and explain what is going on, perhaps mentioning the above? Good luck!

    You could use the following code to remove the author’s name from the comment thread and feed. Put this into your child theme’s functions.php file:

    if ( ! function_exists( 'hide_comment_author' ) ) :
    
    function hide_comment_author( $author ){
      return '';
    }
    add_filter( 'get_comment_author', 'hide_comment_author' );
    add_filter( 'comment_author_rss', 'hide_comment_author' );
    
    endif;

    However, you may want to modify your theme’s comment template to account for this so that it doesn’t seem awkward. You will need to override Twenty Eleven’s twentyeleven_comment() function in your child theme. You can do that by creating a new function in your child theme with the same name, pasting the contents of the original twentyeleven_comment() in it, and changing the part that prints the comment info to this:

    printf( __( '%1$s', 'twentyeleven' ),
        sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
            esc_url( get_comment_link( $comment->comment_ID ) ),
                get_comment_time( 'c' ),
            sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time()
    )));

    This should fix your theme so that it only tries to display the date/time and it doesn’t look weird.

Viewing 15 replies - 1 through 15 (of 15 total)