liperuf
Forum Replies Created
-
Forum: Plugins
In reply to: need to order the Admin > Edit Post list by custom field valueScribu and it’s Custom Sortable Columns post also helped me!
Forum: Plugins
In reply to: Custom column, order by optiondpc036, I had the same question a few days ago.
It was not easy for me to find out how to make my custom columns sortable. This article helped me a lot: http://scribu.net/wordpress/custom-sortable-columns.html
You’ll need 3 hooks to do the job:
- manage_edit-{post-type}_columns
- manage_edit-{post-type}_sortable_columns
- manage_posts_custom_column
While the first hook tells WP: “Ok, put this column here for me”, the second one says: “Now, this custom column will append this query string“.
I my case, the third hook almost done nothing, because I created a column called “menu_order”, a native attribute from WP (used in Pages context). So, read the post above to deal with your specific case.
I hope it helps!
Cheers
Forum: Fixing WordPress
In reply to: manage/edit custom columns – function not being recognizedHi Daniel,
You can’t create functions with “-” character. Use “_” (underline) instead!
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Infinite search wheelThanks @scribu!
Forum: Fixing WordPress
In reply to: (Urgent)how Link images to blog post in gallery.Sorry @decca1o. I forgot about pastebin bureaucracy.
So, paste the code below in functions.php
This piece of code unset original URL field and adds another metadata-URL field.
Then, you need to hook the “saving” process aswell (also paste this in functions.php):
And, finally, access it’s value width:
$custom_url = get_post_meta($post->ID, '_custom_link', true);inside any Loop, where
$post->IDis an attachment ID.I hope it helps!
Forum: Fixing WordPress
In reply to: (Urgent)how Link images to blog post in gallery.That was my problem also 🙂
Unfortunately, there’s no way to change wordpress’ original behaviour. The alternative method, however, is quite simple: unset the original “URL” field and add a new, controllable, fashioned “URL” field.
Write this code at your functions.php
[Code moderated as per the Forum Rules. Please use the pastebin]
To access it’s value, try:
$custom_url = get_post_meta($post->ID, '_custom_link', true);It’s all about the right hook, people!
Original idea from: http://wpveda.com/adding-custom-fields-to-wordpress-media-gallery-upload/
Forum: Alpha/Beta/RC
In reply to: Add option to hide new Admin Baradd this to your functions.php:
function hide_admin_bar(){ return false; } add_filter( 'show_admin_bar', 'hide_admin_bar' );original idea from http://www.netchunks.com/how-to-remove-wordpress-admin-bar/
Forum: Fixing WordPress
In reply to: Post by Email: No Body Text or ImagesSolved!
I’m posting from my Gmail account. When you create a new message, you MUST click on PLAIN TEXT option (above the email textarea).
If you don’t use Gmail you have to manually set your webmail to send new emails in Plain Text mode, I guess.
And, to publish instantly from ANY email account instead of only registered emails, follow this thread /topic/237080.
PS: Remember to erase your email signature when posting to WP 🙂
Forum: Fixing WordPress
In reply to: Posting via email – only title showing upSame problem described in http://ww.wp.xz.cn/support/topic/279644
Forum: Fixing WordPress
In reply to: Post by Email: No Body Text or ImagesSame problem.
Already tried a patch described in WP Trac but it also didn’t work.
Soon, i’ll start to debug <domain>/<wp-installdir>/wp-includes/class-pop3.php!!!