Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I'm looking to redesign and repurpose a site of mine. Basically its primary focus is an event calendar for card game tournaments in my area, and as of right now I'm using Wordpress for the site. I love Wordpress's admin side (yay Ajax!) but it's somewhat lacking as a CMS. Right now I'm using the Event Calendar plugin for it, which is great, but I was wondering if anyone had any suggestions as to what the best event calendar they've ever used is. Ideally I'd like something that let users type in their name and click a button to publicly "pre-register" for the event so people can get an idea of who's going, how many people are going, etc. Separate fields for things like entry fee, date, time, etc. would be nice too. I'm open to suggestions!

Adbot
ADBOT LOVES YOU

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Ned posted:

Yeah. The event plugins for Wordpress aren't really that great.

I'd use google calendar and then use wordpress meta fields to tie them together. You can output google calendar info as JSON and read it in with Wordpress very easily.
Little late but I'm working on a redesign now. What does this mean? I'm not familiar with how the meta fields would work in this case or even what JSON means.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
My friends are starting up a podcast/blog kind of site. What's the best free podcasting plugin available for Wordpress? I'm looking at TSG and Blubrry but don't see much of a huge difference.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I'm using the Wordpress Events Manager, which is a very popular events manager plugin. I've created a widget to go with this that queries events and displays them in a list, pulling some other details from other plugins as well. I've got a query going that gets the last few events, but I only want to display events that are tagged as featured. Putting "tag => featured" in the array returns no results, even though I'm positive that one of the events is tagged as featured. This seems to be because the events manager's tags are somehow different than usual Wordpress tags. I know this because using get_the_tags returns nothing, even though I've got an event tagged "featured".

Since this is the one hurdle left with the events slideshow I'm trying to create, it's driving me nuts.

