ardamis
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: wp_title() removing separatorI’ve written some instructions for changing the behavior of wp_title to produce better page titles. This includes a method for removing the separator, as the original poster requested, and also for removing the unwanted spaces, per a later request.
https://www.ardamis.com/2006/07/03/optimizing-the-syntax-in-the-wordpress-title-tag/
Forum: Fixing WordPress
In reply to: What wp header code do I use in non-wp pages?Try:
<?php
require('./wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
?>
This seems to throw the desired HTTP Status Code: HTTP/1.1 200 OK while allowing the non-WordPress page to use WP tags and themes.
A more complete description of the method: https://www.ardamis.com/2006/07/10/wordpress-googlebot-404-error/
Good luck.
Forum: Themes and Templates
In reply to: Missing Template Files Makes WP Fall Back on Default?The priviledged information thing was just me being wordy. I simply meant that I would monitor the theme files to make sure they did sync up, in an attempt to put to rest some of your objections and to progress the conversation. Because, in the end, the “why” is irrelevant. I could probably think up a few more reasons why someone would want this functionality, none of which may convince you or anyone else of its worth, but that wouldn’t get me any closer to a plugin.
You are quite right that, if the changes to the theme behavior described in this thread ever made it into the core, WordPress would become more complicated, most likely to its detriment.
So, to return circuitously to the last paragraph in my first post, is there someone out there who would be willing to help by either developing such a plugin or putting me on the correct path by pointing out the hooks and things I would need?
Forum: Themes and Templates
In reply to: Missing Template Files Makes WP Fall Back on Default?I’ve acquiesced on the automatic fall back suggestion, admitting that an opt-in method is preferable.
And I admit that there are some drawbacks to inheriting partial themes, including the possibility that the inherited files won’t sync up with the custom files.
But instead of telling me how to do something, you’re insisting that I don’t need, or really don’t want, to do it in the first place.
For the sake of argument, which isn’t why I’m here, incidently, let’s suppose that I have priviledged information about how the themes in question have been constructed, and all the practical problems concerning divs being closed have been worked out.
Let’s further suppose that I’m not talking about my single personal site which I can treat like a work of art, but that I’m coming from a position where I need to manage dozens or even hundreds of domains, hypothetically speaking, let’s say thousands of sites. These thousands of sites each have unique themes built (read: cobbled together) by dozens of different people of disparate ability over a long period of time. Many of the themes are, as you suggest, copies of the default template with changes to a few files. Now imagine you are responsible for making particular changes to these themes. How would you efficiently make changes to these sites? How would you pick out which files have been intentionally changed and are therefore critical and which files are just copies of a 16-month old and aging version of the default which could be harmlessly replaced? The effort involved in manually downloading, evaluating, changing, and re-uploading each template file in this morass of domains makes my brain swim. I’m trying to find a logical way to facilitate updating a theme in a pretty difficult working environment, hypothetically speaking, of course.
But maybe I’m barking up the wrong tree, your best thoughts?
Forum: Themes and Templates
In reply to: Missing Template Files Makes WP Fall Back on Default?So maybe WP doesn’t revert until you instruct it to do so, by telling it which folder to revert to, using something like the “Template: default” theme header.
I’m trying to future-proof a theme here. Let’s say the only template file in my custom theme folder is footer.php. My theme is set to fall back on the default theme, which is currently v1.6. Fast foward to a year from now. WP uses a substantially different default theme, let’s call it v3.02, with all sorts of wonderful new functionality built in. Without any effort on my part beyond upgrading WP, my theme picks up this new functionality from all of the default theme files that don’t exist in my custom theme.
Forum: Fixing WordPress
In reply to: Duplicative TemplatesI’d like to create a theme using less than a full set of template files. When WP needs a file that doesn’t exist in the theme folder, it would fall back on either a specified theme or the default theme. In this way, my theme would inherit future updates to the default theme for any files that it didn’t contain.
Has anyone come up with a way to implement this? The stylesheet-only method isn’t quite enough, but the full-template-files method is more than I need or want.
The stylesheet-or-everything approach also means that most people are going to have unneccessarily outdated themes.
Forum: Fixing WordPress
In reply to: i got rid of raquo in title tag but now there is spaceWell, it’s not pretty, but you can remove the leading spaces by editing the template-functions-general.php file.
Change
$prefix = '';
if ( isset($title) )
$prefix = " $sep ";
to
$prefix = '';
if ( isset($title) )
$prefix = "";
This has been verified to work in version 2.0.3.