wordpress_add

Thursday, 30 January 2014

Pagination in wordpress

Pagination in wordpress

First of all download this plugin

https://codex.wordpress.org/Pagination

than paste this code in any template where you want to show all the posts


<?php 


// the query to set the posts per page to 3

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array('posts_per_page' => 3, 'paged' => $paged );
query_posts($args); ?>
<!-- the loop -->
<?php if ( have_posts() ) : while (have_posts()) : the_post(); ?>
  <!-- rest of the loop -->
  <!-- the title, the content etc.. -->
<?php endwhile; ?>
<!-- pagination -->
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
<?php else : ?>
<!-- No posts found -->
<?php endif; ?>


if you want to show the post of specific category than replace this code in above code at line 2. 

$args = array('cat' => '7','posts_per_page' => 3, 'paged' => $paged );

NOTE : cat=>7 will be any Number ( ID of specific category)

Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.


Wednesday, 29 January 2014

Use two skype account at a same time..

How to run  Multiple instances of a software

Today i going to share an interesting information with you guys.how two use two skype accounts at a same time.

first login your first skype account with ordinary method for second account follow these steps

go to the command prompt 
than press 
win key + r
a dialog box will open than paste this line as it is in dialog box.
"C:\Program Files\Skype\Phone\Skype.exe" /secondary

[ Most of Computers have different Folder name like "Programs files (x86)" So replace that folder name in above path ]

Enjoy and give your feedback.

Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.



Thursday, 23 January 2014

Wordpress Search in Dr-wordpress

Wordpress Search : ( dr-wordpress.blogspot.com)

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    <div>
        <input type="text" value="" name="s" id="s" placeholder="Search Here..." />
        <input type="submit" id="searchsubmit" value="" />
    </div>
</form>

just copy and paste this code and put it in search box area.. and enjoy searching..:)


Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.

Friday, 10 January 2014

Get checkbox value in PHP

Get checkbox value in PHP



<form action="index.php" method="post">

 <input type="checkbox" name="language[]" value="php" />PHP<br /> 
<input type="checkbox" name="language[]" value="html" />HTML<br /> 
<input type="checkbox" name="language[]" value="java" />Java<br />
 <input type="checkbox" name="language[]" value="c++" />C++<br /> 
<input type="submit" value="send" />

 </form>


foreach($_POST['language'] as $value)
 {
    echo 'Checked: '.$value.' ';
 }

If you check all the checkboxes, this script will output: 

Checked: php
Checked: html
Checked: java
Checked: c++

Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.

Thursday, 9 January 2014

Online image Mapping.

Image mapping in HTML

Just go to this website and add your image
Than you have different options right there draw online mapping with associated link.
Online code will generate copy that code and use it like i mentioned below in this POST

http://www.maschek.hu/imagemap/imgmap

How To use code :

Example:
**********************************************************
This code will generate by Online Tool.

<MAP NAME=mymap>

<AREA HREF="/reference/" ALT="HTML and CSS Reference" COORDS="5,5,95,195">
<AREA HREF="/design/" ALT="Design Guide" COORDS="105,5,195,195">
<AREA HREF="/tools/" ALT="Tools" COORDS="205,5,295,195">

</MAP>

**********************************************************

<IMG SRC="sitemap.gif" ALT="Site map" USEMAP="#mymap" WIDTH=300 HEIGHT=200>

Put this line with proper name (Highlighted in red font) 
---------------------------------------------------------

HTML allows images in different documents to use the same MAP definition from just one file, but many browsers do not support this and require the MAP and image elements to be in the same document.
MAP was originally defined to take one or more AREA elements that specify the coordinates of a clickable region on the image. An example follows:

Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.


Wednesday, 8 January 2014

Interview questions for Software Developers

Interview questions for fresher Software developers

hi i found a website where lots of important queries were asked. Visit this link

For php

http://www.pcds.co.in/php-interview-questions-and-answer.php

for .net development

http://www.pcds.co.in/dot-net-interview-questions-and-answers.php

Android Interview Questions And Answers

http://www.pcds.co.in/common-android-interview-questions-and-answers.php

Here is the link of blog which helps You alot for preparing interview questions


Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.

Tuesday, 7 January 2014

Code For Download PDF format Using PHP

How to Download PDF Using PHP ( dr-wordpress.blogspot.com )

  1. Upload the file you want to make available for download to your web server. For example,
    dr-wordpress.pdf
  2. Edit a new PHP file in your web editor. For example:
  3. <?php
    header("Content-disposition: attachment; filename=dr-wordpress.pdf");
    header("Content-type: application/pdf");
    readfile("dr-wordpress.pdf");
    ?>
  4. Link to your PHP file as a download link. For example:
    <a href="huge_document.php">Download dr-wordpress (PDF) File</a>

    Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.