Here's my code:
code:
function my_em_wp_query(){
	$args = array(
		'post_type' => 'event',
//		'tag' => 'featured',
		'posts_per_page' => 5,
		'meta_query' => array( 'key' => '_start_ts', 'value' => current_time('timestamp'), 'compare' => '>=', 'type'=>'numeric' ),
		'orderby' => 'meta_value_num',
		'order' => 'ASC',
		'meta_key' => '_start_ts',
		'meta_value' => current_time('timestamp'),
		'meta_value_num' => current_time('timestamp'),
		'meta_compare' => '>=',
		'tax_query' => array(
		array(
			'post_type' => 'event',
			'field' => 'slug',
			'terms' => array( 'featured' )
			)
		)
	);

	// The Query
	$query = new WP_Query( $args );
I asked in their support forum and someone said "you need to include taxonomy parameters for this to work - https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters" but I have no clue what that means. You can see my experimentation with taxonomy in the tax_query poo poo up there, but am I even doing it correctly?

I feel weird asking a question that has to do with a plugin and not Wordpress itself, but I figured it might be a popular enough plugin and/or getting tags from custom post types might be more common of a thing than I know.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Winter is Cuming posted:

^^^
Based on what I'm reading, it may work to change 'post_type' => 'event' in the 'tax_query' array item to 'taxonomy' => 'event-tag' and remove the 'tag' => 'featured'

The tag => featured was commented out, but I've removed that anyway. Changing it to taxonomy => event tag doesn't work, it still displays no events. This is driving me nuts. The only way this slideshow thing is going to work is if I find SOME way to differentiate some events as "featured" and make the query only pull things tagged "featured". The Events Mananger uses its own categories and tags, so I can't filter it using either of those.

Edit: I did it by creating a new user named "Featured Event Manager" and the featured events will all need to have their author set to that user. It's sloppy, but the event author isn't displayed anywhere on the site, so it shouldn't cause any problems. It is sloppy though, so I'd like to figure out how to do it the correct way.

LifeLynx fucked around with this message at 22:18 on May 6, 2013

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Speaking of porting Wordpress sites from one server to another, what's the best way to do that? I developed a site for someone on my own server and domain name, and now I need to port it over to theirs. I'm a little shaky on database stuff, what do I need to do? I tried doing the Wordpress export, but that seems to just export content, not installed plugins or anything.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I've noticed a new-ish thing on news websites, where scrolling down on a page changes the url in the browser, without loading a new page. I was wondering, is there a plugin that automates that for Wordpress posts in a specific category?

Example (this may only work on a desktop): http://www.theonion.com/graphic/highlights-go-set-watchman-50907 Scroll down and you can see what I'm talking about.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I built a site for a client on Wordpress with the idea that he'd charge a monthly recurring fee for customers to give them access to certain services. BuddyPress + s2Member seemed like the perfect solution. But now he wants it work where customers buy "credits" to spend on individual services, and also to have a spot on the site where the customer can check how many credits they have. Is there a good Wordpress plugin that will do something like this?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Scaramouche posted:

I >think< what you're looking for is a Points or Loyalty Rewards system:
https://wordpress.org/plugins/mycred/

I haven't worked with any of them in the past. They're meant to work like AirMiles points or the like, but you could probably adapt them to the use case you mention. That one specifically mentions BuddyPress compatibility though I'm not sure what you're using it for.

You could probably hack together something with one of the Gift Card plugins, but I'm guessing the whole viewing the balance thing would have to be hand-rolled, and it assumes $1 = 1 credit, or some other relationship.

PS-You probably know this, but forcing people into putting money up front into paying for "credits" that can only be redeemed on a site is kind of shady. E.g. what if the site goes out of business? Does everyone get their credits refunded? What happens if the exchange ratio on a credit changes from $1 to 1 credit to $0.50 to 1 credit? Does everyone get rebalanced?

MyCred looks perfect, thanks!

And yeah, I had the same concerns as you. My biggest concern was that people wouldn't sign up for things if there was an additional step (buying points) between registering and paying. Which of course isn't really my concern, so I'll be implementing it.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

my bony fealty posted:

I'll put a plug in for Ninja Forms if you just need a simple, basic form. It's free and really easy to use, and if you want more features there's tons of modular addons (that are not free) and there's a pretty robust set of hooks under the hood to do custom stuff.

They also recently redesigned the entire plugin from the ground up, with a whole new UI. This is great because the later 2.x versions of Ninja Forms could get real buggy and messed up and they seem to have taken the imo sensible option of rebuilding the entire thing instead of trying to fix the old codebase. Their support folks are great in my experience as well.

Not a knock against Gravity Forms - it's fantastic and definitely worth paying for if you're going to want a lot of form functionality.

I hated the amount of steps it took to change the name of a form, and I hate how that hasn't changed with the new version. Also it now assumes you want to display the title of the form twice if you're using it in a widget, and also assumes you want the admin notification to have a set number of fields and not "all fields" like before.

Otherwise though it's a great plugin. I used to use Contact Form 7 before it/the host my company uses made it stop sending notifications. And it never had a built-in wp-admin viewable database of submissions either, so screw it.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
A warning if you're relying on Ninja Forms: apparently many people are having issues with 3.0.6 where the plugin straight up deletes forms on its own. I'm running 3.0.7 and having some bizarre behavior where displaying a form on a page doesn't render some fields, while duplicating others. For example my Name field doesn't show up, but I have two Submit buttons. I shot them an email, and I see others on the WordPress plugin forums having similar issues.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

my bony fealty posted:

I tried to like it but Gutenberg really does suck. It's a horrible experience for content managers. why is the editor window so narrow?? thank gosh for classic editor.

I swore off it completely today when I pressed Ctrl+Z today and instead of acting like the undo function of any normal program made since Windows 3.1, it undid a whole bunch of HTML code I'd just put in. Nothing major, just wrapping a few things in p and strong tags, but come on.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

frogbs posted:

I went into it with an open mind, but it's so much worse than I'd expected. A client asked me to make some content changes to a site they host on Wordpress.com, which is just about the best-case scenario for a Gutenberg experience, right? The editor failed to save changes made in the HTML view, it would say it was saving, but would never actually commit the save. Our workaround was to make our HTML changes, then make a change in the visual editor, which then for some reason actually triggered a save to take place. Such weird behavior!

I'm hoping it doesn't result in the Wordpress community splintering into a bunch of different factions, but it sure looks like that's where things are going.

It's not so bad if you only use the Custom HTML block. Anything else, including the default normal paragraph block where you edit it as HTML, is hell. I have to wonder how non-designers feel about using it.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
WordPress has an API now that dumps all post data into a JSON deal, could you do anything with that?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
A few weeks ago, Happy Forms was one of the top rated form manager plugins out there and was recommended by lots of developers. Then they removed the responses screen from the admin for the free version, which wasn't too bad. Then they shot out an email saying this:

quote:

We love working on HappyForms and we want to continue developing the free plugin, but we can't do this without the support of more paying customers. So, starting with HappyForms 1.8.11 (scheduled for release later today), we're transitioning the following features to the paid plugin:

• Scale, Rating, Story, Website Link, Table, Phone, Date & Time, Address, Title, Legal, Placeholder and Text Editor form parts

• Redirect on submit setting

• Fade submit button until valid setting

• Google ReCaptcha integration

• Response previews setting

If you're using these parts and features in your forms, they will be removed from the free plugin with this release. Please review all your existing forms for changes.

If you update the plugin, all your old forms break if they used any of these features. I'm pretty sure 100% of forms on the internet have a phone number field, but now that's gone. People aren't happy and are trashing them in the plugin reviews.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Dominoes posted:

Hey bros. A colleague asked me for advice on getting a wordpress site he used to have back up. I have some nested zip files containing an assortment of php files, html files, images, sql files etc. How would I approach getting this online? Is this likely to be a standard wordpress format that'll work on any WP hosting service? Is this something I'd dump on Heroku? How would you approach this? Thank you.

It sounds like it's possible that zip file was exported using a WordPress migration tool. If that's the case, you could just do a fresh install of WordPress somewhere, install some of the more popular migration plugins and see if any of them work.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

What's the reccomended "cheap" wordpress hosting solution now a days? I love Kinsta but sometimes its hard to convince clients to pay the $60 a month for it.

Most clients would be happy with even crappy hosting like GoDaddy. Why would you try to convince them to pay $60 a month for something they could be paying $7 a month for and not notice the difference?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

XBenedict posted:

Siteground is what I always use for Wordpress.

That looks affordable. What's the benefit of using a managed WP host like this over just general hosting on, say, a cloud shared hosting plan from Lithium? Let's pretend it's for a small business's website just for an example.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

XBenedict posted:

Primarily the unique advantage that their support people understand WP. Also, Siteground has some nice additional proprietary WP site management tools. They also have a nice staging platform so that you can create a sandbox copy of your site for testing plugin updates etc, before taking them live.

I've been using Local by Flywheel and I absolutely love it. Unfortunately their hosting is a little expensive at $25 a month so I need to do the extra step of installing a migration plugin for WP to push sites live (or just FTP over changed files if it's something simple like a CSS file). My primary client I do a lot of contracted sites for has a shared hosting account so sites go there.

