9

Wordpress.....

God, why..

Okay, so my company has deep roots with wordpress websites, which is, well fine, and at some point they needed portal that would do something but I was bussy doing other project for our child company, so our frontend slapped together "portal" in wordpress. So I dont even know if I understand that properly whats going on, but today buddy came with help request to wordpress.

I had to look through wordpress database and was like.... FML hard.

Okay, fuck it, let's try to make it work. So, I needed to get random category (using get_terms), check it's ->count and if its greater than X show it on page. I came to done halfway, the random part wasn't working.

Okay, made it work after initial struggle with "WHAT THE FUCK IS THAT?! AND THAT?? AND THAT?!?!??! ;-;" and now comes the kicker. It has ACF installed and it has additional category in ACF. And it should check count of posts within the category that have certain ACF value.

After awhile I just said "this shouldn't be done on wordpress, no idea how to make it work".

What I seen is like... it hurts me on so many levels... My head wants to explode...

Can I get back to writing normal code now? ;-; Im fed up patching logic in frontend (I dont even know if that's `the wordpress way` but that's what they did)

Comments
Add Comment