The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Features by WooThemes
Using different 'features' on different pages (4 posts)

  1. seanuk
    Posted 3 years ago #

    Firstly, overall this is a fantastic little plugin! Thank you :)

    I want to have a different set of features on two different pages, so I use the plugin as normal. How then can I have a different set of features on the other page ?

    I'm guessing I can use 'id' => 0 (display a specific item) but that would require calling the plugin for however many features I want on that page with the corresponding ID each time (not ideal) ?

    Is there a way of calling the plugin to run for X amount of items, but offset to the first ID of the set of features I want on that page ?


  2. Andrey
    Posted 3 years ago #

    I am interested in this as well.

  3. Marcus03
    Posted 3 years ago #

    I am trying to do this too

  4. saxisme
    Posted 3 years ago #


    quite new in this coding, but this is what i came so far, and works for my needs.

    I created a custom taxonomy for the 'feature' custom post type.
    (I'm using Twentytwelve theme)

    Add this to your functions.php

    // Register Custom Taxonomy
    function Position()  {
    	$labels = array(
    		'name'                       => _x( 'Positions', 'Taxonomy General Name', 'twentytwelve' ),
    		'singular_name'              => _x( 'Position', 'Taxonomy Singular Name', 'twentytwelve' ),
    		'menu_name'                  => __( 'Genre', 'twentytwelve' ),
    		'all_items'                  => __( 'All Genres', 'twentytwelve' ),
    		'parent_item'                => __( 'Parent Genre', 'twentytwelve' ),
    		'parent_item_colon'          => __( 'Parent Genre:', 'twentytwelve' ),
    		'new_item_name'              => __( 'New Genre Name', 'twentytwelve' ),
    		'add_new_item'               => __( 'Add New Genre', 'twentytwelve' ),
    		'edit_item'                  => __( 'Edit Genre', 'twentytwelve' ),
    		'update_item'                => __( 'Update Genre', 'twentytwelve' ),
    		'separate_items_with_commas' => __( 'Separate genres with commas', 'twentytwelve' ),
    		'search_items'               => __( 'Search genres', 'twentytwelve' ),
    		'add_or_remove_items'        => __( 'Add or remove genres', 'twentytwelve' ),
    		'choose_from_most_used'      => __( 'Choose from the most used genres', 'twentytwelve' ),
    	$args = array(
    		'labels'                     => $labels,
    		'hierarchical'               => false,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    	register_taxonomy( 'feature-position ', 'feature', $args );
    // Hook into the 'init' action
    add_action( 'init', 'Position', 0 );

    Then i added after line 403 in the file class-woothemes-features.php:
    $query_args['feature-position'] = $args['position'];

    The in the shortcode you can add the tag 'feature-position'=>'your custom position here'. This is my result:
    do_action( 'woothemes_features', array( 'limit' => 3, 'link_title' => true, 'per_row' => 3, 'size' => 150, 'position' => 'homepage' ) ); ?>

    Of course as soon as the plugin is updated it will overwrite this addition.
    At least it's a start.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Features by WooThemes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.