What do you/other people do for developing locally?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
A client wants REST API access to their form submissions, and I found this for Caldera Forms: https://calderaforms.com/doc/caldera-forms-rest-api/

Everything looks simple until "Before using the Caldera Forms REST API client, you must initialize it, per form, using the CFAPI function." Excuse me? What is "the CFAPI function"? Where would I put this code? In functions.php also?

code:
/**
 * Initialize Caldera Forms REST API client
 *
 * For used of  users that the token is valid for
 */
jQuery(function() {
	if( 'object' == typeof MYOBJ ){
		var tokens = {
			//REST API Nonce
			nonce:  MYOBJ.api.nonce,
			//Special token for API
			token:  MYOBJ.api.token
		};

		//25 is the number of entries per page to get
		var api = new CFAPI( MYOBJ.api.form, 25, MYOBJ.api.formId, MYOBJ.api.nonce, $ );
	}
});

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Yes, Divi is the "best" page builder plugin I've had to work with, but I still don't like it. For my sites I do everything with custom HTML and CSS. If everyone working on the project is comfortable with HTML/CSS, that's what you should do. Wordpress is more than accommodating for that, it saves a ton of bloat, and doesn't risk the site not being able to update if the page builder plugin stops getting updates.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

What base plug-in do you use to do stuff in html and css?

