JsonB123
Forum Replies Created
-
Forum: Alpha/Beta/RC
In reply to: Custom Post Types not appearing in automatic_feed_links yet?After some digging…this appears to work. Is this the right way to go about it though?
http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page
Forum: Themes and Templates
In reply to: Display images in Media LibraryOkay, I’ve figured out a way to grab your media items using the ID of that media object:
$post = get_post($media_item_id); if($post && $post->post_type == 'attachment') $attachment = array($post->ID => $post); print_r($attachment);Now you can use that data to with whatever you wish. It should contain all of the fields relating to the media object.
Forum: Themes and Templates
In reply to: Display images in Media LibraryI think it’s really sort of short-sighted to only allow the querying of images that are attached to a post or page. I have a plugin installed that allows me to tag media, for example, so I’d like to be able to query on that media’s tags (media seems to function like a post anyway, right)?
Also, I have a section where I allow the user to specify a media attachment’s ID. I’d then like to take this ID and query the media object with it…and I’d like to do it via WordPress’ built in functionality…but it doesn’t seem like that exists! I guess I have to resort to writing some SQL statement :-(.
I can query the media object with the get_attachment_metadata() function…but for some reason that function fails to return the caption, description and other data that can be inserted besides the actual object! What gives?
Forum: Fixing WordPress
In reply to: WordPress 2.9.2 w/ Firefox 3.6 on Mac OS X…. note to self: Web Developer toolbar is great, except when you accidentally forget to re-enable all JavaScript again.
:-).
Forum: Themes and Templates
In reply to: Remove paragraph tags from excerptI love the WordPress community!
@arranp hmm… that’s strange, have you got it working now? This is how I have mine set up, and it case there is no excerpt, I call the_content_rss to print out a truncated version of the content, so it’s super clean.
<?php #Display the excerpt if specified, otherwise use the content rss feed to display only the first 8 words (clever) if (!empty($post->post_excerpt)) : remove_filter('the_excerpt', 'wpautop'); the_excerpt(); else : the_content_rss('', FALSE, '', 8); endif; ?>Forum: Fixing WordPress
In reply to: Migrating WordPress.com video / audio bracket functionalityI’m surprised that there is nothing addressing this issue. This is a huge problem if I have to manually go and change EVERY embed over to a real embed code. Why doesn’t the WordPress.org framework include this functionality inherently?
Very strange.
Forum: Plugins
In reply to: Creating a Plugin confusion with examples in CodexNo one? Really? I’m just wondering about the differences between these two pages. They are massively different! Someone help me out 🙁
Forum: Plugins
In reply to: Private, per-user page?Hi guys,
I think I may have a solution (at least it’s working for my situation…so far).
Use the wplogin-redirect plug-in that ben_allison pointed out above and then also use the User Permissions plug-in along with it. Once you install this plug-in, every time you make a post it will have a box that allows you to check off read/write access as well as two text inputs for comma-separated IDs for allowing specific users read/write access. There is even a text-field to redirect to a certain post/page ID when a user who doesn’t have access tries to go to the page/post.
In conjunction with the wplogin-redirect, I set up a redirect to a specific page that I then used this User Permissions plug-in on and gave admin read/write access and only a single user read access…thereby making it only viewable to me (the admin) and the user who I gave access to.
**NOTE** User Permissions is no longer being updated and hasn’t been officially tested with WordPress after version 2.6.2… so it may have some wacky side-affects that I don’t know about yet. So far it seems to be working fine. I’m using WP 2.8.1 with it.