The plugin stopped working after I upgraded to PHP 8, causing a PHP fatal error:
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/…/wp-content/plugins/vertical-center/classes/class-vertical-center.php:204
This error can be fix if you replace count() with is_countable() in the conditional of that line of code from:
$field_count = count( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;
to:
$field_count = is_countable( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;
Hopefully this patch can be implemented in the plugin.
Thanks!
]]>Hi,
I have a page like this: https://imgur.com/a/kH0lI0E
I used every single selector individually and none had any effect, element still sits at top of page. Could you kindly explain how or maybe I’m not using the correct format.
]]>Hello
Could you tell me what I should put to my CSS file if I want to center my text with H1 header?
I read your support post on Vertical Center for Dummies, but I still can’t figure it out. I am very new to WordPress and coding, so I apologize in advance for such a novice question.
On https://iqthus.com/kitchen/services/ I’m trying to center an image in the left column of a 2-column row.
The html for the column is
<img class=”aligncenter wp-image-359″ src=”https://iqthus.com/kitchen/wp-content/uploads/2015/10/kitchen-morph.gif” alt=”kitchen morph” width=”490″ height=”360″ />
How can I define the image as a target, or is it already defined, and if so, what is the target?
Again, I apologize for such a basic question, and thank you for your help.
]]>Hi,
This is the plugin I’ve been looking for!!! But could you explain where I either put the #target to center something or where I get the tag to put in the plugin.
I tried adding an Extra class name and putting that in your plugin field and nothing happened.
Sorry I’m such a beginner, but I would love to get this to work.
Best,
David
]]>Can’t get this plugin to work. Tried #page-id-19 and various others and nothing happens. I’m using the twentyfourteen theme.
Also, Would this plugin have been able to offset a page slightly off centre to the left?
thanks
]]>