Home/Yumna Tatheer

About Yumna Tatheer

Yamna Tatheer is a Wordpress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.
5 06, 2012


So Nintendo freaks, Nintendo is really here with a bang. The Electronic Entertainment Expo which is here from 5 June till 7 June shows a lot from Nintendo! On Tuesday, the company launched its Wii U- a video game console. Moreover, this console has come in combination with the GamePad ready to change the gaming world in a go! No doubt Nintendo is aimed at changing the usual gaming style these days. According to Nintendo, Wii U is pretty much different from those which are already on the current Wii. And that ‘it changes the way you enjoy TV ’. Nintendo has definitely showed that a little console can do wonders! It comes in white and black colour. The new controller allows the user to view multiple screens, one of them is on your TV and one of them is on your Wii U Gamepad. The company gave a demo of PikMin3 in which the Wii U Gamepad displayed a three-dimensional map. You can easily control the creatures in the game on the displayed map as these creatures move around

3 06, 2012

HTML Doctype Declaration – HTML 5 Doctype

What is a DocType? The doctype declaration should be the first item to appear in the source markup of any web page. It is an instruction to the web browser (or other user agent) and it identifies the version of the markup language in which the page is written. It refers to a known Document Type Definition, or DTD for short. The DTD sets out the rules for that of markup, enabling the browser to render the content accordingly. Why a DocType? Per HTML and XHTML standards, a DOCTYPE (short for “document type declaration”) informs the validator which version of (X)HTML you’re using, and must appear at the very top of every web page. DOCTYPEs are a key component of compliant web pages: your markup and CSS won’t validate without them. DOCTYPES are also essential to the proper rendering and functioning of web documents in compliant browsers like Mozilla, IE5/Mac, and IE6/Win. A recent DOCTYPE that includes a full URI (a complete web address) tells these browsers to render your page in standards–compliant mode, treating your (X)HTML, CSS, and DOM

5 01, 2017

5 ways to Protect Your WordPress Site From Spam

Some days after you launch your website, you will notice a lot of comments from spam bots. These are very annoying and often target a certain post of the blog. The comment title consists of links and the body has some spam links and text. Spammers not only spam in comments they also steal your website content and spread it all over the web that is another reason why its important to protect wordpress from spam. There are two kinds of method used by spammers: Automated spam-bots : – Spammers use such as program and tools (robots) that can automatically submit large numbers of spam comment to numbers of blog in no time. Manual Spam : -Well in this case spammers visit your site and manually post their spam comments in the comments field. Spam Comments are a fact of life for bloggers, and no one can stop Spam Comments 100%, You can only minimize that to a lower level by using some tricks below to fight the spam on your wordpress website. 1-Install Akistmet First thing you should is ,

18 05, 2012

Ways To Get First Image From Post

Sometimes you don't have a featured image with your post. In such a case you would like to have the first image of the post as thumbnail . Here is a snippet to get the first image from post content. sometimes this trick might not work, this occurs when the DOM element has a different structure. So if this doesn't work for some reason, try adding one more regex which suits your case to make it work. You can also parse the DOM to get the image source. I will cover that topic in the next post. For now, here is how you do it through regex. function catch_that_image ($post_id=0, $width=60, $height=60, $img_script='') { // you can set any params here global $wpdb; if($post_id > 0) { // select the post content from the db $sql = 'SELECT post_content FROM ' . $wpdb->posts . ' WHERE id = ' . $wpdb->escape($post_id); $row = $wpdb->get_row($sql); $the_content = $row->post_content; if(strlen($the_content)) { // use regex to find the src of the image preg_match("/<img src\=('|\")(.*)('|\") .*( |)\/>/", $the_content, $matches); if(!$matches) { preg_match("/<img class\=\".*\"

6 05, 2012

How to retrieve the WordPress Featured Image URL

Sometimes you need the source url or path to a featured image. The reason might be that you want to use it as background somewhere or use it in src of img tag. There can be several reasons why you need the url to featured image of a post or page. Here is a trick which can be used to retrieve the url and then use it as background for a div <?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $featured_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <div style='background-image: url("<?php echo $featured_image_url [0]; ?> <?php endif; ?> Remember to do $featured_image_url [0] because $featured_image_url is an array and we want to access the first member of it.Isn't this a great trick?

5 05, 2012

WordPress Frontend Posting for Users – Why?

Posting from site or posting from frontend is a popular trick for wordpress based websites. A lot of blogs and websites now allow their users to post through frontend. They do not want their users to see their backend. A page is provided at frontend where users will have only specific fields to submit their posts. The blog owner wants to provide only some fields and provide them in such a way that the user finds it easy to submit posts. I personally don't like frontend posting, since i feel its unnecessary. When you have a dashboard which displays options according to user role and you can customize the post editor page to have the fields that you want, why have a frontend post submit form? . One reason why i think people would use frontend posting trick is, they want the design of post submit form to match the rest of the site layout. In case of using the dashboard, users will see the default white and blue wordpress dashboard which doesn't seem to be very attractive. I have

4 05, 2012

How to Add pagination to Post Loop.

What is pagination By default worpress shows links for next and previous posts. Older will show the ten previous posts and newer will show the next ten posts. It is desireable to add page numbers for posts, so that you know how many post pages are there and you can move to any desired page by one click. Pagination gives navigation ease plus a more professional look to your post loop. You must have seen pagination below post loop which looks like this, How to add pagination to Post loop There are two ways of adding pagination to post loops. One is through a plugin and the other is through writing some code in your wp_query. Pagination Through Plugin I have used a pagination plugin called "WP Page Numbers" . Its a nice plugin, it gives you few templates of pagination to work with. You can choose any of them to suit your theme colors. Below you can see the templates available within the plugin itself. Pagination through Code For displaying page number below a post loop, you have to

3 05, 2012

8 Great Twitter ,Facebook, Googleplus Tricks for WordPress

1- Get User's Tweets You can get user tweets if the twitter profile is a public profile. The code below gives you the feed which can be styled in any way you like. function getTweets($user) { $page= file_get_contents("http://twitter.com/{$user}"); $from = strpos($page, "<ol id="timeline" class="statuses">"); $to = strpos($page, "</ol>"); $length = $to - $from; $page =substr($page, $from, $length); echo $page; } getTweets('axactsoft'); //replace axactsoft with your twitter username 2- Disable Admin bar Here is a trick to disable the wordpress admin bar, use this code in functions.php add_filter('show_admin_bar', '__return_false'); 3- Add Google plus one button Google plus one buttons allows user to give a rating to your blog, posts or pages. It easy to display the plus one button wherever you want. Just follow the code and instructions below. <!-- Place this tag in your head or just before your close body tag --> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <!-- Place this tag where you want the +1 button to render -->   4- Get Tweet Count. Sometimes you would not like a long list of tweets

1 05, 2012

Use shortcodes in Widget

Shortcodes if used in widgets will not be replaced by the relavant code. You can make them display proper code by using this code. // display shortcode in widgets if ( !is_admin() ){ add_filter('widget_text', 'do_shortcode', 11); } More Interesting articles on this topic: Add Shortcode for WordPress(tamilcselvan.wordpress.com)

WhatsApp chat