Forum Replies Created

Viewing 15 replies - 76 through 90 (of 336 total)
  • I was told that it is a good idea to put analytics code and other js calls in the footer in order not to halt the page load time.

    Thread Starter ThorHammer

    (@thorhammer)

    Never mind. I solved it. For others that might experience this terror: go via control panel or ftp and delete the functions.php in your child theme. I will try to add the extra sidebars and more in the functions.php in the mother theme.

    Thread Starter ThorHammer

    (@thorhammer)

    Please..anyone? I am getting a heart attack … what can I do in order to get back to my admin dashboard? Shuld I delete the entire child theme folder? Should I delete functions.php in twenty twelve?
    (Yes, i know, it was extremly stupid to copy the entire functions.php from twenty twelve to the child theme. Yes, I will create a new theme, basic, from scratch, without any fancy functions).
    BUT – What can I do now?

    Thread Starter ThorHammer

    (@thorhammer)

    Nope … on a multisite install it only get the comments from posts in a specific category in the mother blog, not comments from the same category in the other blogs. Would that be possible to hack?

    Oh my… it would have been a dream if it could posts from certain categories…
    Please, consider?

    Thread Starter ThorHammer

    (@thorhammer)

    Never mind, I solved it…the avatar need its own avatar-class.

    Thread Starter ThorHammer

    (@thorhammer)

    Ok, I have code capable of doing this, but I don’t know how to limit the comments to a category, and if I am using this code in two instances it might be a heavy load on the server. Here is the code (so far):

    <?php>
    
    $sqlstr = '';
    $blog_list = get_blog_list( 0, 'all' );
    $sqlstr = "SELECT 1 as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email from ".$table_prefix ."comments where comment_approved = 1 ";
    $uni = '';
    foreach ($blog_list AS $blog) {
        $uni = ' union ';
        $sqlstr .= $uni . " SELECT ".$blog['blog_id']." as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email   from ".$table_prefix .$blog['blog_id']."_comments where comment_approved = 1 ";
    }
    $limit = '20';
    $limit = ' LIMIT 0, '. (int)$wgt_count;
    $sqlstr .= " ORDER BY comment_date_gmt desc " . $limit;
    $comm_list = $wpdb->get_results($sqlstr, ARRAY_A);
    ?>
    
    <!--the output before styling-->
    
    <ul>
    <?php
    $count = 0;
    foreach((array)$comm_list as $comment):
      $count++;
      if($count == $number+1) break;
      ?>
      <li>
       <?php echo get_avatar($comment->comment_author_email, 32); ?>
       <a href="<?php echo get_blog_permalink($comment->blog_id, $comment->comment_post_ID); ?>" title="commented on <?php echo strip_tags($comment->post_title); ?>">
       <?php echo $comment->comment_author; ?> wrote:
       <?php echo convert_smilies(wp_trim_excerpt($comment->comment_content)); ?>
       (<?php echo human_time_diff(strtotime("{$comment->comment_date_gmt}")); ?>)
       </a>
      </li>
    <?php
    endforeach;
    ?>
    </ul>
    Thread Starter ThorHammer

    (@thorhammer)

    Suddenly — it began top work! I don’t know why, but it works πŸ™‚

    Thread Starter ThorHammer

    (@thorhammer)

    I am using 3.4.2. Perhaps it is the wp version, then. And soon we have 3.5! Please, developer: something is wrong.

    Thread Starter ThorHammer

    (@thorhammer)

    I was in the template world and wrote category IDs like this: 1,3,4….

    So, sorry, I made a mistake. It works like a charm πŸ™‚

    Thread Starter ThorHammer

    (@thorhammer)

    Ah … ops. I tried to ask for posts from two categories (IDs), but when I removed these, the output came … Strange, since this is the only two categories with content.

    Thread Starter ThorHammer

    (@thorhammer)

    Sure, here is the output in the widget:

    Warning: krsort() expects parameter 1 to be array, null given in /home/litterqf/public_html/wp-content/plugins/network-latest-posts/network-latest-posts.php on line 479

    Warning: array_slice() expects parameter 1 to be array, null given in /home/litterqf/public_html/wp-content/plugins/network-latest-posts/network-latest-posts.php on line 482

    Forum: Fixing WordPress
    In reply to: Multi Site Set up

    Are you sure you followed all the steps? First a “clean install”, then altered the wp config? And after that altering your .htaccess?

    Your error messages seems to indicate that your main site doesn’t exist.

    Adjust the padding in post entry and post title h1 (X.)
    You should also look for any single parapraph (P) styles floating somewhere else in your stylesheet, it might have som serious bottom or top padding as well.

    Well, I use sub-directories, but it will not find anything?

Viewing 15 replies - 76 through 90 (of 336 total)