Dankicity
Forum Replies Created
-
Forum: Themes and Templates
In reply to: default template set as sidebar-page.phpNo?
Scoured the database and functions.php and found nothing. I ended up setting all my pages to a different template. Rather annoying.
I don’t understand why it’s named sidebar-page.php in the first place as it goes against the naming convention and/or template hierarchy used by get_sidebar(). Correct?
Forum: Hacks
In reply to: CPT w/o title saving Auto Draft and meta upon creationOnce again, I find the answer a few minutes after I post here.
Solved with snippet from the codex added to the wp_insert_post_data handler
// If it is our form has not been submitted, so we dont want to do anything if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;pointed out by:
http://wordpress.stackexchange.com/questions/26616/automatically-generate-custom-post-title-based-on-meta[Edit] Never noticed the 10 lines of code rule before. Sry about that.
Damn it, why is it only AFTER I spend 4 hours looking for and then trying to solve something that I find the search result I was looking for…
Forum: Hacks
In reply to: Get Tags by Author — Not Tags from Post by AuthorWent ahead and proposed the idea since I realized it wouldn’t work. Best done in a relationship meta table but you’d need a unique id for each relationship entry.
http://ww.wp.xz.cn/extend/ideas/topic/add-unique-id-to-term-relationship-table
Forum: Hacks
In reply to: Get Tags by Author — Not Tags from Post by AuthorI’ll take that as a “Terrible, no and yes”.
Really, no thoughts on doing this? Someone has to have tried/done this.
Forum: Hacks
In reply to: Cannot remove action media_upload_max_image_resizeTypos, Gotta love’m.
You should be able to add/remove through action hooks. Your wording made it sound like you were looking to edit the actual file where the it initially adds the action. If I was correct in that then doing so will break in future updates.
Could always add your own action to post-upload-ui that echos or logs text. Then do the same in other hooks to see when it is ran.
Have to be honest though. I’m not an expert on all the action hooks or if the ordering is correct here:
http://codex.ww.wp.xz.cn/Plugin_API/Action_ReferenceForum: Hacks
In reply to: $wpdb->get-results not workingMaybe:
function my_plugin_get_results () { global $wpdb; $table_name = $wpdb->prefix . "plugin_table"; $active_rows = $wpdb->get_results( "SELECT * FROM {$table_name}" ); foreach ($active_rows as $active_row){ echo $active_row->the_title; } }As for the prefix. It depends if you used the prefix in your table name during activation.
Forum: Hacks
In reply to: Cannot remove action media_upload_max_image_resizeNot sure why you want to do this but try:
function my_remove_mumir() { remove_action( 'post-upload-ui', 'media_upload_max_image_resize'); } add_action('init', 'remove_mumir');–> And never manually edit core files!! <–
Forum: Hacks
In reply to: How to remove anchor tag on category linkSecond example in:
http://codex.ww.wp.xz.cn/Function_Reference/get_the_category<?php $category = get_the_category(); echo $category[0]->cat_name; ?>Forum: Hacks
In reply to: $wpdb->get-results not workingJust do a var_dump of the results to see if you’re getting what you want and how it’s arranged.
echo '<pre>'; echo var_dump( $active_rows ); echo '</pre>';Forum: Hacks
In reply to: WordPress User Management Permissions Tweaks?I’ve been using Members plugin to define custom roles and capabilities.
I haven’t tried it this way but you should be able to set the default role to your custom role through the admin settings.
I wouldn’t suggest changing any of the existing roles and capabilities.