Community Forums › Forums › Archived Forums › General Discussion › featured tabs – genesis tabs
Tagged: Featured Tabs, genesis tabs
- This topic has 10 replies, 4 voices, and was last updated 9 years, 5 months ago by wortfm.
-
AuthorPosts
-
June 21, 2014 at 6:21 am #110933EricaMember
Hi guys,
I write beacause I can't solve an issue.
I wish that the plug-in genesis tabs (which has the function of extending the widget featured post) let me select specific taxonomies of a custom post type, rather than categories.Is it possible? Can you help me?
Thanks in advance
Erica
http://awesomescreenshot.com/0a02ztxv8eJune 21, 2014 at 9:10 am #110948efullerMemberThis is doable.
The easiest way I would know to do this would be to edit the plugin file directly and add just a few arguments. This may not be a bad option since the plugin rarely gets updated.
Functionality could also be wrapped up in a plugin that extends the widget if this would be preferred.
In the meantime, if a better solution isn't proposed, let me know which of the above you would be comfortable with.
I am a web developer
June 23, 2014 at 11:08 am #111178EricaMemberYes, indeed my intention was to copy and rename the plugin and then edit it.
How do I point to a specific taxonomy for a specific custom post type?
Can you help me?June 23, 2014 at 11:29 am #111181calculator.ltdParticipantHi,
I'd love to know how to do this as well.
Thanks.
June 23, 2014 at 11:42 am #111187efullerMemberSure thing. It's a pretty simple fix.
Open up the plugin.php file and look at the code starting on line 227. There should be 10 lines of code that all look like the one I will post here. They make up the dropdowns made available in the widget.
You will want to change each one that you want to show a taxonomy. (they will no longer show categories)
You will be adding an argument to the end of the 'wp_dropdown_categories' function. The text you will want to add will be this:
, 'taxonomy' => 'taxonomy_name'
Where 'taxonomy_name' is the name of the taxonomy you want it to pull from.
Here is a full line with the addition:
<p><?php wp_dropdown_categories( array( 'name' => $this->get_field_name( 'posts_cat_1' ), 'selected' => $instance['posts_cat_1'], 'orderby' => 'Name' , 'hierarchical' => 1, 'show_option_all' => __( "- None Selected -", 'genesis' ), 'hide_empty' => '0', 'taxonomy' => 'taxonomy_name' ) ); ?></p>
I hope this helps and that it wasn't too confusing. Let me know if I need to clarify anything.
I am a web developer
June 24, 2014 at 4:23 am #111274EricaMemberFirst of all thank you very much for your help, you are generous.
Your help has made me realize that I could get what I wanted.
I did as you said and actually within featured tabs I found taxonomies that I set. So up to this point everything is fine.
The problem is that then the plugin in home page appears blank (taxonomies are not displayed even if they are present).
What do you think is wrong?
Is there any other setting that I forgot?
Can I send you the functions php file where I defined custom post types and taxonomies? Is this file useful to you to understand better?
Thanks
EricaJune 25, 2014 at 2:56 am #111433EricaMemberThis reply has been marked as private.June 25, 2014 at 9:58 am #111479efullerMemberI guess what we didn't account for was that we need to show taxonomy values instead of category values within the front-end widget output.
I'll see if I can sort the code and get something that functions for you.
I am a web developer
June 25, 2014 at 10:42 am #111485EricaMemberThis reply has been marked as private.July 1, 2014 at 1:34 am #112331EricaMemberThis reply has been marked as private.July 27, 2015 at 10:44 am #160597wortfmMemberI have the same need and wondering if there was a resolution that could be shared here.
Thank you.
Tim -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.