wordpress-plugin

Unable to Display Page Title Using wp_title() Function in WordPress

依然范特西╮ 提交于 2019-12-13 00:16:29
问题 Can you please let me know how I can use the wp_title() function to grab each page titles in WordPress. I used the following code to get the title in different page based on titles but it dost' work! Here is the code I am using <title> <?php if (is_front_page()) { bloginfo('name'); } elseif (is_page()) { wp_title(); echo ' - '; bloginfo('name'); } ?> </title> 回答1: Try this : <?php wp_title('|', true, 'right'); ?> Here is the function reference link : http://codex.wordpress.org/Plugin_API

Wordpress as cms for different page content per country

强颜欢笑 提交于 2019-12-12 12:22:55
问题 Which plugin to use? I use wordpress as a CMS and was wondering which plugin I could use make 1 page with dynamic content for different selected country/per domain/URL? (I would like to have many versions of the same site where, some pages have common page content while other pages have different page content) 回答1: I would recommend http://wordpress.org/extend/plugins/sitepress-multilingual-cms/ 回答2: Try qTranslate http://www.qianqin.de/qtranslate/ used it successfully to provide translations

Gravity Forms adding display none

自作多情 提交于 2019-12-12 11:09:52
问题 I'm creating a custom template inside my WordPress theme, since my template is a completely different layout than my active theme, the template has it's own header & footer and inside of both I have properly declared wp_head(); and wp_footer(); respectively. Inside my template code, I am trying to display a gravity form using do_shortcode, but no form shows. When I inspect the area, I can see the form code, but there is a style="display:none" added to the .gform_wrapper div. As one more note,

Woocommerce Reset Password Not Working

纵然是瞬间 提交于 2019-12-12 11:08:25
问题 I've just updated to the version 2.2.7 of Woocommerce (using WP 4.0) and I'm having trouble getting the password reset to work. Using a test customer account, I use the 'Lost Password' link, and once I've entered my address I receive the e-mail. Only problem is the link in the email just takes me to the login page and doesn't reset the password. Anyone had this issue? 回答1: I discovered the issue - I found it was because the files in mytheme/woocommerce/emails were out of date. The Woocommerce

Custom validation is not working in Contact Form 7 in ver 4.1.1

爷,独闯天下 提交于 2019-12-12 09:44:12
问题 I have to make a form with custom validation field in contact form 7. It is not working with latest version (4.1.1) of Contact Form 7 but working in older version. I have created a field for getting coupon code from the form. I want to validate the entry if the coupon is started from "HIP". My code is given below: add_filter( 'wpcf7_validate_text', 'your_validation_filter_func', 999, 2 ); add_filter( 'wpcf7_validate_text*', 'your_validation_filter_func', 999, 2 ); function your_validation

How to load the Wordpress environment in a php script?

夙愿已清 提交于 2019-12-12 08:29:04
问题 How can I load the Wordpress environment in a script, so I can use Wordpress' functions? I need this because I need to call several functions from a script which is executed asynchronously. 回答1: you need to load the wp-load.php file, which will then allow you to call wordpress functions. For example: require( '../wordpress/wp-load.php' ); with 'wordpress' being your install root. 来源: https://stackoverflow.com/questions/5235200/how-to-load-the-wordpress-environment-in-a-php-script

How do you use curl within wordpress plugins?

烈酒焚心 提交于 2019-12-12 08:03:51
问题 I'm creating a wordpress plugin and I'm having trouble getting a cURL call to function correctly. Lets say I have a page www.domain.com/wp-admin/admin.php?page=orders Within the orders page I have a function that looks to see if a button was clicked and if so it needs to do a cURL call to the same page (www.domain.com/wp-admin/admin.php?page=orders&dosomething=true) to kick off a different function. The reason I'm doing it this way is so I can have this cURL call be async. I'm not getting any

How to include bootstrap in Wordpress plugin development?

天涯浪子 提交于 2019-12-12 07:47:00
问题 I am developing the plugin, and I would like to include bootstrap in my plugin. What is the best way to include? I couldn't find anything related to this, so far I have found several bootstrap plugin, which I dont need, I need to include some js and css element from bootstrap in my plugin. I am new to bootstrap. Also I have tried something similar like including in WP theme, but it doesn't work? If you need more information, please ask me, I will provide you I have tried to include something

Automatically generating custom field values in Wordpress

╄→гoц情女王★ 提交于 2019-12-12 06:59:39
问题 I run a few side blogs that I sort of aggregate into my main blog. I use simplepie to parse the feeds from my other blogs, so the posts are being created automatically. My typical post is layed out like this: IMAGE CONTENT/TEXT HYPERLINK What I'm looking to do is automatically grab the hyperlink, and insert it into a Custom Field. The custom field already exists in the post, but I need to insert the hyperlink contained in the post content as the value. I would need just the link, without the

Google maps with directions on a wordpress page

删除回忆录丶 提交于 2019-12-12 06:46:55
问题 How can I get a map that simply shows how to get from A to B with a car on my WordPress page? I used to do this in Google maps directly, I made a map showing the road from A to B and embed it on the page. It used to be so easy. And under the map I had a link to the same map in Google Maps where you also could get written directions. But like a month ago, Google changed their maps and all my maps got messed up. The links as well. Now I am trying to fix this and make new maps. I have tried in