wordpress-plugin

how to localize the number of wordpress post views?

丶灬走出姿态 提交于 2019-12-11 09:46:53
问题 I want to display post view in localize number. I add these function in function.php to do so function make_bangla_number($str) { $engNumber = array(1,2,3,4,5,6,7,8,9,0); $bangNumber = array('à§§','২','à§©','৪','à§«','৬','à§­','à§®','৯','০'); $converted = str_replace($engNumber, $bangNumber, $str); return $converted; } add_filter( 'the_views', 'make_bangla_number' ); But I am unable to show the number in localize. Whenever i call the_views it shows the english number. Any idea how

Infinite Scroll and Image Hover plugin don't really like each other

孤街醉人 提交于 2019-12-11 06:16:42
问题 After incredibly much effort I finally made infinite scroll (via the plugin) work with my theme. Now I got this little riddle for you sherlocks and watsons, which I hope you can solve: Infinite scroll works, but on the pages infinite scroll adds when scrolling down, my image hover plugin doesn't appear anymore . (and image hover is quite important to my site!!) When using your browser's dev tools, you will see, that at least the class wp.imagehoverlite is applied to the freshly loaded images,

total cache plugin write permission to my wp-content folder?

怎甘沉沦 提交于 2019-12-11 05:38:04
问题 This is the first time i am working with wordpress and i am a bit confused about this requirement.A weird requirement by the plugin indeed Its asking me to : Files and directories could not be automatically created to complete the installation. Please enter FTP details below to complete the setup. Also try chmod 777 /var/www/my-project/wp-content Well i am not sure that its safe to give permission 777 to my wp-content folder. It is really required? 回答1: Dont worry !!!! It is not asking

WordPress: Upload Plugin stuck at “Unpacking the package…”, Getting Memory Size Limit Error

て烟熏妆下的殇ゞ 提交于 2019-12-11 05:23:48
问题 I just did a fresh install of WordPress 3.2.1. I've uploaded and activated one plugin with no problem - Contact Form 7. I'm attempting to install Really Simple Captcha, since it goes along with Contact Form 7. But, when I go to install it (either upload from my computer or install from WP, doesn't make a difference), it gets stuck at "Unpacking the package...". I check my server error logs, and they have the following: PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to

404 Errors after update to Wordpress 3.7

僤鯓⒐⒋嵵緔 提交于 2019-12-11 04:59:44
问题 I just updated to WordPress 3.7 this morning, and I started getting 404 errors on one of my custom post types. I am implementing multiple CPT's through one plugin. All other CPT's are wotking fine except one. The code for the same is below: // Register Author Post Type function custom_post_author() { $labels = array( 'name' => 'Authors', 'singular_name' => 'Author', 'add_new' => 'Add New', 'add_new_item' => 'Add New Author', 'edit_item' => 'Edit Author', 'new_item' => 'New Author', 'all_items

PHP dynamic Page-level DocBlocks

故事扮演 提交于 2019-12-11 04:58:24
问题 I was wondering if there is a way to interact with the Page-level DocBlocks. My question is more specifically about wordpress plugin development, but this question has arised also in a non-wordpress environments. The reason is mainly the possibility to easily change VERSIONS and names throughout a large project with maybe a constant definition - but that will reflect also in the docblock.. The following example Docblock is from a wordpress plugin I write - /* Plugin Name: o99 Auxilary

WordPress: List All Posts and Group Them by Month & Year

眉间皱痕 提交于 2019-12-11 04:56:14
问题 When I need to list all posts in 2011 grouped by month, I'd do something like this in WordPress (pretty straightforward as explained here): query_posts('monthnum=12&year=2011'); while ( have_posts() ) : the_post(); echo '<li>'; the_title(); echo '</li>'; endwhile; Now, how to list all posts and group them by month and year, without knowing how far I should go back? That is, I don't know which year was the oldest post written in. Technically, I could try to do monthnum=12&year=2010 , monthnum

how to submit a form in wordpress

蹲街弑〆低调 提交于 2019-12-11 03:50:38
问题 I am using wordpress 3.3.1 with twentyten theme, i have created a plugin to create a custom form, i have successfully installed this in wordpress, my plugin file code is as follows <?php function guest_event_form() { if(isset($_POST['submit']) and $_POST['action']=='new registration') { global $wpdb; $wpdb->query("Insert Query..."); } else { ?> <form method="POST" action="" name="guest_registration" enctype="multipart/form-data"> <input type="text" id="name" name="name" value=""> <input type=

Wordpress strange text over the content of json-api plugin

蹲街弑〆低调 提交于 2019-12-11 02:54:36
问题 I use WordPress 4.1.1. I tried to install the JSON API plugin. Strange letters are displayed above the JSON content. And they update after refresh of the page. I tried to bring another letter under the code of plugin. These letters appeared under these figures, so is the problem in the WordPress system? Please help me to understand and to remove them, because I can't parse my JSON. On localhost it works fine with the same properties and data... The letter are: 7b00c, 78709, 6eb3d... and they

How to remove Post ID from posts and then redirect to new URL?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 02:40:40
问题 I just changed the permalink structure of my wordrpress based blog. Previously it had the permalink structure like this http://www.mysite.com/sample-post-example/2345/ The numbers at the end of the url were automatically generated by wordpress software. In fact these numbers are post_id. Now I have this url structure. http://www.mysite.com/sample-post-example/ Now the problem is that the individual posts are available under both url structures. Is there anyway to redirect (301) old URLs to