wordpress-plugin

Permalink change each post update in wordpress

帅比萌擦擦* 提交于 2019-12-08 06:44:39
问题 I want to have a custom permalink for each new post in WordPress like: http://mysite.com/x5Kvy6. function wp_unique_post_slug($col,$table='wp_posts'){ global $wpdb; $alphabet = array_merge( range(0, 9), range('a','z') ); $already_exists = true; do { $guidchr = array(); for ($i=0; $i<32; $i++) $guidchr[] = $alphabet[array_rand( $alphabet )]; $guid = sprintf( "%s", implode("", array_slice($guidchr, 0, 12, true)) ); // check that GUID is unique $already_exists = (boolean) $wpdb->get_var(" SELECT

max_input_vars and ACF

前提是你 提交于 2019-12-08 06:40:28
问题 for a client I have to fix a problem. At the moment he can’t save more than 66 fields in an ACF-Group. I was researching a bit and found out, that one possible problem could be, that the max_input_vars in the php.ini is too low, so PHP rejects the POST-Values after 1.000 fields. I was checking and indeed the Form was sending more than 1.000 fields. I first tried the .htaccess-Solution as described e.g. here: http://support.advancedcustomfields.com/forums/topic/repeater-field-values

showing plugin in frontend of website or in page

末鹿安然 提交于 2019-12-08 06:24:19
问题 I want to show my plugin on my website or in page.. I using wordpress 2.3.2 I have given permission to folder also. Example, there are one famous pluigin Holly dolly i edited that and updated , but i don't know how to show in front end.. I know i have to call // Now we set that function up to execute when the admin_notices action is called add_action( 'admin_notices', 'hello_dolly' ); but how? I tried googling but didn't got any perfect solution.. Please help me.. 回答1: This is what i did--

wordpress set post_status as “draft” in 'save_post' action

狂风中的少年 提交于 2019-12-08 05:26:21
问题 I have a custom function that works with my custom post type. While porocessing save_post action: add_action( 'save_post', 'my_custom_function' ); I would like to set post status as draft (in case of a problem with getting custom data from outside api). In my my_custom_function function I have this little block: if ($error == true) { $override_post = array(); $override_post['ID'] = $post_id; $override_post['post_status'] = 'draft'; wp_update_post( $override_post ); } but it seems, that after

Can WordPress handle these functionalities?

核能气质少年 提交于 2019-12-08 05:01:14
问题 I'm a front-end designer/developer whose weapon of choice for the back-end is WordPress. Up to this point all of my projects involving WordPress were fairly basic and it has handled everything beautifully. I just landed a new client that wants some extra functionality built into his next project and I'm hoping some of you WordPress wizards can give me some good advice while I'm putting together the quote. I'm trying to limit the need for any subcontracting for the back-end functionality, so

How to make wordpress blog completely invisible to public [Not Private]

痞子三分冷 提交于 2019-12-08 04:32:14
问题 I want to close a wordpress blog I have from the public and keep it only for myself. I know I can set it to private but it shows an uggly log-in page and I dont want people trying to access it (using random usernames/pass etc) or think that its still open but its for members with accounts or anything like that. I would like the blog to point to a " server not found " for the public and when I am logged in as admin to be able to see my posts and backend aswell as frontend. How can I make this

Why my new users wordpress dont have Post?

ε祈祈猫儿з 提交于 2019-12-08 04:21:41
问题 I try to create a new user to post events, but my new user, called admin , doesn't have the ability to post. I tried changing his role to Editor , Subscriber , Author , and Contribute , but I still cannot post with admin . Currently only the Administrator can post, how can I give admin the rights to do so as well? 回答1: I think your new user role has some limitations. To change the settings of a user role you can use the user role editor plugin. To change the admin menu you can use the

Modify Wordpress plugin function in functions.php

断了今生、忘了曾经 提交于 2019-12-08 02:38:24
问题 I need to change the value of a function from a Wordpress plugin that I'm using. If I do it in the original plugin file, it works perfectly, but I'd rather make it in functions.php to avoid problems on plugin update. I need to change this: public static function loop_shop_per_page() { return get_option( 'posts_per_page' ); } Into this: public static function loop_shop_per_page() { return '-1'; } How would I go to create a filter in functions.php to do just that? 回答1: Without changing the core

Custom Page vs Plugin Slug

怎甘沉沦 提交于 2019-12-07 21:05:51
问题 I'm currently integrating information from a third party API into a wordpress site. What i need to do is create a "dynamic page" where it displays the details of a specific record from the API. Since there are 1000's of records i dont want to create a seperate page in wordpress for every record detail view. I've been looking around and it seems there are two main solutions (i've discarded the custom post type option as i dont think it fits my needs, but im open to re-evaluate). The first is

List custom data in Wordpress

烈酒焚心 提交于 2019-12-07 20:45:08
问题 I'm developing a plugin which has its own table. I need to display the data from the table in the Wordpress frontend (for example: category page). I don't need to JOIN this table with posts table, I just need to display the data from the table, with pagination. I need a separate page/custom template from my plugin directory (talking in a context of MVC frameworks — controller), on which this data should be displayed and paginated. Please give me an advice, what is the best practice to