studioanino
Forum Replies Created
-
Måns, actually WP has that data stashed in the post_meta table. You can use wp_get_attachment_metadata to grab all existing sizes of an image, including custom sizes.
Forum: Fixing WordPress
In reply to: Custom Page Template Won't Display Any ContentWhat govpatel said.
Also, a quicker and more fool-proof way to setup your home page template is to name it
home.php. WordPress will pick it up automatically without you needing to link the template via page attributes. In this case you won’t need the/* Template Name: ... */block.If you’ve switched your front page to a static page, also add something like this to your functions.php:
function site_templates($template) { // Use home.php for front page if ( is_front_page() ) $template = get_query_template('home'); // Use blog.php for blog section homepage if ( is_home() && get_post_type() == 'post' ) $template = get_query_template('blog'); return $template; } add_filter('template_include', 'site_templates');Forum: Installing WordPress
In reply to: Installing WordPress In Root With Existing HTML Site?Yes, all relative URLs and paths will automatically reflect whatever level you are — site root or sub directory. Nothing is “changing” per se, and that’s the point, since it’s all relative.
At worst, when you make the transition, go to your combined options page at “/wp-admin/options.php” and check these option parameters: fileupload_url, home, siteurl, upload_path and upload_url_path.
Forum: Installing WordPress
In reply to: Installing WordPress In Root With Existing HTML Site?Aedryan, to avoid hardcoded URLs, use relative URLs and paths throughout your theme.
E.g., in your CSS, don’t do something like:
background-image: url("http://domain.com/sub-dir/images/example.jpg");Rather, do this:
background-image: url("images/example.jpg");So when you move your theme files, you won’t have to do a search and replace to remove “sub-dir” from URLs.
Same thing applies to PHP includes, JavaScript registrations and CSS links. Go with native WP calls like the TEMPLATEPATH constant or get_bloginfo functions.
Generally, these best practices make for a more portable, domain-independent theme or plugin.
Forum: Plugins
In reply to: [Plugin: Simple Twitter Connect]: minor bugSee fix here.
Forum: Plugins
In reply to: Simple Twitter Connect – Can't Log Out@marianolozano: Yes, all three lines replace that single line. The problem has been noted on the PHP documentation.
I’m only using stc-comments.php, but I’d assume the same applies to stc-login.php.
Forum: Plugins
In reply to: Simple Twitter Connect – Can't Log OutHas to do with “session_unset()” used in line 150 of stc-login.php and line 50 of stc-comments.php.
Replacing with this should solve it:
session_start(); session_unset(); session_destroy();