wordpress-plugin

Adding two sidebars in wordpress child theme

廉价感情. 提交于 2020-01-23 03:44:47
问题 In Wordpress I want to make two sidebars. One will be in left hand side of the content and the other one will be in the right hand side (default sidebar) in twentyelven theme. For that I made little bit customization to my twentyeleven child theme. In functions.php I made this changes register_sidebar( array( 'name' => __( 'Left Hand Sidebar', 'buygames' ), 'id' => 'sidebar-left', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3

<fb:comments-count> not working on my WordPress powered blog

可紊 提交于 2020-01-23 03:40:06
问题 I am using the Facebook comments plugin on WordPress and the comments box is working fine but I want to access the number of counts on the index page and on single pages. On the pages, the Facebook Javascript is loaded on the pages. Here's the code I used: <fb:comments-count href=<?php echo get_permalink() ?>/></fb:comments-count> comments But it doesn't count the FB comments. Is there a simple code that let me retrieve the number of comment counts? Thanks, 回答1: Include this function

Woocommerce to only run javascript if a specific payment method is selected

风格不统一 提交于 2020-01-23 01:46:27
问题 I have developed a payment gateway plugin for Woocommerce, and it relies heavily on some javascript which loads a popup to capture user details. I need that javascript to run only if THAT gateway is selected from the radio buttons. For some reason it doesn't work. Here's my code jQuery(document).ready(function() { usingGateway(); jQuery('form[name="checkout"] input[name="payment_method"]:checked').change(function(){ usingGateway(); }); }); function usingGateway(){ console.log(jQuery("input

How can I insert the Calendar plugins?

柔情痞子 提交于 2020-01-16 19:21:12
问题 I have installed the WordPress Calendar plugins, and I'd like (in some point of the page) add this plugins, without add the default Calendar to a widget and call this widget to the page (such as <?php dynamic_sidebar( 'secondary-widget-area' ); ?> ). I mean, like to use SidebarEventsList() for the WP Events Calendar Plugins How can I do it? Which method I need to call? Tried with <? {CALENDAR} ?> as the readme.txt says, but I get an error Parse error: syntax error, unexpected '}' 回答1: To use

How do I add A Div around each WordPress post image ? [closed]

送分小仙女□ 提交于 2020-01-16 18:46:27
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I want to add a div around every image that is posted on my wordpress blog post. How can I do it? (For the curious ones, I'm attempting to pop out some share buttons whenever a user hovers over an image). 回答1: Add the following snippet of code into your functions.php file: add_filter( 'image_send

Android: how to develop plugin like feed.nu in WordPress ?

风流意气都作罢 提交于 2020-01-16 18:40:08
问题 The feed.nu plugin generates APK(Android) file from our blog that we can use on android I am planning to write a wordpress plugin that converts our blog into an APK file that we can install in our Android device or emulator . I am completely new to Android , but I have done a wordpress plugin previously . This feed.nu is a plugin that works in the same way . I just learned how to run an APK file in an Android emulator . So, how can i write such a plugin ? Where should i start ? Do i need to

Simple Regular Expression to return text from Wordpress title - qtranslate plugin

可紊 提交于 2020-01-13 18:12:37
问题 I am using qtranslate wordpress plugin to store blog content in multiple languages. Now I need to extract content from qtranslate tags. $post_title = "<!--:en-->English text<!--:--><!--:it-->Italian text<!--:-->"; What would be the php code & regular expression to return text and language from this string? Thanks a lot! 回答1: Try something like: <?php $post_title = "<!--:en-->English text<!--:--><!--:it-->Italian text<!--:-->"; $regexp = '/<\!--:(\w+?)-->([^<]+?)<\!--:-->/i'; if(preg_match_all

How to parallelize downloads across hostnames on WordPress?

痞子三分冷 提交于 2020-01-13 11:15:22
问题 I'm getting this message "Parallelize downloads across hostnames" when checking my WordPress site on GTmetrix > https://gtmetrix.com Here are the details > https://gtmetrix.com/parallelize-downloads-across-hostnames.html How do I fix that ? 回答1: Details Web browsers put a limit on the number of concurrent connections they will make to a host. When there are many resources that need to be downloaded, a backlog of resources waiting to be downloaded will form. The browser will make up as many

How to parallelize downloads across hostnames on WordPress?

安稳与你 提交于 2020-01-13 11:15:01
问题 I'm getting this message "Parallelize downloads across hostnames" when checking my WordPress site on GTmetrix > https://gtmetrix.com Here are the details > https://gtmetrix.com/parallelize-downloads-across-hostnames.html How do I fix that ? 回答1: Details Web browsers put a limit on the number of concurrent connections they will make to a host. When there are many resources that need to be downloaded, a backlog of resources waiting to be downloaded will form. The browser will make up as many

Wordpress: PHP Fatal error: Call to undefined function get_option()

十年热恋 提交于 2020-01-13 08:50:09
问题 I've searched almost everywhere, but proposed answers didn't help me. Problem: I've got a Wordpress installation, last version (3.6.1). I've done a clean install multiple times, looked into the wp-includes/option.php and other files and I'm pretty sure it all works and all has the correct content. I'm developing a plugin, and I'm making use of the Wordpress-defined function get_option . Whenever my code calls that function, I get a 500: internal server error response. Weird, cause the code of