petitnuage
Forum Replies Created
-
Forum: Plugins
In reply to: [sCategory Permalink] [Plugin: sCategory Permalink] Does not work with 3.3The sCategory Permalink extension is now broken, now WordPress 3.3 has apparently changed its way to deal with categories.
Since the plugin appears to have not been maintained for a while, I suggest you to switch to to another plugin, Hikari Category Permalink. It is a fork from the previous one.
Once downloaded, you have to:
- deactivate the broken sCategory Permalink extension;
- activate the new Hikari Category Permalink extension;
- rename your permalink structure from
%scategory
to the WordPress-standard%category
.
Your previous posts have their preferred categories preserved. I’ve just checked on my own website with success.
Forum: Hacks
In reply to: How to get a post in draft status from its slug?You’re right. I’m going to use your nice function. Thanks a lot! ??
Forum: Hacks
In reply to: How to get a post in draft status from its slug?Thanks George, you’re right, that should do.
However, that implies to access to the database directly. I’ve been doing that long time ago. Then, years later, the database structure changed. Since then, I prefer to use the WordPress API whenever possible, since I feel it more stable than the database structure. I might be wrong, however.
What do you think about this?
Forum: Hacks
In reply to: How to get a post in draft status from its slug?No, I’m not trying to publish a post. I’m working on a WordPress shortcode “insert_another_post” where I want to include any post inside another one on display.
A post content looks like this:
blah blah [insert_another_post id="555"] blah blah
That kind of shortcode is usefull to display some short up to date information that has not been written in the intent of becoming a whole independent post or page, just a part of another post.
What I want is to make also possible to include a post with its slug, in addition to its id:
blah blah [insert_another_post name="short-description-cms-wordpress"] blah blah
In my case, I can use the id only, but that’s still annoying. I really wish to use the slug to make it more user friendly.
Now for your problem.
If you really have to do so, you can ask for all the posts found in all the categories, then loop into the results to find the post you are looking for using its slug.
It’s a very ineffective solution, and this is the reason I don’t want to use it, but it can be done.
Forum: Hacks
In reply to: How to get a post in draft status from its slug?It appears I made an error here:
The very same function using the post ID works perfectly well:
$post = &query_posts( array( 'include' => $postid, 'post_type' => 'any', 'post_status' => 'any' ) );
and returns the post. The ‘include’ parameter accepts IDs, but not slugs.
The working code does not call query_posts() but get_posts():
$post = &get_posts( array( 'include' => $postid, 'post_type' => 'any', 'post_status' => 'any' ) );
But that does not change anything to my problem. Any idea would be welcome.
You’re right, sorry. I’ve read everything now.
There is another issue here: your plugin is based on proprietary code, since it cannot run without it. So, it cannot be distributed under GPL. And then, it cannot be hosted on www.remarpro.com.
Forum: Fixing WordPress
In reply to: Theme Preview showing preview of CURRENT themeDelete your cookies and the Theme Preview feature is going to come back again.
Forum: Themes and Templates
In reply to: Theme Preview on WordPress not working!@Dgold & smark016 I encountered the same issue today and I’ve solved it by clearing the cookies on my browser. This implies to log in again in the administration panel. Once done, the theme preview works again. I should have written down the cookies before doing that, in order to check what bug might imply this.
Forum: Plugins
In reply to: [Plugin: GD Star Rating] Compatibility issue with All in one SEOI’ve just forgotten to tell the above message appears after a user has voted.
More over, it would be great votes would not redirect to a new URL (the old one plus the query string), since that produces duplicate content on the web site.
Forum: Fixing WordPress
In reply to: Can’t insert picture in post with 2.5I have the same issue (impossible to insert the uploaded image to the currently edited post) with Firefox 2.0.0.14 under Mac OS X 10.5 Leopard with WordPress Mu 2.5.1 and a blog installed on an IDN (International Domain Name that uses non-ASCII characters). As suggested above, the error message:
uncaught exception: [...] Window.send_to_editor
is probably due to an abusive cross-site-scripting FF protection, since the IDN can be written in both non-ASCII and only-ASCII characters. That theory appears to be right, since Safari 3.1.1 does not suffer from that issue.