No plugin. I'm anti-plugin. Plugins break, stop being supported, and have to be maintained. I use the Custom HTML block in WP's editor and do it all in there, while editing the theme's CSS file (make a child theme if you're basing it off a real theme so that updating the theme doesn't break your CSS). I only use plugins for things like form managers, galleries, and other features that would take way too much time to code on my own.

The worst thing that can happen with HTML/CSS is that you look back on your years-old code and get embarrassed. Holy crap was I really using "float" for, like, everything?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

Sorry I meant theme. Do you use ACF and CPTUI at all though?

I do the bulk of my work in elementor because it's fast and easy buts it's really boring and a big performance hit. I know html and css and woukd prefer to do it that way, but I don't know PHP which feels like it limits me.

Advanced Custom Fields is really useful when it's needed. I haven't had to use it in a while, but the websites I'm doing are usually informational. For blog-type sites they're really good. And it's a plugin that's popular enough that I'm not too worried about it going obsolete.

Not knowing PHP isn't bad. I've made custom post types in just PHP without using CPTUI but it is a little annoying to set up. If you're just putting in HTML in the Custom HTML block (or using Classic Editor which might stop getting supported soon, I haven't checked in a while) then you don't have to deal with the PHP at all. A really good thing to know is the "is this the front page? Then show this" bit of PHP for things you only want to show on the homepage, but there are other ways to accomplish that without PHP.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
At least once a week I wish Contact Form 7 was a better plugin.

Pluses:
It lets me code forms with HTML and style them however I want. Adding a field is similar syntax to shortcodes. No clumsy UI to work with, so I have complete control over how the form looks.

Minuses:
It very often doesn't send emails. Why, when other form plugins work fine. Hacky fixes with SMTP plugins tend to work haphazardly. If I get a support request that a site I didn't build isn't sending emails, 9/10 times it's CF7 and I have to replace it with something more cumbersome like Ninja or Caldera.
It doesn't store emails in a database, meaning when it doesn't send emails there is no record of them.
reCAPTCHA doesn't work. Bots can pick these apart no matter what. There are third party plugins that add extra reCAPTCHA functionality, but nothing stops spam from coming through CF7 forms.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

zmcnulty posted:

Maybe in the future shortcodes will stop being supported in favor of Gutenberg/page builder blocks. But they work fine for my purposes.
https://getshortcodes.com/docs/posts/

I might be wrong, but I think Gutenberg blocks are just visual representations of shortcodes. As in if you're not in the visual builder, you'll see a shortcode.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I wish the Custom HTML block was taller. Hate having to do it in Sublime Text and paste it back into the Custom HTML block just to see what I'm doing if it's more complicated than a paragraph tag.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

No worries. I'm going to start making 5he shift towards Gatsby and headless WordPress soon I think. I dunno, WordPress is nice when you make sites for people who don't know how to use anything. Which is like all of my clients.

Yeah being able to hand off a site and go "Here you go, there are literally millions of people using this same system." I think accessibility and SEO issues are still a problem with a Javascript front-end though. I'm sure there are ways around that, but not any that my company I work with is going to want to retrain their staff for, so long as Wordpress sticks with PHP.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Let's say a client has a website, and the person who "developed" it overused plugins to the point where the site takes almost ten seconds to load. Even setting up Autoptimize doesn't fix it. I know every site is different, but are there any go-to solutions you use? I usually end up telling them "Look, your old developer used a plugin that uses unnecessary Javascript and PHP to render a button that should be done with like three lines of CSS, and a page builder that's injecting 3MB worth of JS/CSS, there's only so much you can do before you want to think about recoding the entire site." But of course no one wants to hear that their site is a lemon that needs so many parts replaced it might as well be redone from scratch.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Thanks! This is a company that uses me and other developers, and I'm the only one who knows my way around enough to not bloat sites. The company installs Yoast and Wordfence, but the only plugins I use are essential and well-tested.

