abstractic
Forum Replies Created
-
Forum: Plugins
In reply to: [Basic Comment Quicktags] Trying to get property of non-objectI got rid of this error on my home page, but recently discovered the same error on my 404 page, so I managed to track down what causes the error.
Both the home page and the 404 page are not a singular page, and in my case and in probably many other cases these two pages have neither blog posts or a singular post visible as a part of its content, so there’s not a post ID available and therefore the generated error.
If you swap the attributes in your if statement, the error goes away “comments_open() && is_singular()“, like this “is_singular() && comments_open()“, and that might help removing this error in a case similar to mine.
Forum: Plugins
In reply to: [Basic Comment Quicktags] Trying to get property of non-objectI had a closer look at your code and I can’t really see anything wrong with it, but I can see an error in the WordPress code on the line which generates the error.
$open = ( ‘open’ == $_post->comment_status );
They don’t even check if the comment status is set, before they are trying to use it? In my case the post ID is empty, so it returns nothing, because it is on the home page and I have nothing on the home page, except some custom widgets.
I built my own theme and in this case I use a child theme for the bbPress plugin and the only plugins that are active right now, is bbPress and Basic Comment Quicktags. To note is that the normal comments option is not even activated, only the option for bbPress comments, but works nicely with both, so no comments there.
I really like your plugin and I use it for my bbPress solution, just because it is neat, clean and it doesn’t bloat the source code with a lot of unnecessary inline JavaScript and other bad things like adding a stylesheet file in BODY source π
Thanks anyway.
Forum: Fixing WordPress
In reply to: Is it possible to create a custom page to use in ajax or iframeI solved this in a lot easier way, than I thought I would. Just create a custom template, i.e. template_lightbox.php (Template Name: Lightbox Page) and create all your pages that you’ll like to open in a lightbox window.
Then check for your new template (Lightbox Page) in header.php and footer.php with the following code (see below), to remove all html that you don’t want to be visible in the lightbox window. In my case menus, sidebar, header and footer, except the CSS and Javascript.
The last thing is just to open your page with suitable lightbox solution.
if (esc_html(get_post_meta($post->ID, '_wp_page_template', true)) != 'template_lightbox.php')Forum: Themes and Templates
In reply to: Stop “language_attributes” producing invalid XHTML 1.1?Sorry think I was too quick there, the correct headers should be:
<html xmlns=”http://www.w3.org/1999/xhtml” dir=”<?php bloginfo(‘text_direction’); ?>” xml:lang=”<?php bloginfo(‘language’); ?>”>
<head>
<title>The title</title>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
<meta http-equiv=”Content-language” content=”<?php bloginfo(‘language’); ?>” />Forum: Themes and Templates
In reply to: Stop “language_attributes” producing invalid XHTML 1.1?The correct way to parse the language in that meta tag is as simple as this:
<meta http-equiv=”Content-language” content=”<?php bloginfo(‘language’); ?>” />