WordPress Two Level Filters on Getting Custom Taxonomy Terms

It doesn’t make any sense querying with get_terms when: genre=”action” AND quality = ‘HD’ The reason is: The only term that has taxonomy genre equals to action, is action. And the only term that has taxonomy quality equals to HD, is HD. If you constrain them with AND, then basically you have nothing. Since there’s … Read more

Swap WordPress “Widget Area” based on Page Template

WOW! well, it would seems as tho i figured it out! after MORE searching, i came across https://learn.wordpress.org/lesson-plan/widget-areas apparently i had to “register” a “sidebar” – which thru me, as i was wanting to modify in the footer. after looking that up, the term “sidebar” is used anywhere the theme allows the user to add … Read more

Redirect to Multisite site 2 if site 1 has a setting

If you are implementing a global functionality for your entire multisite/sub-sites like what you describe, you should implement this as mu-plugins instead adding the cuztomization inside a theme file, just create a file like in wp-content/mu-plugins/GlobalConfig.php which holds the customization you want and will take effect globally, unless you want this customization for only specific … Read more

How to Deobfuscate a sourcecop protected WordPress plugin?

I came up with a single (linux) terminal command to deal with this. Logic is to just change eval( code_to_eval ) in obfuscated php files to file_put_contents( __FILE__, code_to_eval ). At least that worked for me (my problematic plugin was “Wishlist 1Click Registration” by “HappyPlugins”). Here’s the command: grep -irl –include \*.php “eval(.*);” . | … Read more

Dealing with unknown option ‘–variant’ when setting up a block environment

From the docs https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/ I would say you have to provide template also for that option, though I never used it. I recommend you to get yourself more familiar with block development, it is very clear if block is dynamic or static, if it has php callback for rendering instead of save procedure in javascript, … Read more