Another question: it's unavoidable to have to use a form plugin, but if I add reCAPTCHA to them, it comes up as render-blocking no matter what I try with async and/or defer. Is there a way to load the form after page load? I've seen some "Lazy Load Widgets" plugins, but I'd like to be able to do it without a plugin.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

Imho all the WordPress crm plugins are trash and are putting bandaids on the problem. Non profits can get free Salesforce also I think.

I usually consult this list for plugins though; I trust kinsta more than anyone else in the game outside of goons

https://kinsta.com/best-wordpress-plugins/

There's some good looking plugins I've never heard of in here, thanks! I might try Query Monitor to improve site optimization, if it can show more information than Chrome's Dev Tools. Might also try switching away from NextGen Gallery and trying Modula or Envira. Maybe the 20 image per gallery limit won't be so bad, I do a lot of blue collar sites and it'll convince them that they don't really need 98 images of random dumpsters in their gallery.

There are also a lot of plugins I'd never use. Most of it is because I know PHP and Javascript, so I can do things like sliders without plugins that inject tons of code into the front end. Revolution Slider is the bane of my existence when upgrading old sites, it's not update-friendly at all. I also hate the Head, Footer and Post Injections plugin because it's yet another area where random bits of code can hide. Where is this code coming from: a setting in the theme, a file in the theme, a setting in the page, a widget, or the Header, Footer and Post Injections plugin?

