Target a page with query

I have checked at the source code and found $_GET as a solution to target them. $type = isset($_GET[“type”]) ? $_GET[“type”] : ‘story’; if( is_page(‘post-create-page’) && $type==’story’ ) { ….} elseif ( is_page(‘post-create-page’) && $type==’openlist’ ) {…..}

Return count for characters in the comment and perform action based on the length

By using a function to perform that: recent_comment_text_more($comment_content) that function would look like (in case you’re using PHP, part of your code looks from another language): function recent_comment_text_more($comment_content, $more_href) { if (strlen($comment_content) > 180) { $comment_content = substr($comment_content, 0, 177) . sprintf(‘<a href=”https://wordpress.stackexchange.com/questions/8656/%s”>… (more)</a>’, $more_href); } return $comment_content; } Good luck! Multibyte charset safe variant … Read more

How do I test whether [gallery] is empty?

You can check if an attachment for the given post exists with the get_posts function. This will create a new sql query – so there could be a performance issue. // Util.class.php class Util { public static function has_attachments() { $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => $post->ID … Read more

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