web-betty
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Block editor no longer working: only shows HTMLI had this problem and @cloudblackfire solution of unchecking “Disable the visual editor when writing” and my problem was solved! It took 3+ hours to find this solution—thank you!
Forum: Fixing WordPress
In reply to: Exclude my comments in the sidebarHi. Anyone have any thoughts on this? Thanks! ??
Forum: Themes and Templates
In reply to: 2nd sidebar not showing up in “widgets”Ok, I changed the file rightbar.php to sidebar-right.php, then I changed the file name in the funtions.php file to call to sidebar-right.php. While this did not break anything, it didn’t solve the problem, either. Here’s the original functions.php code that calls to the 2nd sidebar:
function get_rightbar(){ include (TEMPLATEPATH . "/rightbar.php"); } if ( function_exists('register_sidebars') ) { register_sidebars(2, array( 'before_widget' => '<li><div id="%1$s" class="widget %2$s">', 'after_widget' => '</div></li>', 'before_title' => '<div class="title">', 'after_title' => '</div>', )); function unregister_problem_widgets() { unregister_sidebar_widget('Search'); unregister_sidebar_widget('Recent Comments'); unregister_sidebar_widget('Recent Posts'); unregister_sidebar_widget('tag_cloud'); unregister_sidebar_widget('meta'); unregister_sidebar_widget('links'); unregister_sidebar_widget('calendar'); unregister_sidebar_widget('pages'); unregister_sidebar_widget('archives'); } add_action('widgets_init','unregister_problem_widgets'); }
Here’s the modified functions.php:
function get_rightbar(){ include (TEMPLATEPATH . "/sidebar-right.php"); } if ( function_exists('register_sidebars') ) { register_sidebars(2, array( 'before_widget' => '<li><div id="%1$s" class="widget %2$s">', 'after_widget' => '</div></li>', 'before_title' => '<div class="title">', 'after_title' => '</div>', )); function unregister_problem_widgets() { unregister_sidebar_widget('Search'); unregister_sidebar_widget('Recent Comments'); unregister_sidebar_widget('Recent Posts'); unregister_sidebar_widget('tag_cloud'); unregister_sidebar_widget('meta'); unregister_sidebar_widget('links'); unregister_sidebar_widget('calendar'); unregister_sidebar_widget('pages'); unregister_sidebar_widget('archives'); } add_action('widgets_init','unregister_problem_widgets'); }
The only change was to the 2nd line that calls to the file.
What else do I need to change?
Forum: Themes and Templates
In reply to: 2nd sidebar not showing up in “widgets”Would this mean having to find and change every instance of “rightbar” in the code? Or do I just have to change the name of the rightbar.php file, and where it’s being called from?
Here’s the code from my theme functions (functions.php) page:
<?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<li><div id="%1$s" class="widget %2$s">', 'after_widget' => '</div></li>', 'before_title' => '<div class="title">', 'after_title' => '</div>', )); // have a look for additional widgets and activate them $widgets_dir = @ dir(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets'); if ($widgets_dir) { while(($widgetFile = $widgets_dir->read()) !== false) { if (!preg_match('|^\.+$|', $widgetFile) && preg_match('|\.php$|', $widgetFile)) include(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets/' . $widgetFile); } } function get_rightbar(){ include (TEMPLATEPATH . "/rightbar.php"); } if ( function_exists('register_sidebars') ) { register_sidebars(2, array( 'before_widget' => '<li><div id="%1$s" class="widget %2$s">', 'after_widget' => '</div></li>', 'before_title' => '<div class="title">', 'after_title' => '</div>', )); function unregister_problem_widgets() { unregister_sidebar_widget('Search'); unregister_sidebar_widget('Recent Comments'); unregister_sidebar_widget('Recent Posts'); unregister_sidebar_widget('tag_cloud'); unregister_sidebar_widget('meta'); unregister_sidebar_widget('links'); unregister_sidebar_widget('calendar'); unregister_sidebar_widget('pages'); unregister_sidebar_widget('archives'); } add_action('widgets_init','unregister_problem_widgets'); } /* Function Change Header */ define('HEADER_TEXTCOLOR', 'cedbde'); define('HEADER_IMAGE', '%s/images/header.png'); // %s is theme dir url define('HEADER_IMAGE_WIDTH', 912); define('HEADER_IMAGE_HEIGHT', 120); function theme_admin_header_style() { ?> <style type="text/css"> #headimg { margin: 0px 0px 20px 0px; height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; width: <?php echo HEADER_IMAGE_WIDTH; ?>px; background: url(<?php header_image(); ?>) no-repeat top center transparent;} #headimg * {color: #<?php header_textcolor();?>;} #headimg #desc { border: none; font-size: 12px; text-align: center; font-variant: small-caps; letter-spacing: 1px; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; font-family: Verdana, Arial, Helvetica, sans-serif;} #headimg h1 { text-align: center; border: none; font-size: 24px; font-weight: normal; letter-spacing: 1px; font-variant: small-caps; margin: 0px 0px 0px 0px; padding: 40px 0px 0px 0px; font-family: Verdana, Arial, Helvetica, sans-serif;} #headimg h1 a {border: none;} </style> <?php } function theme_header_style() { ?> <style type="text/css"> #header { margin: 4px 0px 0px 14px; text-align: right; height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; width: <?php echo HEADER_IMAGE_WIDTH; ?>px; background: url(<?php header_image(); ?>) no-repeat top center transparent;} #header * {color: #<?php header_textcolor();?>;} </style> <?php } if ( function_exists('add_custom_image_header') ) { add_custom_image_header('theme_header_style', 'theme_admin_header_style');} /* Plugin Name: Recent Comments Edit Plugin URI: https://mtdewvirus.com/code/wordpress-plugins/ Description: Retrieves a list of the most recent comments. Version: 1.18 Author: Nick Momrik Author URI: https://mtdewvirus.com/ */ function mdv_recent_comments_edit($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) { global $wpdb; $request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN ('publish','static') "; if(!$show_pass_post) $request .= "AND post_password ='' "; $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments"; $comments = $wpdb->get_results($request); $output = ''; if ($comments) { foreach ($comments as $comment) { $comment_author = stripslashes($comment->comment_author); if ($comment_author == "") $comment_author = "anonymous"; $comment_content = strip_tags($comment->comment_content); $comment_content = stripslashes($comment_content); $words=split(" ",$comment_content); $comment_excerpt = join(" ",array_slice($words,0,$comment_lenth)); $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID; if ($comment_style == 1) { $post_title = stripslashes($comment->post_title); $url = $comment->comment_author_url; if (empty($url)) $output .= $before . $comment_author . ' on ' . $post_title . '.' . $after; else $output .= $before . "<a href='$url' rel='external'>$comment_author</a>" . ' on ' . $post_title . '.' . $after; } else { $output .= $before . '<span class="last">' . $comment_author . ':</span> <a href="' . $permalink; $output .= '" title="View the entire comment by ' . $comment_author.'">' . $comment_excerpt.' ...</a>' . $after; } } $output = convert_smilies($output); } else { $output .= $before . "None found" . $after; } echo $output; } /* Plugin Name: Most Commented Edit Plugin URI: https://mtdewvirus.com/code/wordpress-plugins/ Description: Retrieves a list of the posts with the most comments. Modified for Last X days -- by DJ Chuang www.djchuang.com Version: 1.4 Author: Nick Momrik Author URI: https://mtdewvirus.com/ */ function mdv_most_commented_edit($no_posts = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $duration='') { global $wpdb; $request = "SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS 'comment_count' FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish'"; if(!$show_pass_post) $request .= " AND post_password =''"; if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date "; } $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts"; $posts = $wpdb->get_results($request); $output = ''; if ($posts) { foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $comment_count = $post->comment_count; $permalink = get_permalink($post->ID); $output .= $before . '<a href="' . $permalink . '" title="' . $post_title.'">' . $post_title . '</a> (' . $comment_count.'x)' . $after; } } else { $output .= $before . "None found" . $after; } echo $output; } // helper functions $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' and post_status = 'publish'"); if (0 < $numposts) $numposts = number_format($numposts); $numcmnts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); if (0 < $numcmnts) $numcmnts = number_format($numcmnts); // ---------------- /* Plugin Name: Post Word Count Edit Plugin URI: https://mtdewvirus.com/code/wordpress-plugins/ Description: Outputs the total number of words in all posts. Version: 1.02 Author: Nick Momrik Author URI: https://mtdewvirus.com/ */ function mdv_post_word_count_edit() { global $wpdb; $now = gmdate("Y-m-d H:i:s",time()); $words = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE post_status = 'publish' AND post_date < '$now'"); if ($words) { foreach ($words as $word) { $post = strip_tags($word->post_content); $post = explode(' ', $post); $count = count($post); $totalcount = $count + $oldcount; $oldcount = $totalcount; } } else { $totalcount=0; } echo number_format($totalcount); } /* Plugin Name: Gravatar Edit Plugin URI: https://www.gravatar.com/implement.php#section_2_2 Description: This plugin allows you to generate a gravatar URL complete with rating, size, default, and border options. See the <a href="https://www.gravatar.com/implement.php#section_2_2">documentation</a> for syntax and usage. Version: 1.1 Author: Tom Werner Author URI: https://www.mojombo.com/ CHANGES 2004-11-14 Fixed URL ampersand XHTML encoding issue by updating to use proper entity */ function gravatar_edit($rating = false, $size = false, $default = false, $border = false) { global $comment; $out = "https://www.gravatar.com/avatar.php?gravatar_id=".md5($comment->comment_author_email); if($rating && $rating != '') $out .= "&rating=".$rating; if($size && $size != '') $out .="&size=".$size; if($default && $default != '') $out .= "&default=".urlencode($default); if($border && $border != '') $out .= "&border=".$border; echo $out; } ?>
Sorry…I’m confused ??
Forum: Themes and Templates
In reply to: 2nd sidebar not showing up in “widgets”Good morning (here anyway) ?? and thanks for the reply. Here’s the sidebar.php code:
<div id="sidebar"> <ul> <!-- Dynamic Sidebar (Widgets) --> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <!-- Search --> <?php include(TEMPLATEPATH . '/sidebar/search.php'); ?> <!-- Sidestep --> <?php if ( is_single() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/sidestep.php'); ?><?php } ?> <!-- The Pages --> <?php include(TEMPLATEPATH . '/sidebar/pages.php'); ?> <!-- The Categorys --> <?php include(TEMPLATEPATH . '/sidebar/categories.php'); ?> <!-- Neue Kommentare --> <?php if ( is_home() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/last.php'); ?><?php } ?> <!-- Tag Cloud --> <?php include(TEMPLATEPATH . '/sidebar/cloud.php'); ?> <!-- Blog Control --> <?php include(TEMPLATEPATH . '/sidebar/control.php'); ?> <?php endif; ?></ul> <!-- End Dynamic Sidebar --> <div class="bottom"> </div><!-- End Bottom --> </div><!-- End Sidebar -->
Here’s the rightbar.php code:
<div id="rightbar"> <ul> <!-- Dynamic Sidebar (Widgets) --> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?> <!-- Welcome --> <?php if ( is_home() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/welcome.php'); ?><?php } ?> <!-- Feeds --> <?php if ( is_single() || is_page() || is_archive() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/feed.php'); ?><?php } ?> <!-- Kalender --> <?php if ( is_archive() || is_search() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/calendar.php'); ?><?php } ?> <!-- Aktuelle Beitr?ge --> <?php if ( is_single()|| is_page() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/topical.php'); ?><?php } ?> <!-- The Blogroll --> <?php if ( is_home() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/blogroll.php'); ?><?php } ?> <!-- The Archive --> <?php include(TEMPLATEPATH . '/sidebar/history.php'); ?> <!-- Meist kommentiert --> <?php if ( is_single() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/most.php'); ?><?php } ?> <!-- Statistics --> <?php if ( is_archive() || is_search() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/statistics.php'); ?><?php } ?> <!-- Blogbutton --> <?php if ( is_home() ) { ?> <?php include(TEMPLATEPATH . '/sidebar/button.php'); ?><?php } ?> <?php endif; ?></ul> <!-- End Dynamic Sidebar --> <div class="bottom"> </div><!-- End Bottom --> </div><!-- End Rightbar -->
Any help is greatly appreciated. I try and troubleshoot things myself as much as possible, but this one is a little out of my element.
Forum: Themes and Templates
In reply to: 2nd sidebar not showing up in “widgets”Good morning! Still looking for help here…
Forum: Themes and Templates
In reply to: Changing header color, default themeUnfortunately, if you’re going to manipulate WP themes, even the classic and Kubric, you need to be able to modify even basic CSS. You might find some CSS resources helpful:
Forum: Themes and Templates
In reply to: My own theme not workingOk, I’m not a WP expert, but I have fiddled around with several templates and 2 blogs. I’ve taken a look at the code you posted above, and compared it with the classic and default templates that come with the WP download, as well as several free templates I’ve downloaded. The order of your PHP statements doesn’t match any of them.
Here’s a link to a theme I was considering: Elegance Remix. Nice, not too complicated. Here’s the code from the index.php:
<?php get_header(); ?> <!-- Container --> <div class="CON"> <!-- Start SC --> <div class="SC"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="Post" id="post-<?php the_ID(); ?>" style="padding-bottom: 40px;"> <div class="PostHead"> <h1><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1> <small class="PostAuthor">Author: <?php the_author() ?> <?php edit_post_link('Edit'); ?></small> <p class="PostDate"> <small class="day"><?php the_time('j') ?></small> <small class="month"><?php the_time('M') ?></small> <small class="year"><? // php the_time('Y') ?></small> </p> </div> <div class="PostContent"> <?php the_content('Read the rest of this entry »'); ?> </div> <div class="PostDet"> <ul> <li class="PostCom"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></li> <li class="PostCateg">Filed under: <?php the_category(', ') ?></li> </ul> </div> </div> <!--<?php trackback_rdf(); ?>--> <div class="clearer"></div> <?php endwhile; ?> <div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div> <?php else : ?> <h2><?php _e('Not Found'); ?></h2> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div> <!-- End SC --> <div class="SR"> <?php get_sidebar(); ?> </div> <!-- Container --> </div> <?php get_footer(); ?>
You can see that the order of the PHP statements is different than what you have listed. I won’t guarantee this is the problem, but I think it’s a good starting point for you to consider.
If you are unable to solve this, have you thought of finding a good WP template, and then simply trying to change the images and color scheme? This is generally what I do (while giving credit to the developer who created the layout).
I hope this helps.
Forum: Themes and Templates
In reply to: 2nd sidebar not showing up in “widgets”Hi again,
New day, new forum viewers. Anyone have any thoughts on my problem?
Thanks!
Melissa
Forum: Themes and Templates
In reply to: My own theme not workingPlease post the URL that links to the blog. Seeing the site is helpful, but forum members need to see the blog with the code to help troubleshoot.
Forum: Themes and Templates
In reply to: Themes not working on v2.6. Need Help!I’m just reading through some posts to see if I can help in my limited capacity. I’m not a super-experienced WP user, but I do know more than the newbie (enough to be dangerous, I suppose). ??
I attempt to do a lot of my own troubleshooting before posting a problem that stumps me, as I know it can be frustrating to help someone who isn’t willing to help themselves.
That being said, whooam! I just wanted to tell you that it’s nice to see someone willing to go the extra mile and help out someone who clearly needs it. From Auph-x’s posts, it seems that maybe English is not their first language, so they weren’t able to completely get across all of the information.
I’ve read several posts in the last few days (including this one) where moshu has been rude and belittling. If you don’t want to be helpful, you certainly shouldn’t be a moderator. Sure it can be annoying to answer the same questions repeatedly, but that’s what happens on forums like these. If you don’t want to help people by using the obviously extensive knowledge you have with WP, you shouldn’t post. Of course, now heaven help me on my next post when I need assistance–I’m sure moshu will have very nice things to say to me. ??
Forum: Themes and Templates
In reply to: My own theme not workingThis might seem like an obvious question, but have you downloaded a few sample templates to see how they’re coded? I recommend looking at all of the files in the standard or classic WP template (the 2 that come with the WP download). My index.php has a lot more code than what you’ve listed (although, I have a robust template).
Another obvious question…have you created the template/shell the PHP functions are calling to? You might want to provide more detailed information for the experts here (of which I am not one). ??
Forum: Themes and Templates
In reply to: Adding comments to pagesYou guys are brilliant! I tried to copy some code that looked like it was what I needed and it obviously was not correct.
This worked like a charm
Thank you for the assistance!
Forum: Themes and Templates
In reply to: Adding comments to pagesNew day, new forum viewers. ??
I’m still looking for guidance on this issue. As you can see from my other posts, I try and do as much troubleshooting on my own as I can, but I am far from a WP expert and this has me stumped (I know nothing about PHP).
Any help is greatly appreciated.
Forum: Themes and Templates
In reply to: Get rid of annoying “ad links” in footerOk, I answered my own question ??
I simply replaced the functions.php with the “clean” version and didn’t see any problems.
Now, if I could get a response to my question about adding comments on pages, not just posts, I think I’d be all set (for now, anyway).
Thanks again!