The company I work with is in the process of upgrading all their old sites (some of which they didn't create, just inherited) to PHP 7.X and the newest WP versions. We're finding a lot of old plugins left in the dust, some that haven't been updated in over five years so they're not compatible at all. Sometimes that means the entire core of the site is rotten and it would need to be rebuilt from scratch. Page builders are a huge problem; as user-friendly as Elementor can be, they inject tons of code and scripts that slows down sites. There are so many page builders from years past that don't work anymore, and there's no way around it.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

This latest brochure website I am working on I made the decision to not use a page builder like Elementor and instead use Wordpress Blocks and CSS. It’s going….ok. I wish there was an easy way to just write the HTML layout for the page without having to learn PHP and poo poo. I should probably just learn the basic PHP needed to do what I want to accomplish as I feel like I spend most of my time hunting for the obscure CSS thing WordPress named the box I need to stylize then just writing the thing out by hand.

Page builders are universally awful. If you don't care about making it easy for other people to update stuff without knowing HTML, you can just throw everything into a custom HTML block and code it yourself.

Hell for development purposes I have a function that creates a shortcode I use that can pull HTML code from a file, so I can write in VSCode with syntax highlighting and all that. Since it's being parsed through Wordpress's filters it even strips out PHP code, and it's limited to .html files in a specific directory inside the theme.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

albany academy posted:

As a developer, i hate wordpress.

I mostly do. Really I resent that there's no way I can use JS-based solutions because the small businesses always have lots of changes, and the company I work with does a lot of SEO stuff and they're too hooked on the Wordpress workflow.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

wordpress is pretty good for seo imho. also i'm really enjoying WPGraphQL which allows you to take a wordpress site and use it as a cms type thing.

i have a client who wants a slider; do any of you know the absolute most light weight plugin to use for one? I guess it's possible in PHP also?

They also want to use ELementor which I get due to the ability to just go in and update stuff, but I may try to convince them to stick with Gutenberg.

Vanilla JS for the slider. Speaking as someone who gets paid to fix Wordpress sites, there are no good slider plugins. Most of the time I send an email saying that the culprit is the site's slider plugin. Definitely don't use Slider Revolution.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

fsif posted:

We've made a couple dozen different Gutenberg blocks at our agency. Absolutely love the way it lets us extend the CMS but the dev experience… is lacking.

Completely crazy decision to only allow the updating of the block's template markup to be done via "dynamic" PHP templating. Just a really convoluted workflow.

I might want to take a crack at this, because right now I'm creating HTML files for page content, which works great because I can use my favorite IDE with syntax highlighting, but is somewhat of a chore when I want to reuse certain elements over and over. I need to copy and paste "blocks" of HTML over and over again because it's not React where I can make a component to reuse.

Do you use @wordpress/create-block ? It looks like that makes one block in one plugin, but is there a way to have it create one plugin that can house multiple blocks so I don't have a full screen of plugins for each of my blocks?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

fsif posted:

Nah, I never used @wordpress/create-block; not certain it was around when we first started making blocks. Most of my working knowledge came from this series: https://css-tricks.com/learning-gutenberg-1-series-intro/

We have a build script using the Wordpress babel plugin and then add a bunch of nonsense into our functions.php. Probably not worth it, honestly. Unless you have a lot of really special business logic or want to build out a bunch of advanced functionality (like make querying an API for options or something), I really recommend just using ACF blocks.

If you (or anyone else) want more info about the former you can send me a PM and I can try to give more specifics, but again, it's IMO a huge hassle and not worth the payout for most use cases.

You're right, after a few hours of digging I discovered that it's more trouble than it's worth. I wanted to make a simple copy of the "Media and Text" block where I could use my own CSS classes and not have the Wordpress classes, just to keep my HTML and CSS as clean as possible. It was a mess. I'm surprised there isn't a tool to generate the code. There are things like Lazy Blocks, but it can only export the block code in a format that a site with Lazy Blocks installed can read. The WP team seems to be making big improvements to the CMS, so the Gutenberg dev experience is probably low on the list of priorities right now.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

counterfeitsaint posted:

I've been asked to update this Wordpress site. The problem I'm having is any kind of custom jquery animation bugs out and is really jerky. It pauses after a fraction of a second, sits there not animating, and then jumps to the completed animation. It's on a theme called H-Code, which uses WPBakery for it's page builder. I've searched for the problem with both the theme and page builder without luck. I've tried it on iOS, windows, Firefox and Chrome and they behave the same. I've tried adjusting the css and I can change the easing and length of the "animation" but that doesn't make it animate properly. My best guess is it has something to do with the version of jquery the theme is using, which is a little beyond me. Either that or something in the css that I'm completely missing. I have tried enqueuing the necessary jquery ui scripts to make sure they're actually loading but that didn't help.

You can see an example here: https://ventureupward.org/development/ click "How it Works" in the hero image at the top. There's a few other places where there's custom jquery to animate things on the site, and they all have the same problem, but that's probably the easiest example.

Any feedback or ideas as to what's causing it would be greatly appreciated.

Have you thought about just cutting jQuery out of the equation altogether and using CSS animations?

I clicked "Frequently Asked Questions" in the hero section and I can see a bunch of CSS properties changing values all rapid-fire, probably too fast for browsers to keep up with. Changing from display: none to display: block is usually janky to begin with, and then the animation is changing height plus various separate padding and margin properties on multiple things at the same time... it's all really overkill for what you're looking to do.

code:
#animated-faq {
  background: #fff;
  display: block;
  max-height: 0px;
  overflow: hidden;
  padding: 0rem;
  transition: all 0.5s ease-in;
}

#animated-faq.animated {
  padding: 2rem;
  max-height: 5000px; /* Way bigger than it'll ever be, but good for animating. */
}
I haven't targeted IDs with CSS in a while, writing it looks weird now. I haven't written jQuery in years either, but this should work if you don't want to switch to vanilla JS:

code:
$( "#faq-button" ).click(function() {
  $("#animated-faq").toggleClass("animated");
});

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

supermegaultra posted:

Funny you mention that just now, I have just taken on a WP site that had 80+ plugins. Most of the plugins only work on PHP 5.6 and broke spectacularly after moving to 7.3.

