Ate Up With Motor
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Separate categories being lumped togetherA child theme off Frontier.
Forum: Fixing WordPress
In reply to: Separate categories being lumped togetherFor the posts themselves, it’s this:
<div class="entry-byline"> <?php $post_elements = frontier_option('post_elements'); $page_elements = frontier_option('page_elements'); if ( !isset($post_elements['author']) ) $post_elements['author'] = 1; if ( !isset($post_elements['published']) ) $post_elements['published'] = 1; if ( !isset($post_elements['categories']) ) $post_elements['categories'] = 1; if ( !isset($post_elements['comment_info']) ) $post_elements['comment_info'] = 1; if ( !isset($post_elements['updated']) ) $post_elements['updated'] = 1; if ( !isset($post_elements['tags']) ) $post_elements['tags'] = 1; if ( !isset($post_elements['post_nav']) ) $post_elements['post_nav'] = 1; if ( !isset($post_elements['author_box']) ) $post_elements['author_box'] = 0; if ( !isset($post_elements['comments']) ) $post_elements['comments'] = 1; if ( !isset($page_elements['author']) ) $page_elements['author'] = 0; if ( !isset($page_elements['published']) ) $page_elements['published'] = 0; if ( !isset($page_elements['comment_info']) ) $page_elements['comment_info'] = 0; if ( !isset($page_elements['updated']) ) $page_elements['updated'] = 0; if ( !isset($page_elements['author_box']) ) $page_elements['author_box'] = 0; if ( !isset($page_elements['comments']) ) $page_elements['comments'] = 1; ?> <?php if ( ( is_singular('post') && $post_elements['author'] == 1 ) || ( is_page() && $page_elements['author'] == 1 ) ) : ?><div class="entry-author"><i class="genericon genericon-user"></i><?php the_author_posts_link(); ?></div><?php endif; ?> <?php if ( ( is_singular('post') && $post_elements['published'] == 1 ) || ( is_page() && $page_elements['published'] == 1 ) ) : ?><div class="entry-date"><i class="genericon genericon-day"></i><a href="<?php the_permalink(); ?>"><?php the_time(get_option('date_format')); ?></a></div><?php endif; ?> <?php if ( is_singular('post') && $post_elements['categories'] == 1 ) : ?><div class="entry-categories"><i class="genericon genericon-category"></i><?php the_category(', '); ?></div><?php endif; ?> <?php if ( ( is_singular('post') && $post_elements['comment_info'] == 1 ) || ( is_page() && $page_elements['comment_info'] == 1 ) ) : ?><div class="entry-comment-info"><i class="genericon genericon-comment"></i><a href="<?php the_permalink(); ?>#comment-area"><?php comments_number( __('Comments', 'frontier'), __('1 Comment', 'frontier'), __('% Comments', 'frontier') ); ?></a></div><?php endif; ?> <?php edit_post_link( __('Edit', 'frontier'), '<i class="genericon genericon-edit"></i>' ); ?> </div>
(The if statements are because the theme allows you to toggle whether you want the categories to display or not.)
For the sitemap, it’s this:
<?php $cats = get_categories('exclude=3,11'); foreach ($cats as $cat) { echo "<h3>".$cat->cat_name."</h3>"; echo "<ul>"; $archive_query = new WP_Query('posts_per_page=-1&order=asc&orderby=title&cat='.$cat->cat_ID); while ($archive_query->have_posts()) { $archive_query->the_post(); $category = get_the_category(); echo '<li><a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_title().'</a></li>'; } echo "</ul>"; } ?>
Forum: Fixing WordPress
In reply to: Separate categories being lumped togetherThis is after a migration from another CMS. I imported content to a new WordPress site, cleaned it up, and then moved that to the live domain. I believe it occurred sometime after the latter move, although I’m not positive.
I am quite certain that those posts are not in both categories. Also, as I noted in my original post, if I look at the Categories page in the back end, each affected category shows the correct number of posts, and if I look at each individual post, it shows only the correct category, but for some reason, WordPress is putting them together when asked to sort or filter by one of the affected categories.
Forum: Plugins
In reply to: [Redirection] Clearing logs?Oops, it DOES have that feature. I just wasn’t parsing “expiry” yesterday. Never mind!
Forum: Fixing WordPress
In reply to: Separate categories being lumped togetherYou can see the example mentioned above on the category page here and also the site map.
If you scroll down the category page a bit, you’ll see that it includes posts that are part of the Family Cars category, which should not be on this page at all; they’re lumped together on the site map as well. However, the converse is not true: If you go to the Family Cars category page (here), you’ll see that it does not include any posts from the Luxury and Personal Luxury Cars category (which is as it should be).
Forum: Fixing WordPress
In reply to: Trying to limit access to development site by IP via htaccessSee, I tried that as well (without the custom ErrorDocument) and it still locks me out.
I previously discovered the hard way that it’s not a good idea to simply delete the plugin folder without uninstalling. If you do that, you won’t completely remove it (which can create conflicts with other plugins) and won’t be able to reinstall.
If you’re having problems with internal server errors, what you might try is accessing the site via FTP or shell, downloading the wp-config.php file, and looking for this line:
define( 'BWPS_FILECHECK', true );
Comment this out (adding two slashes in front of it should do the trick) and upload the edited file in place of your existing wp-config.php. This will disable the file checking system.
If that allows you to log in again (it did for me), go into the Security options and uncheck the box for “Enable File Change Detection.” (If you comment out the line in wp-config, the plugin may still think the feature is enabled even though it’s not.) That will stop the file checking.
At that point, if you want to get rid of BWPS, you can deactivate and uninstall it. You could also leave file checking turned off and get a different plugin to monitor file changes. I guess BWPS’ file checker is load-heavy, which can be a problem on shared servers.
Forum: Hacks
In reply to: Remove pingback link from header?I talked to the theme developer, who offered this:
function remove_pingback_url( $output, $show ) { if ( $show == 'pingback_url' ) $output = ''; return $output; } add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
This doesn’t remove the link, but clears the URL from the href, so it appears as
<link rel="pingpack" href="">
That’s probably close enough.
Forum: Themes and Templates
In reply to: [Frontier] Removing pingback URLOkay, that took the URL out (the link is still there, but that filter leaves the href empty).
It wasn’t affecting the site directly, since I removed the xmlrpc file, but I didn’t want to have a link in the header pointing to a nonexistent file.
Thanks again! I really appreciate your help.
Forum: Fixing WordPress
In reply to: Comment IDs set to nullOkay, I figured out the problem: When you import a table not originally created in a WordPress database, it doesn’t have the correct MySQL settings. You have to manually set the parameters for each field from phpMyAdmin, including setting the key ID so that the comment_ID will auto-increment. Fortunately, I had an unmolested WordPress comment table I could look at to see how each field needed to be set.
Once done, the problem was resolved for new comments, although any existing comments with NULL values remained that way. Fortunately, since they were all spam, I could just delete them from the table.
Forum: Hacks
In reply to: Remove pingback link from header?A child theme based on Frontier.
Forum: Hacks
In reply to: Remove pingback link from header?That was the first thing I did, but the link is still in the header. It’s being called by the parent theme’s header.php file.
Forum: Hacks
In reply to: Setting comment_notes_after in comment_formI know that adding a filter hook is not considered theme-hacking; my point was that I couldn’t figure out any way to make the change I wanted without hacking theme files.
Besides not wanting to hack or replace theme files, the reason I was hoping to handle it this way was that I was really hoping I could figure out how to create a simple filter hook so that I can do so again later. I grasp what the filters do and understand approximately how a filter hook would need to work to do what I wanted, but I’m just not familiar enough with PHP or WordPress functions to make it work.
It doesn’t seem like a plugin (even a simple one) should be necessary for something as simple as setting the value of a single argument for comment_form() each time that function is called, but maybe I just don’t get it…
In any case, the action hook gets the job done, so that’s definitely a step in the right direction. Thanks!
Forum: Hacks
In reply to: Setting comment_notes_after in comment_formOkay, I figured out the syntax error and got that to work. I was hoping to add the notice above the submit button (which I’m able to do by setting the comment_notes_after argument for comment_form, although as mentioned that involved hacking or replacing a theme file), so it’s not exactly what I’m after, but it will probably suffice.
Forum: Hacks
In reply to: Setting comment_notes_after in comment_formAlso, I don’t know why it would need an if statement. Basically, I want to add some text that will appear as part of the comment form (above the submit button, which is why I was looking at comment_notes_after) any time comment_form is called.