1. setting in coustume attribute Use In Layered Navigation ->select fitrable 2. setting in categories Is Anchor->yes
Latest posts
solution for qtranslate not support custom post
Add this function to function.php and wordpress will support qtranslate custom url with lang parameter function qtrans_menuitem( $menu_item ) { if ($menu_item->type == 'custom' && stripos($menu_item->url, get_site_url()) !== false){ $menu_item->url = qtrans_convertURL($menu_item->url); } return $menu_item; } add_filter('wp_setup_nav_menu_item', 'qtrans_menuitem', 0); //add...
add plugin admin menu
add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( 'PDF Selector', 'PDF Selector', 'manage_options', 'PDFSelector', 'my_custom_menu_page', "", 6 ); } function my_custom_menu_page(){ ?> <div clas="wrap"> <h1>PDF Selector</h1> <form action="" method="post"> <label>Client</label><input name="name"/> </form> </div> <?php } ?>
wordpress shortcode
The Shortcode APIIntroduced in WordPress 2.5 is the Shortcode API, a simple set of functions for creating macro codes for use in post content. For instance, the following shortcode (in the post/page content) would add a photo gallery into the...
Magento 社区
Magento 中文社区http://www.magento.la/forum.php锐想Magentohttp://www.ruiwant.com模块开发教程http://www.stonenote.net/category/program/php/magento/page/2
Perfect Full Page Background Image
html { background: url(images/bg.jpg) no-repeat center center fixed;-webkit-background-size: cover; -moz-background-size: cover;-o-background-size: cover; background-size: cover;}http://css-tricks.com/perfect-full-page-background-image/
20 Quick Tips to Optimize Page Load Time
Web page loading speed is the most crucial part of a site’s usability and SEO. Google considers page speed to be one of the 200 ranking factors that influence a website’s position in organic search results and is known to...
[转载]Magento模板安装详细过程
Magento安装指南不同于其他简单模板主题(WordPress主题)Magento模板(Magento主题)在布局上都不同Magento模板布局取决于如下四个要素:1、布局(Layout) – (app/design/frontend/your_interface/new_theme/layout/)2、模板(Templates) – (app/design/frontend/your_interface/new_theme/template/)3、皮肤(Skins) – (skin/frontend/your_interface/new_theme/)4、语言环境(Locale) – (app/design/frontend/your_interface/new_theme/locale/)为了安装和集成一个新的Magento 模版,您需要遵循几个步骤:如果你已经下载您喜欢的Magento主题,那么这里教你如何安装已下载的Magento 主题并整合到现有的Magento网站中。1、解压Magento主题模板zip文件(可以使用winrar或WinZip来Windows机器上解压缩或解压缩zipfilename.zip使用解压缩文件到Linux上的文件服务器)2、复制您的app文件夹至整个应用程序的新的主题下/app/design/frontend/default/像这样:/app/design/frontend/default/new_theme3、复制skin文件夹至您的新主题下/ skin/frontend/default/new_theme像这样:/ skin/frontend/default/new_themeMagento模板路径4、Magento商店加入新的Magento主题后,需要登录到Magento后台设置网店的Magento布局。Magento网站后台管理5、有时Magento会有缓存所以你不会立刻看到Magento模板安装后的效果。为了测试你的新的主题是否已经安装成功,你需要暂时禁用 Magento缓存。进入“System > Cache Management “选择”Disable”,然后点击“Save Cache”。一旦你完成了所有步骤再次启用缓存即可。Magento设置缓存6、进入System -> Configuration(系统>设置),并选择Design7、输入您的Magento模板的名称,复制的皮肤文件(skin/ CSS)名称,然后点击“Save Config”(保存配置)Magento模板设置8、(可选)如果你的Magento网站上需要显示一个模块,像Maagento模板主题演示的模块。进入CMS -> Static Blocks ,并点击”Add New Block“。根据您的安装模块说明添加新的模块并激活,使用这种新的模块。最后选择“Enable”并点击“Save Block”。转到并选择“Custom Design”标签,并在布局选择“Home Page”,否则你主页将会是空白的。Magento CMS Block9、(可选)默认的Magento商店页面是一个CMS block,所以你必须要写一段自定义代码,以便在主页上显示内容。CMS- > Manage Pages 选择 “Home...
How to use qtranslate plugin
Print strings in template in different languages: <?php _e("<!--:en-->english text<!--:--><!--:de-->german text<!--:-->"); ?> Get current language: <?php qtrans_getLanguage(); ?> Convert link to homepage: <?php echo qtrans_convertURL(get_settings('home')); ?>
get user meta
get user metaDescriptionRetrieve a single meta field or all fields of user_meta data for the given user. Uses get_metadata(). This function replaces the deprecated get_usermeta() function. Usage <?php get_user_meta($user_id, $key, $single); ?> Parameters $user_id(integer) (required) The ID of the user whose data should be...