WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic Visual
[resolved] Conflicts with Original Widget Logic Plugin, plus a Feature Request (7 posts)

  1. MomDad
    Member
    Posted 2 years ago #

    This plugin re-uses the same method names from the original plugin, and thus causes errors when attempting to have both of them activated:

    Plugin could not be activated because it triggered a fatal error.
    
    Fatal error: Cannot redeclare widget_logic_expand_control() (previously declared in <path removed>\wp-content\plugins\widget-logic\widget_logic.php:33) in <path removed>\wp-content\plugins\widget-logic-visual\widget_logic.php on line 93

    Plus several other function name conflicts. Of course, that can be gotten around by simply having only one or the other activated, or renaming all the functions, but ideally it would be nice to be able to specify the conditionals both visually and by code in just one plugin.

    The visual method is very handy, but it also is restrictive in that you can't manually specify conditionals. So I'd like to request that as a feature -- having the option to specify either way. The plugin could then combine the visually-defined conditionals and the manually-code-defined ones.

    http://wordpress.org/extend/plugins/widget-logic-visual/

  2. totalbounty
    Member
    Plugin Author

    Posted 2 years ago #

    we'll consider it - thanks for the request!

  3. NTD
    Member
    Posted 2 years ago #

    Agreed on the latter part. Some flexibility is missing at the moment and that's understandable, but if you add the ability to add code as well I will definitely make the switch from the original plugin.

    Just to give you an example, at the moment there's not way to specify the 'in_category' conditional and thus I cannot define a widget to be visible only on a specific categories single views. So basically:

    `is_single() && in_category(array( 'thiscat', 'thatcat' ))'

    Cheers.

  4. totalbounty
    Member
    Plugin Author

    Posted 2 years ago #

    NTD: I think we're planning to add the original input box back in to allow people to choose what they want. I guess this would be the ultimate flexibility - we just have to work out how to display it.

    However, the functionality you describe is available in widget logic visual and very easy to do. Just choose "category" from the dropdown and uncheck the "all" box. Then select the any individual categories you want to display the widget in and save that visibility.

    This should be the same as in_category specifying one or more single view cat pages.

    Your example above is actually single posts + 2 indiv. category pages. In widget logic visual you can get this by using 2 visibilities - one for all post pages and one for the 2 cats you want.

    The only difference would be your example you do it in one line, in widget logic visual you do it using 2 rules.

    thanks again for the feedback!

  5. NTD
    Member
    Posted 2 years ago #

    Well as far as I understand (and have used) that's not how in_category() works.

    http://codex.wordpress.org/Conditional_Tags#A_Category_Page

    What you've defined is is_category(), which is only true on category archive pages. That's not the same thing as checking if the current single post belongs to a category.

  6. totalbounty
    Member
    Plugin Author

    Posted 2 years ago #

    NTD - thanks for the clarification!

    You are right we were defining showing a widget on specific category pages (only).

    Your query checks to see if a single post page has been added to certain categories.

    I think for that very reason alone we'll add the input box option back in for people that have advanced queries. The visual interface will probably cover 95% of what people need - but the 5% (coders and developers) will continue to use the original plugin only if they can't use code in our visual version.

    Thanks for pointing it out!

  7. totalbounty
    Member
    Plugin Author

    Posted 2 years ago #

    This has been fixed, please update to the latest version 1.5.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic