Add disclaimer before certain posts and pages

Is there a better way to accomplish this using the affiliate tags on my posts? Definitely I would go for an easier option, not relying on plugins like Jetpack. Why don’t you try the has_tag function? Something like this: function tt_filter_the_content( $content ) { if (has_tag(‘affiliate’)) $custom_content=”YOUR MESSAGE”; $custom_content .= $content; return $custom_content; } add_filter( … Read more

Fetching WP.me shortlinks for posts using WP Rest API

This has been resolved by registering a new field in the rest api using the following functions. add_action( ‘rest_api_init’, ‘sam_add_custom_rest_fields’ ); function sam_add_custom_rest_fields() { $sam_short_link_schema = array( ‘description’ => ‘Short Link’, ‘type’ => ‘string’, ‘context’ => array( ‘view’ ) ); register_rest_field( ‘post’, ‘samad_short_link’, array( ‘get_callback’ => ‘sam_get_short_link’, ‘update_callback’ => null, ‘schema’ => $sam_short_link_schema ) ); … Read more

mydomain.com/wp-login redirects to wordpress.com/wp-login

You trying to change you .htaccess file probably look like this: Note: Don’t forgot to clean your browser cache. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule /wp-admin/ /wp-admin/index\.php [L,P] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

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