wordpress-plugin

how to show an element, do something else and then hide that element in one click event?

 ̄綄美尐妖づ 提交于 2019-12-12 01:47:09
问题 I'm using contact form 7. I have a form submit button, when i click it gif loader image shows up and then validation status message shows up along with gif image disappear. in css i'm using .ajax-loader{display:none;} in js i'm using $('.wpcf7-submit').click(function(){ $('.ajax-loader').show(); if('block' == $('div.wpcf7-display-none').css('display')){ $('.ajax-loader').hide(); } }); But this code is not working as alerting $('div.wpcf7-display-none').css('display') is still showing " none "

Using EasyFancybox Wordpress Plugin alongside Infinite-Scroll

最后都变了- 提交于 2019-12-12 01:03:48
问题 Trying to figure out how to reinitialize Easy FancyBox when new content is loaded in with infinite scroll. I tried $.fancybox.init() , but this doesn't seem to be enough. In the head section the script that calls easy fancybox is: jQuery(document).ready(function($){ var fb_timeout = null; var fb_opts = { 'overlayShow' : true, 'centerOnScroll' : true, 'showCloseButton' : true, 'showNavArrows' : true, 'onCleanup' : function() { if(fb_timeout) { window.clearTimeout(fb_timeout); fb_timeout = null

wordpress update_post_meta and get_post_meta

六月ゝ 毕业季﹏ 提交于 2019-12-12 01:02:19
问题 I'm currently working on a plugin for worpdress and have ran into a strange problem. I currently have a frontend form which the user fills in and submits. Once submitted this then creates a post in a custom post type, with the following function: $my_post = array( 'post_title' => $title, 'post_type' => 'product_enquiries', 'post_content' => $message, 'post_status' => 'private', 'post_author' => 1, ); $post_id = wp_insert_post( $my_post ); update_post_meta($post_id, '_user_email', $_POST[

how to pass variable from plugin php to another php file in wordpress using session/function or javascript?

假如想象 提交于 2019-12-12 00:49:34
问题 I have oneplugin file testplugin.php..It contains variable $abc; //main plugin.php if(!is_admin()){ new Funtion_Button(); } class Function_Button { if(is_single() || is_page() || is_home() ){ global $post; global $wpdb; $query_images_args = array( 'post_type' => 'attachment' , 'post_mime_type' =>'image','post_status' => 'published', 'posts_per_page' => -1,'numberposts' => 1 $query_images = new WP_Query( $query_images_args ); $images = array(); foreach ( $query_images->posts as $image) {

existing wordpress website in multiple languages

有些话、适合烂在心里 提交于 2019-12-12 00:12:28
问题 I have an existing word press website in English language. I want to make a copy of the website in another language. I do not need auto translation as I can enter contents separately. Is there a plugin for this? Or do I need to have one more wordpress site / subdomain? 回答1: There are two ways to go: WPML or plugin way WPML or any translation plugin, but personally I find WPML the best option, even though it's not free. The plugin handles everything, string translation, language switcher, page

How to show correct tax on basket (BEFORE checkout)?

故事扮演 提交于 2019-12-11 23:19:17
问题 I have a simple problem. I have set up multiple tax rates for different countries. However, on the basket page - when not having visited the checkout page so far - it shows the tax from the base country. In my case: I have a shop based in AT. I have set up taxes for AT and CH. If a user visits with a Switzerland IP, I restrict the country list to just Switzerland, and set a PHP variable. Nevertheless the country isn't in the woocommerce_countries anymore, WC calculates the taxes with the base

Easy Contact Forms plugin does not work with PHP 5.5.9

ぃ、小莉子 提交于 2019-12-11 22:43:54
问题 The WordPress plugin Easy Contact Forms doesn't with WordPress 3.9 and PHP 5.5.9 It doesn't show the form fields, nor you can edit, and it won't show the form in the website. I notice because it gives me this error: Ajax error. Status =error Internal Server Error I look at the log files and see the error is in the file: easy-contact-forms/easy-contact-forms-database.php at line 152, due to the function mysql_real_escape_string I tried to use another similar functions, but either doesn't work,

wordpress. lightbox plugin error on apply_filter

泄露秘密 提交于 2019-12-11 22:40:47
问题 I use the plugin https://wordpress.org/plugins/show-post-in-lightbox/ to display all feautered image of every post on a page. whenver one of these images get clicked on a lightbox will appear showing the post content. This all works fine but the original code that display the content uses: if($_REQUEST['popup']!=''){ $postObj = get_post( $_REQUEST['pid'] ); echo $postObj->post_content; exit; } This works fine besides the fact that its not very need because wordpress cant format the html. also

woocommerce product showing two “Add to Cart” button on responsive mobile/tablet view?

我的未来我决定 提交于 2019-12-11 22:16:06
问题 I am using woocommerce plugin, It is showing products details on desktop view is correct but when i switch on mobile view or tablet(i.e. responsive) view then it shows two "Add to Cart" button for one product. 回答1: Single product is displayed from wp-content\plugins\woocommerce\templates\single-product.php This file (wp-content\plugins\woocommerce\templates\content-single-product.php) is called from single-product.php for adding content and add-to-cart button on single product page. 回答2: If

Crayon Highlighter error when i got the post on my webpage(Wordpress)

北城余情 提交于 2019-12-11 20:28:02
问题 I build a wordpress plugin but I have a problem. When I used both wordpress plugin (Mine & Crayon), my code override crayon´s code and encode it post. This is the message i watch [crayon-546b7a833e38a220649795/] instead of the main post. I´m looking forward to hearing from you.! 回答1: There is an unspecified reported issue on the wordpress support site for the crayon plugin: https://wordpress.org/support/topic/plugin-crayon-syntax-highlighter-not-working-in-category-view Basically, try loading