Linux 软件免费装
Banner图

Context Manager

开发者 phill_brown
更新时间 2013年11月14日 00:21
捐献地址: 去捐款
PHP版本: 3.2 及以上
WordPress版本: 3.7

标签

widgets context rules widget logic wp_enqueue_styles wp_enqueue_scripts menu rules body class parent menu active menu

下载

1.2.0 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5

详情介绍:

Context Manager makes your site behave differently depending on the current user's context. Using the simple point-and-click admin pages, there are four different ways your site can react:
  1. Include and exclude CSS and JavaScript files
  2. Changing the behaviour of menu items
  3. Hiding widgets in sidebars
  4. Adding extra classes to the <body> tag.
The plugin supersedes Menu Rules Example usage A website has e-commerce shopping functionality driven by a custom post type called 'products'. There's an archive page called 'shop' that lists products and is linked to in the main navigation menu. A user visits 'shop' and the menu item becomes 'active', but when they click through to an individual product, the menu item loses its state. The user becomes lost.
  1. Install the Context Manager plugin
  2. Add a new context rule
  3. Give it a meaningful name in the title field. This is just for administration purposes
  4. In the conditions field enter is_singular( 'product' )
  5. Choose Emulate current page as a child but do not create a menu item. as the menu rule
  6. Find your products page in the menu dropdown
On the product page, there are irrelevant widgets that distract the user from making a purchase. The whole shop section requires its own colour scheme, but there's no common class that ties all the pages together. Remember to click publish when you're ready to save. Have a look at screenshots to see the above setup in action. Support If you're stuck, ask me for help on Twitter.

安装:

  1. Download and unzip the folder from the WordPress plugins repository
  2. Upload the context-manager folder into to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Open the 'Appearance' menu item and click the 'Context Rules' link

屏幕截图:

  • An example setup for a products section in a online shop
  • CSS and JavaScript reactions

更新日志:

1.2.0 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1 1.0.2 1.0.1