Forum Replies Created

Viewing 15 replies - 91 through 105 (of 879 total)
  • Hello sampablokuper! Thanks for taking the time to bring up issues about WordPress that concern you. In general that’s how problems get solved and WordPress improves for everyone. But in this case I disagree with your assessment.

    What this issue boils down to is that a while back WordPress developers had to decide on a term for the page where the most recent posts appear, which is not always the top-level page. The term they chose was “home.” The term for the top-level page is “front.”

    Perhaps there could have been better name choices, but those are the ones that they went with and we’re stuck with. So the home.php template file is what is used on the “home” page, which is not necessarily the “front” page.

    You suggest that home.php should show on the “front” page when the “front” and “home” pages are different (when they’re the same, it does). There are several reasons why this isn’t the best idea:

    • “home” has a particular meaning in WordPress, a meaning that would be confused if it were used on the “front” page.
    • We would then lack a template name for the “home” page.
    • We already have a means of creating a custom template for the “front” page, thanks to page templates. So a “front-page.php” template would basically just be a limited version of a regular page template.

    This contradicts the stated template hierarchy. As we all know, when the docs and the code don’t match, developers suffer. Well, I’d been suffering at least half an hour before I stumbled on that forum thread, because I read the docs and trusted them.

    The Codex is a wiki, meaning anybody can edit it. So sometimes there’s stuff on there that’s wrong, imprecise, or just outdated. On the positive side, the Codex is a wiki, meaning you can edit it and fix the problem for the rest of the community!

    Actually, I’m greatly interested in WordPress development and bug-quashing, so if someone has to modify core files to get permalinks to work, not everything is fine.

    implode('|', array_values($GLOBALS['wp_locale']->month))

    That basically makes a string of all the months, like so:

    January|February|March...

    preg_replace is a function that looks for a pattern—called a “regular expression”—and replaces it with something else. In this case, it looks for a month pattern (from that string above) followed by a four-digit number (presumably a year) and then replaces it with the month followed by the right single quote and the last two digits of the year.

    In wp_get_archives('echo=0') the echo=0 argument basically just tells wp_get_archives to return its string instead of printing it; that way we can use it in preg_replace.

    The get_search_form filter. I don’t know where or if it’s documented, but it passes to its callbacks the default search form created in that function.

    essentially, is there a way to easily and completely customize what options are available on any of the admin pages?

    That’s a little vague. What’s an example of an option that you’re having trouble customizing?

    all my internal and incoming links got broken

    What do you mean by “broken”? What do they look like?

    Feedburner Feedsmith does not appear to write to the .htaccess file, so you shouldn’t need anything more than the standard WordPress .htaccess, which is provided to you on the permalinks page in the admin. It usually looks like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    When you say the permalinks don’t work, what exactly doesn’t work? What is the error?

    sanitize_url is defined in wp-includes/formatting.php and used only in wp-includes/widgets.php (twice) so just rename it in those places to something else, like wp_sanitize_url.

    The following will print a list of the last 10 posts for every category:

    foreach( (array) get_all_category_ids() as $cat_id ) :
    	query_posts(array('cat' => $cat_id, 'showposts' => 10));
    	if ( have_posts() ) :
     	?><h2><?php echo get_cat_name($cat_id); ?></h2>
    		<ul>
    		<?php while(have_posts()) : the_post(); ?>
    			<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    		<?php endwhile; ?>
    		</ul>
    	<?php
    	endif;
     endforeach;

    post_category needs to be an array, so something like this should work:

    $my_post['post_category'] = array(prep($row['category']));

    Yes it is. You can define a custom user table for both WordPress and bbPress with

    define('CUSTOM_USER_TABLE', 'your_table_name');

    If the field names are different, you’ll probably need to redefine some of the pluggable functions.

    That means that you’re missing the comments.php template file in your default theme’s directory (usually wp-content/themes/default/).

    Your active theme should have a comments.php file, but apparently yours is missing.

    It has to do with the file ownership / permissions on the different sites. The site that doesn’t ask for the password is probably more permissive, allowing the PHP user to overwrite files without having to use FTP.

    Here’s one way to to do it. Replace wp_get_archives() with the following:

    echo preg_replace(
    	'#(' . implode('|', array_values($GLOBALS['wp_locale']->month)) . ')\s\d{2}(\d{2})#',
    	'$1 &rsquo;$2 /',
    	wp_get_archives('echo=0')
    );

    “error 28” means that your installation of MySQL, the database that WordPress uses, has run out of disk space. You need to contact your site’s host to find out what’s happening.

Viewing 15 replies - 91 through 105 (of 879 total)