wordpress-plugin

Plugins menu doesn't appear in the admin panel

南笙酒味 提交于 2019-11-29 06:14:14
I'm having a very simple problem. I'm new to WordPress and I'm trying to install a plugin. Everyone says there's a "plugins" option on the sidebar-menu in the admin panel, but I don't see one! I've looked for it in all the sub-menus too. Whenever I try to search for this problem, I get results about creating a plugin to show on the admin menu. Anyway, how can I get the plugins menu to show up? The issue is almost certainly related to one of two things: 1) You don't have permissions (are you logged in as admin?) OR 2) The theme (or a plugin) has disabled the plugins menu. After you've checked

Wordpress - get post based on meta field content

﹥>﹥吖頭↗ 提交于 2019-11-29 05:16:24
问题 I'm developing a wordpress plugin. I'm using two different custom post types, players and teams . Players has relevant meta fields: First name, last name, and team. Teams has relevant meta fields of team name. While editing a specific team post, I'm trying to have an array of all the players that currently have that team's name posted to their meta field for team name. I'm not sure how to do this. Any help or articles would be really helpful. Thanks 回答1: The important thing is that you are

social content locker for blogger.com blogs? is it possible

痞子三分冷 提交于 2019-11-29 04:42:01
How can I integrate social content locker in blogger blogs? We see in numbers of WordPress blogs and websites, But in blooger.com blogs you see no plugin option does anybody has another way or something like this? I Want visitor to like, tweet or g+ before reading my posts. thanks I found this working script for this what you need to do is first backup you template. then edit HTML >search <head> tag and put this code after <head> <script src='http://code.jquery.com/jquery-1.10.2.min.js' type='text/javascript'/> After that search </head> tag and put below code before this tag <link href='https:

How do do_action and add_action work?

偶尔善良 提交于 2019-11-29 03:37:33
I am trying to find what exactly do_action and add_action works. I already examine with add_action but for do_action i am trying as new now. This what i tried. function mainplugin_test() { $regularprice = 50; if(class_exists('rs_dynamic')) { $regularprice = 100; } // and doing further //like i echoing the regular price echo $regularprice; //It print 100 from this code } Now instead of placing few code in main file i am planning to create do_action to avoid code messing issue. function mainplugin_test() { $regularprice = 50; do_action('testinghook'); // and doing further //like i echoing the

WordPress, jQuery UI CSS Files?

我怕爱的太早我们不能终老 提交于 2019-11-29 02:54:04
I'm trying to create a WordPress plugin, and I would like to have jQuery UI Tabs in one of my settings pages. I already have the scripting code set: wp_enqueue_script('jquery'); // Enque jQuery wp_enqueue_script('jquery-ui-core'); // Enque jQuery UI Core wp_enqueue_script('jquery-ui-tabs'); // Enque jQuery UI Tabs ...and I have created the HTML and JavaScript too. Until here all are fine. The question is: The WordPress platform comes with some scripts already pre-installed like the one I have enqueue above. My script runs fine with the tabs, but it is not styled! So what I'm trying to ask,

How to use session in wordpress in plugin development

浪尽此生 提交于 2019-11-28 21:17:06
I am new to write a plugin ..I am having a testplugin.php file and a ajax.php file .. My code in testplugin.php is global $session; print_r($abc); //$abc is array of my data .. $session['arrayImg']=$abc; //saving data in session echo $session['arrayImg']; //displayin "Array" And my ajax.php consists of following code global $session; $abc = $session['arrayImg']; print_r ("abs== ".$abc); //displayin "abs== Array" And if use session_start(); I get following error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent I just want to send array

Fatal error: Maximum execution time of 30 seconds exceeded in C:\\xampp\\htdocs\\wordpress\\wp-includes\\class-http.php on line 1610

…衆ロ難τιáo~ 提交于 2019-11-28 19:17:32
I am facing that error while installing Jet pack plugin on my WordPress localhost site. i have search on this site many answer but that not fulfill my requirement Please locate the file [XAMPP Installation Directory]\php\php.ini (e.g. C:\xampp\php\php.ini ) open php.ini in Notepad or any Text editor locate the line containing max_execution_time and increase the value from 30 to some larger number (e.g. set: max_execution_time = 90 ) then restart Apache web server from the XAMPP control panel If there will still be the same error after that, try to increase the value for the max_execution_time

Inserting a post in Wordpress using MySql

情到浓时终转凉″ 提交于 2019-11-28 18:23:05
Does anyone know how to insert a new post into Wordpress using sql? Chuck Conway You can use the Post object: // Create post object $my_post = array(); $my_post['post_title'] = 'My post'; $my_post['post_content'] = 'This is my post.'; $my_post['post_status'] = 'publish'; $my_post['post_author'] = 1; $my_post['post_category'] = array(8,39); // Insert the post into the database wp_insert_post( $my_post ); More info found here . Your question asks how to insert a new post into WordPress using SQL. If you really wanted to do that, taking a look at the "wp" database tables and do a standard INSERT

How to filter WooCommerce products by custom attribute

家住魔仙堡 提交于 2019-11-28 17:28:40
问题 I'm trying to filter WooCommerce product archive by custom attributes. For example, there are 5 products with attribute "color" containing "red", and another 3 with attribute "color" containing "blue". How can I apply a filter to the products loop, so only the products containing "red" will be shown? Thanks 回答1: On one of my sites I had to make a custom search by a lot of data some of it from custom fields here is how my $args look like for one of the options: $args=array('meta_query'=>$meta

Woocommerce get variation product price

╄→尐↘猪︶ㄣ 提交于 2019-11-28 17:17:59
Im trying to display the product variation price inside the variations dropdown. Im trying to change default behavior where price is displayed inside a div when you choose a variation on the dropdown. The problem is i cant find where that div is getting the variation price. I searched all javascript but couldnt find it If i use : add_filter('woocommerce_variation_option_name' ,'add_price_to_dropdown'); function add_price_to_dropdown($name){ global $product; return $name.' '.$product->get_price_html(); } I just get min variation price for all options. I want to get the price for each variation.