I think I woulda spent less time rebuilding the site.

That's what I tell people when their site is that overloaded. Time to rebuild, or I can't help.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Siguy posted:

A whine/boring backstory/general request for advice:

I don’t usually use Wordpress. I’m not even a web developer by profession. But I helped an organization I know make a very custom Wordpress theme from scratch five years ago (it felt a like a flashback into my teenage years smashing bits of random PHP together). It worked out fine but it was a pain in the butt because there were multiple custom post types and I basically hand coded everything from a super generic theme template.

So now my wife’s church needs someone to update their Wordpress and its theme and she’s volunteered my services. And I thought it would be way easier this time since they don’t need any custom post types at all. I’ll just buy a theme and tweak it.

But I don’t like what I’m finding. Every generic theme seems built around woo commerce and if I look for something church specific then I get sites trying to charge $200-a-year to keep the theme updated. A lot of them are also built around big WYSIWYG page builders, which I’m suspicious of.

I feel like I’m going to have to do everything from scratch again which is what I’d like to avoid. I looked at Underscores and Sage to try to at least build from a more modern base but both of them are tied into npm node-sass poo poo that is apparently deprecated and refuses to build on my computer no matter how many times I remove and reinstall node.

So questions:

1. Where should I be looking for themes that aren’t so ecommerce focused?

2. Am I right to be suspicious of the themes with built in page builders or am I just making life harder for myself?

3. If I do give up and build from mostly scratch, is there a template or theme you recommend starting with?

You don't need npm to install Underscores, I don't even see any SASS in the test theme I just downloaded from https://underscores.me/. Just put the directory in the /wp-content/themes/ directory and enable it.

Page builders add so much bloat, but I don't have much experience with already-made themes so I don't know what's good. I found these themes here that might be a good start: https://andersnoren.se/teman/

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

If you're technical enough to use underscores then I would say just download generate press and generateblocks and build something simple for them imho.

Quoting a banned goon from a month ago, but it's insane how complicated creating a basic Gutenberg block is. Advanced Custom Fields is one of the most popular plugins, so they have to know about it and how easy it makes things. There are generators that make Gutenberg blocks, but they don't give you the code, so that you're locked into using their plugin. I wanted to make a block that was a date picker, so I could get that data from a custom post type. The date picker control is there, but not used in any official Gutenberg blocks, but after an hour of research I gave up because I had more productive things to do.

You can create custom post types and assign them block templates pretty easily, and it would likely completely obsolete Advanced Custom Fields and page builder plugins entirely if the dev process for creating blocks was easier.

Adbot
ADBOT LOVES YOU

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
All-in-One WP Migration is the best I've found after trying them all. It requires an extra plugin to move sites over 32 MB, and I think it does it in multiple chunks instead of all at once. Pro tip though: Your .wpress backup files will be massive on your average medium size site, because odds are someone has uploaded hundreds of 1.5 MB JPGs to the media folder, and even though Wordpress is good at optimizing images, the original files are still there taking up space. AIO WP Migration has an advanced setting to not export media files, so try doing that and manually porting over the contents of /wp-content/uploads through SSH or whatever.

I tried creating my own event calendar by installing Pods, creating a custom post type for Event, and creating a Pod that had event_date and entry_fee. They appear in the REST API, which is great because the aim of this was to use NextJS for the front end. The bad thing is, I can't figure out a way to query by event_date. I even installed WPGraphQL and added the fields to show up in the GraphQL output, but you can't filter them by "where". I can filter it on the front end, but the issue I see is that as more events get added, eventually it'll be querying hundreds of events, most of which have "expired". So unless someone goes in once a month and unpublishes all the expired events, it's going to get slower and slower. I need to see how the popular event calendar plugins handle this. I was hoping not to use one because they're overkill for what I need, but I guess it doesn't matter if I'm controlling the entire front-end. The major downside of any WP plugin is the amount of bullshit JS and HTML it spits out to the page.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply