Support » Plugin: WPAdverts - Classifieds Plugin » Using Widget Logic with WPadverts

  • Resolved lazyym

    (@lazyym)



    If you use widget logic with wpadverts, find some tags you’ll need to display custom widgets below. This has helped me avoid messing with templates.

    To display widgets only on the single adverts page:
    is_singular( 'advert' )

    To display widgets only on the category page:
    is_tax( 'advert_category' )

    To display widgets only on specific category page:
    is_tax( 'advert_category','category-name' )

    To display widgets on all location pages with the maps/location mod:
    is_tax( 'advert_location' )

    To display widgets on specific locations with the maps/location mod:
    is_tax( 'advert_location','your-location' )

    To display widgets on all ads by author pages using Greg’s snippet:
    is_numeric( adverts_request( 'posted_by' ) )

    I haven’t figured out specific users yet. Share it if you have it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • @lazyym Good to know! Thank you!

    Plugin Author Greg Winiarski

    (@gwin)

    Thanks for sharing, as for the user you should be able to use this code

    
    get_current_user_id() == 1000
    

    where 1000 is an actual user ID.

    Thanks for sharing, as for the user you should be able to use this code

    get_current_user_id() == 1000

    where 1000 is an actual user ID.

    No luck with that one @gwin. It would become an awfully heavy widget area if you started customizing every user page I suppose.

    Can someone help me with getting a different form as a side widget on each page, how should I write the conditions. I currently have three or four gravity forms, http://www.momentumfunding.com, but when I try to add a new form as the side widget and use single post ID number to that page with a different gravity form ID it doesn’t work.

    How can I get that to work?

    Plugin Author Greg Winiarski

    (@gwin)

    I suppose you should add in the Widget Logic something like

    
    is_page( 1000 )
    

    where 1000 is the ID of page you want to show the widget at, but if you are having problem with the Widget Logic, you should rather ask at the Widget Logic support forum to get a best answer.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Widget Logic with WPadverts’ is closed to new replies.