Duplicate attribute class causing site validation error

The following bit of code results in a duplicate attribute site validation error. This template script: <div class=”clearfix” <?php post_class() ?>> produces this source output: <div class=”clearfix” class=”post-263 post type-post status-publish format-st… WordPress adds its own post-related classes to format the blog entry. Is there any way I can add my “clearfix” class to the … Read more

wordpress site validation errors

when I made my wordpress site validate I got some strange errors like Error Line 6, Column 52: Bad value profile for attribute rel on element link: Keyword profile is not registered. Error Line 12, Column 128: Bad value EditURI for attribute rel on element link: Keyword edituri is not registered. Line 14, Column 91: … Read more

Verify Nonce returns false – Request Nonce returns correct value

I’m trying to verify that the nonce I created exists but for some reason it keeps returning false, why is this happening? Creating my nonce: <?php wp_nonce_field(‘test_slider_action’,’test_slider_options_nonce’); ?> Verifying my nonce exists: if($_POST && wp_verify_nonce($_REQUEST[‘test_slider_options_nonce’])) echo “TEST”; if I dump my $_REQUEST I get the correct value, but if I dump my wp_verify_nonce it returns … Read more

stray elements

I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid. To test put this into your functions.php: function static_col_container($atts, $content) { extract(shortcode_atts(array( ‘foo’ => ‘bar’ ), $atts)); $content = do_shortcode($content); $container=”<div class=”static-column-container”>” . $content . ‘</div>’; return $container; … Read more

How do I turn off the mysql password validation?

It seems that I may have inadvertently loaded the password validation plugin in MySQL 5.7. This plugin seems to force all passwords to comply to certain rules. I would like to turn this off. I’ve tried changing the validate_password_length variable as suggested here to no avail. mysql> SET GLOBAL validate_password_length=4; Query OK, 0 rows affected … Read more

Multiple register settings, with same option name – issue

I already posted this question in wordpress support forums here but I didn’t get any help and nor could I find a solution yet. As the title says, I am calling register_settings functions multiple times, for different groups of option, but for the same option name, as follows: // Create Basic Settings register_setting( ‘posttype_basic_group’, //option … Read more