Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #21531

    Hi,

    How can I add widgets to the portfolio items in the Angular theme?

    Thanks!

    Mark

    #112160

    Hi!

    You can use plugins like: http://wordpress.org/extend/plugins/widget-logic/ which help you to filter/display widgets based on the post type.

    You can use following conditional:

    get_post_type() == 'portfolio'

    Best regards,

    Peter

    #112161

    Hi Peter,

    Thanks for the response. With the conditional you gave me, can I also select only certain categories within the portfolio?

    Thanks,

    Mark

    #112162

    Hi Peter,

    Unfortunately your solution did not work, is there another way to fix it?

    Thanks

    Mark

    #112163

    In this case you can try the has_term conditional: http://codex.wordpress.org/Function_Reference/has_term

    Use it like:

    has_term( array('jazz', 'genre'),  'portfolio_entries' )

    and instead of “jazz” and “genre” insert your term slugs or portfolio category ids. If this doesn’t work too something is messing with the conditionals or query. You can also try http://www.woothemes.com/woosidebars/ but I’m not sure if it works with Angular.

    #112164

    Hi Dude,

    I added the following as the Widget Logic: has_term( array( ‘best-practices’), ‘portfolio_entries’ ) but unfortunately it still does not work. Am I doing something wrong?

    Thanks.

    Mark

    #112165

    Yes, the code should work. I’m not sure why wordpress ignores all conditionals in your case. Maybe try following code instead:

    has_term('', 'portfolio_entries')

    It will filter all posts which are assigned to any terms. You can also try the Woosidebars plugin.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Widgets Angular theme’ is closed to new replies.