geting page or post id on widget constructor (1 post)

  1. kursattokpinar
    Posted 4 years ago #

    if a widget added at least one sidebar, is_active_widget function returns true. So, if i have two different pages and if the sidebar of one of the pages has my widget, scripts and styles of widgets are loading on the other page that doesn't use my widget on its sidebar.

    i need to write my own function to fix that.

    Is there a way for getting page or post id from the widget consturctor?


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by kursattokpinar
  • This topic is not resolved
  • WordPress version: 3.4.1