Error “preg_match_all” with WordPress SEO by Yoast plugin [closed]

I browsed through all the versions available here http://plugins.trac.wordpress.org/browser/wordpress-seo/tags/ and nowhere is there any “I” modifier. The “I” modifier is obviously invalid, thus the error. Updating the plugin will most certainly solve the issue. Or at least, if updates are not possible, edit line 476 of /wp-content/plugins/wordpress-seo/admin/linkdex/linkdex.php and turn $keywordCount = preg_match_all(“https://wordpress.stackexchange.com/”.$job[“keyword”].”/msIU”, $body, $res); or … Read more

How to solve Robots.txt problem with WordPress fresh install?

Your robots file as of right now: User-agent: Googlebot Disallow: User-agent: * Disallow: Disallow: /cgi-bin/ Disallow: /wp-admin/ Disallow: /wp-includes/ Sitemap: http://www.yadfaeq.com You aren’t specifying anything for Googlebot so you should remove it. Additionally, Disallow: could be interpreted as Disallow: / which would block your entire site. What your robots file should be: User-agent: * Disallow: … Read more

Add meta value to custom post type on publish

You are usgin an undefined $post->ID variable because there is no reference to any $post object in your code; instead, use the $post_ID variable retrieved in the function: function on_jobs_publish( $post_ID ) { global $wpdb; $wpdb->insert( ‘iCrewzWp_postmeta’, array( ‘post_id’ => $post_ID, ‘meta_key’ => ‘_yoast_wpseo_sitemap-include’, ‘meta_value’ => ‘always’ ), array( ‘%d’, ‘%s’, ‘%s’ ) ); } … Read more

Yoast Seo Plugin – Set no-index to a post automatically when a post is set to sticky [closed]

In my effort to solve this I discovered a great resource for wordpress hooks for the job and found the right hook wpseo_saved_postdata here. Feel free to modify the code if you think it could be better. For now, it works for me. function set_noidex_when_sticky($post_id){ if ( wp_is_post_revision( $post_id ) ) return; //perform other checks … Read more

help to write a custom php script to settingup yoast priority to pages or posts

The solution should is this: add_filter( ‘wpseo_xml_sitemap_post_priority’, ‘my_custom_post_xml_priority’, 10, 3 ); function my_custom_post_xml_priority( $return, $type, $post) { if($type == ‘page’) { switch ($post->ID) { case ‘8’: case ‘395’: case ‘342’: $return = 0.9; break; case ‘5’: $return = 1.00; break; case ‘620’: case ‘703’: case ‘603’: case ‘688’: case ‘695’: case ‘614’: case ‘684’: case … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)