Wordpress, WordPress

WordPress FAQ

Q. What are the types of hooks in WordPress
a. There are two types of hooks 1) Action hooks 2) Filter hooks

Q. What is custom field in wordpress?
a. Custom field is a meta-data that allows you to store arbitrary information to the wordpress post.

Q. What is the prefix of wordpress tables by default ?
a. By default, wp_ is the prefix for wordpress.

Q. What is WordPress Loop
a. To display post WordPress use PHP code, this code is known as loop.

Q. Why widget does not show up in the sidebar?
a. While using widget you have to ensure whether your theme supports the widget and if it does then it must show the sidebar. If in any case if it happens that you don’t see the sidebar then it might be missing the “function.php” file or file similar to that. This can also happen if you have forgot to save the changes in the widget or refreshing the older display of the page.

Q. What are meta-tags?
a. Meta-tags are keywords and description used to display website or page information.

Q. What are the reasons why one should not hack WordPress core file?
a. The best reason not to hack the core files is that whatever you might be doing has to be reworked as a patch.

Q. How to hide the top admin bar at the frontend in WordPress?
a. Add below line in function.php
add_filter('show_admin_bar', '__return_false');

Q. How to hide Directory Browsing in WordPress from server?
a. Add following code in htaccess file
Options -Indexes

Q. How to display custom field in wordpress?
a. echo get_post_meta($post->ID, 'keyName', true);



PHP interview questions and answers

1)    What does a special set of tags <?= and ?> do in PHP?

2)    What’s the difference between include and require?

3)    I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

4)    Would I use print “$a dollars” or “{$a} dollars” to print out the amount of dollars in this example?

5)    How do you define a constant?

6)    How do you pass a variable by value?

7)    Will comparison of string “10” and integer 11 work in PHP?

8)    When are you supposed to use endif to end the conditional statement?

9)    Explain the ternary conditional operator in PHP?

10) How do I find out the number of parameters passed into function?

11) If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?

12) What’s the difference between accessing a class method via -> and via ::?

13) Are objects passed by value or by reference?

14) How do you call a constructor for a parent class?

15) What’s the special meaning of __sleep and __wakeup?

16) Why doesn’t the following code print the newline properly?

17) Would you initialize your strings with single quotes or double quotes?

18) How come the code <?php print “Contents: $arr[1]”; ?> works, but <?php print “Contents: $arr[1][2]”; ?> doesn’t for two-dimensional array of mine?

19) What is the difference between characters 23 and x23?

20) With a heredoc syntax, do I get variable substitution inside the heredoc contents?


 Just press Like button to download Answers




Web Designer interview Questions

  1. How do you place two paragraphs next to each other?
    1. Float one or both inner divs with float left and width
  2. What is CSS declaration?
    1. A declaration is made up of a property name and a value, separated by a colon
  3. What are CSS pseudo-classes?
    1. CSS pseudo-classes are used to add special effects to some selectors.
      1. Selector:pseudo-class {property:value;}
      2. selector.class:pseudo-class {property:value;}
      3. Example : a.red:visited {color:#FF0000;}
  4. Can Style Sheets and HTML stylistic elements be used in the same document?
    1. yes
  5. I made a 10px-height div, but IE makes it 20px height how to solve this ?
    1. when you make a div just to contain the bottom border of a box solution is make font size is zero
  6. What is grouping in CSS?
    1. If you want to apply same styles to few properties then grouping is best to use the syntax is below
      1. .copyright, .tagline, .hint {font-style: italic}
  7. What is parent-child selector?
    1. Parent-child selector is a selector representing the direct descendent of a parent element. Parent-child selectors are created by listing two or more tilde (~) separated selectors.BODY ~ P {background: red; color: white} The P element will be declared the specified style only if it directly descends from the BODY element:<BODY> <P>Red and white paragraph </P> </BODY>
  8. What is cascade?
    1. Cascade is a method of defining the weight (importance) of individual styling rules thus allowing conflicting rules to be sorted out should such rules apply to the same selector.
  9. Is Style Sheets case sensitive?
    1. No
  10. How to include comments in Style Sheet?
    1. Syntax: /* This is a CSS-comment */
  11. How do you target a certain browser?
    1. IE can be targetted by preceding your properties with ‘* html’. For example…
      #nav {position:relative;}
      * html #nav { /* this will target IE */
      position:absolute; }

    2. and the second way is
      <!--[if IE]> <link href="ieonly.css" rel="stylesheet" type="text/css"> <![endif]—>
  12. What is !important ?
    1. It will override declarations with normal weight .
  13. Can CSS be used with other than HTML documents?
    1. Yes. CSS can be used with any structured document format.
  14. Which characters can CSS names contain ?
    1. A to Z, a to z, 0 to 9 and Unicode characters 161 to 255
  15. How do you make a tool tip that appears on hover?
  1. <a title="This is some information for our tooltip." class="tooltip">CSS3 Tooltip</a>
    display: inline;
    position: relative;

    .tooltip:hover:after{background: #333;
    background: rgba(0,0,0,.8);
    border-radius: 5px;
    bottom: 26px;
    color: #fff;
    content: attr(title);
    left: 20%;
    padding: 5px 15px;
    position: absolute;
    z-index: 98;
    width: 220px;




  1. What does a special set of tags <?= and ?> do in PHP?
    – The output is displayed directly to the browser.
  2. What’s the difference between include and require?
    – It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
  3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
    – PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
  4. Would I use print “$a dollars” or “{$a} dollars” to print out the amount of dollars in this example?
    – In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like “{$a},000,000 mln dollars”, then you definitely need to use the braces.
  5. How do you define a constant?
    – Via define() directive, like define (“MYCONSTANT”, 100);
  6. How do you pass a variable by value?
    – Just like in C++, put an ampersand in front of it, like $a = &$b
  7. Will comparison of string “10″ and integer 11 work in PHP? – Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
  8. When are you supposed to use endif to end the conditional statement?
    – When the original if was followed by : and then the code block without braces.
  9. Explain the ternary conditional operator in PHP?
    – Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
  10. How do I find out the number of parameters passed into function?
    – func_num_args() function returns the number of parameters passed in.
  11. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
    – 100, it’s a reference to existing variable.
  12. What’s the difference between accessing a class method via -> and via ::?
    – :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
  13. Are objects passed by value or by reference?
    – Everything is passed by value.
  14. How do you call a constructor for a parent class?
    – parent::constructor($value)
  15. What’s the special meaning of __sleep and __wakeup?
    – __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
  16. Why doesn’t the following code print the newline properly? <?php
    $str = ‘Hello, there.nHow are you?nThanks for visiting TechInterviews’;
    print $str;
    Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters – and n.
  17. Would you initialize your strings with single quotes or double quotes?
    – Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
  18. How come the code <?php print “Contents: $arr[1]“; ?> works, but <?php print “Contents: $arr[1][2]“; ?> doesn’t for two-dimensional array of mine?
    – Any time you have an array with more than one dimension, complex parsing syntax is required. print “Contents: {$arr[1][2]}” would’ve worked.
  19. What is the difference between characters �23 and x23?
    – The first one is octal 23, the second is hex 23.
  20. With a heredoc syntax, do I get variable substitution inside the heredoc contents?
    – Yes.


FAQ, HTML & CSS, Photoshop

Web designer adobe Photoshop,html,css interview questions and answers

  1. What is difference between properties and attributes ?
  1. Every body thinks that property and attributes are same but in real those are different.
    the syntax of property and attributes is
    <property attribute="attributeValue">proopertyValue</property>
    for more details you can visit here
  • write a border radius for all browsers ?
    1. -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
  • if you are writing a special css file for ie you will attach  it in head section and we will comment it but how the browser read it ?
    1. it was called as conditional comments. for example
      <!--[if IE ]> <link href="iecss.css" rel="stylesheet" type="text/css"> <![endif]—>
      we will write the code as above we have closed the IE in conditional statement called “if “ in square braces.
      The enclosed HTML content—a <link> tag—will be revealed to all IE browsers that support conditional comments. It links to a style sheet that only IE will see. All browsers other than IE versions 5 and later will see the code above as one simple HTML comment. If we remove the brackets and text for the sake of clarity, we’re basically left with a normal comment structure as follows:
        <link href="iecss.css" rel="stylesheet" type="text/css" >
  • What is the shortcut key for 100% zoom in Photoshop ?
    1. Double click on zoom tool
  • What is CS in adobe version numbers ?
    1. CS means Creative Suit
  • What a lasso tool? For what purposes it can be used?
    1. The lasso tool was an  selection tools (shortcut L). It was used for selection .
  • Can you make gif animations using Photoshop tool?
    1. yeas Photoshop has a small tool called Imgeready to do 2d animations.
  • Which tool(s) will you choose to slice up an image in Adobe Photoshop?
    1. Crop tool
  • What is the use of notes tool(N) in adobe Photoshop ?
    1. To make comments.
  • How do you export the Photoshop file to web ?
    1. Slice the image with Slice tool (k) and press alt+shift+ctrl+f, select the save button in the next dialogue box and save type is Images and HTML.


    FAQ, Photoshop

    Adobe Photoshop Interview questions and answers

    1. For Photoshop is cs3 really that much better than cs2 on an Intel Mac?
    2. How do I slice up an image in Adobe Photoshop CS4 Extended ?
    3. How do you select an exact color to match?
    4. What is gradient tool?
    5. What do you mean by Gaussian Blur? What is Smart object?
    6. How to Unlock Background?
    7. How to achieve Black/White with Color Detail?
    8. How do you print the grid?
    9. How do you create an artistic border?
    10. What is a heal tool?
    11. How to Use the NEF Software with Photoshop?
    12. Name few open source alternatives of Photoshop.
    13. Which color models Photoshop uses?
    14. What are the layers & masks in Photoshop?
    15. What is PSB & how it is different from PSD?
    16. What is a Photoshop plug-in? Name few of them.
    17. What are main components of Photoshop workspace?
    18. What is the shortcut to zoom back to 100%?
    19. What is default color for foreground & background in Photoshop?





    Interview Questions and answers for web designers – HTML & CSS

    1. How can we submit a form without a submit buttom?
    2. How do I center a table?
    3. Can I include comments in my Style Sheet?
    4. In DHTML what is the difference between “FontSize” and “Font Size”
    5. HTML is a Programming Language or Scripting Language?
    6. How do I quote font names in quoted values of the style attribute?
    7. What are META tags?
    8. How can I check for errors om html?
    9. How do I make my div 100% height?
    10. what can be done with style sheets that can nit be accomplished with regular HTML ?
    11. Is there anything that can’t be replaced by style sheets ?
    12. What browsers support style sheets? To what extent?
    13. Do any WYSIWYG editors support the creation of Style Sheets? Any text-based HTML editors?
    14. Can you use someone else’s Style Sheet without permission?
    15. What does the “Cascading” in “Cascading Style Sheets” mean?
    16. Which style specification method should be used? Why?
    17. What are the advantages/disadvantages of the various style methods?
    18. How do you override the underlining of hyperlinks?
    19. What is the difference between ID and CLASS?
    20. Which characters can CSS-names contain?


    Download the answers file here




    HTML, CSS, JS, Interview Question and answers

    1. What is HTTP ?
      1. HTTP is standards for Hyper Text Transfer Protocol.
    2. What does it mean Small lock on the status bar?
      1. It was a secured connection.
    3. Which is better, gif or jpg format, justify?
      1. Generally JPG is used for High resolution Images, such as artistic images but this takes lot of size in document.  The people who uses slow connections they may face the problems like slow loading but in GIF format it takes low size in 128depth and 256 depth colors and we can also use small animations in GIF format.
    4. Explain HTML Frames (Frames, iFrame, NoFrame, Target controls, Frame Attributes) ?
      1. Frames concept is used to load multiple pages in a single page. We can create frame page by horizontally and vertically if we want to use horizontal frames we use Where Iframe is used.
    5. What is the purpose of an HTML forms?
      1. To get few details from the user.
    6. How Many maximum colors does GIF has ?
      1. 256
    7. Write HTML code to create a INLINE Frame ?
      1. <iframe src=”demo_iframe.htm” width=”200″ height=”200″></iframe>
    8. Why is JavaScript not a programming language but script language? Justify
      1. Write JavaScript code to call multiple function with a single events ?
    9. Write HTML code to control the margins of page?
      1. <body  topmargin=”50”, leftmargin=”50”>
    1.                                                                i.      The above script makes 50px left and top margin
    2. Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.
    3. The <meta> tag always goes inside the <head> element.
    4. The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.
    5. The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable
    1. Write JavaScript code to call multiple functions with a single event ?
      1. onclick = “f1(); f2”
        or onclick = “funct()”
        function funct() {

    2. Write JavaScript code to change an image when the users mouse points
      1. document.getElementById(“id”).src = “url Value”;
    3. What is META Tags ?
    1. How can i control the tab order in HTML Form elements?
      1.  <form>
        Field 1 (first tab selection):
        <input type=”text” name=”field1″ tabindex=1 /><br />
        Field 2 (third tab selection):
        <input type=”text” name=”field2″ tabindex=3 /><br />
        Field 3 (second tab selection):
        <input type=”text” name=”field3″ tabindex=2 /><br />
    2. How do i get a pop up window to always stay on top using JavaScript ?
      1. <SCRIPT LANGAUGE=”JavaScript”><!–
        function newWindow(file,window) { msgWindow=open(file,window,’resizable=no,width=200,height=400′);
    3. Difference between the DIV and Tables ?
      1. Div generally separates a block of code. It can contain any number of elements, and is controlled by CSS. Think of a table as a block of cells cut into squares. Each cell in the table can be customized and shaped as needed. While both are acceptable for building websites, web developers will tell you that using CSS and divs is the way to go.
    4. Difference between the DIV and SPAN  and  Why Can’t I use only SPAN tag in Document ?
      1. The main difference between the DIV and Span tag is
    5. What is RIA (Rich Internet Application) ?
      1. A rich Internet application (RIA) is a Web application designed to deliver the same features and functions normally associated with deskop applications. RIAs generally split the processing across the Internet/network divide by locating the user interface and related activity and capability on the client side, and the data manipulation and operation on the application side.
    6. What is web 2.0 ?
      1. Web 2.0 is a concept that takes the network as a platform for information sharing, interoperability, user-centered design and collaboration on the World Wide Web. A Web 2.0 site allows users to interact and collaborate with each other in a social media dialogue as creators  of user-generated content in a virtual community, in contrast to websites where users are limited to the passive viewing of content that was created for them.
    7. What is Semantic Web?
      1. The Semantic Web is a collaborative movement lead by the World Wide Web Consortium (W3C). The standard promotes common data formats on the Web. By encouraging the inclusion of semantic content in web pages, the Semantic Web aims at converting the current web dominated by unstructured and semi-structured documents into a “web of data”. The Sematic Web stack builds on the W3C’s Resource Description Framework (RDF).
    8. What are the difference between DIV tag and SECTION element ?
      1. If you need the element simply to add styles to that area of the page, you should use theDIV element.
      2. If that area of the page has a specific meaning, for example it holds all your social media elements or it contains your blogroll, then you should use the SECTION element.


    Dreamweaver, FAQ, Photoshop

    Web Designer interview Questions and Answers

    1. What is the difference between cell spacing and cell padding?
      1. cell padding Specifies the space between the cell wall and the cell content and
        cell spacing Specifies the space between cells
    2. If a page has to be loaded over all frames in window, what should be the value of TARGET attributes?
      1. Target is main window or main frame.
    3. Which one of the following settlement is correct?
      1. A table cannot contain another table and A Form can be nested inside another form
    4. Which element are table cells?
      1. <td> </td>
    5. What tags are used to embed one html page inside another html page (without using frames)?
      1. <div style=”margin: 0 auto; width:100%; height:400px;”><object type=”text/html” data=”https://psd2web.in/” style=”width:100%; height:400px; margin:1%;”></object></div>
    6. In Dreamweaver what is used to apply same layout to my pages?
      1. By using Templates option we can apply same layout for all pages.
    7. Which HTML tag is used to define an internal style sheet?
      1. < style type=text/css media=”screen”>your css here</style>
    8. How to define an inline style in HTML tag ?
      1. <p style=”color: red; text-align:right; font-weight: bold”>
    9. How do you define an inline style?
      1. A CSS or cascading style sheets style that is written directly on the element or tag it affects.
    10. How to align total webpage center?
      1. body{margin: 0 auto;}
    11. What is a DTD? What DTD do you generally use?
      1. A DTD is a Document Type Definition, also know as DOCTYPE. In a document served as text/html, the DOCTYPE informs the browser how to interpret the content of the page. If the the doctype is not declared, the browser assumes you don’t know how to code, and goes into “quirks mode”. If you know what you are doing and include a correct XHTML DOCTYPE, your page will be rendered in “standards mode”.
    12. What are the possible values for the display attribute that are supported by all browsers?
      1. Display : Block;
    13. What is the default value for the display attribute for the image element?
      1. <img src=”smiley.gif” alt=”Smiley face” height=”42″ width=”42″ />
    14. what is the difference between inline and block level elements ?
      1. A block-level element is an element that creates large blocks of content like paragraphs or page divisions. They start new lines of text when you use them, and can contain other blocks as well as inline elements and text or data.An inline element is an element that define text or data in the document like STRONG makes the enclosed text strongly emphasized and Q says the enclosed text is a quotation. They don’t start new lines when you use them, and they generally only contain other inline tags and text or data. Or they include nothing at all, like the BR tag.
    15. What does display: run-in do?
      1. Creates either block or inline boxes, depending on context. Properties apply to run-in boxes based on their final status (inline-level or block-level).
    16. Difference between “visibility:hidden” and “display:none”?
        These two style properties do two different things.

      1. visibility: hidden hides the element, but it still takes up space in the layout and display: none removes the element completely from the document. It does not take up any space, even though the HTML for it is still in the source code.
    17. What are the pros and cons of using display:none?
      1. Pros
        1. Makes fonts look smoother
        2. Rounded edges look round
        3. Type is easier to read (for some) because it looks more like what printed type looks like
        4. Some people feel it’s prettier
      2. Cons
        1. Small fonts become too fuzzy to read
        2. Sharp edges may be fuzzy and not precise
        3. You can’t print anti-aliased text as it comes out blurred
        4. Images are generally larger
        5. Type is easier to read (for some) because the blurring is reduced and the fonts are clear
    18. When to Use Anti-aliasing or Font Smoothing
      1. Anti-aliasing is a good choice for web images with flat colors and curves and text that is intended for web pages. With text, you should try to let the browser display the fonts with CSS, rather than putting them in a graphic.
    19. What are the five possible values for “position”?
      1. Values for position: static, relative, absolute, fixed, inherit
    20. What is the default/initial value for “position”?
      1. Static


    FAQ, Photoshop

    Adobe Photoshop Interview Questions and Answers.

    1 :: What is Adobe Photoshop? 

    Adobe Photoshop is a professional image editing software package that can be used by experts and novices alike. While this handout offers some very basic tips on using the tools available in Photoshop, more comprehensive guidance can be accessed on the web or in the help menu of your version of Photoshop. The version used for this tutorial is Adobe Photoshop CS.

    2 :: Explain about the Photoshop Work Area? 

    The work area can be intimidating to work with because of all the complex functionality but with a quick breakdown of the available features and their uses, you will be ready to comfortably navigate the work area with ease. The work area in Photoshop has the following basic functionality and features:

    a. Menu Bar : This is where you can access most of the commands and features in Photoshop

    b. Drawing Palette : Where the image being worked on will appear

    c. Options bar : Content sensitive display of tool options changes as different tools are selected display using Window > Options or Click a tool in the toolbox.

    d. Tool box : for creating an editing images (display or hide using Windows > Tools

    e. Palettes – to monitor and modify images (there are 5 palettes by default)

    f. Palette Well – to organize palettes in work area Drag a palettes tab into the palette well to store it in the palette well. Once in the palette well click on the palette tab to use it

    3 :: What is Resizing Images and Size Guide in Adobe Photoshop?

     When working with images for a website, you will need to resize your images to suit your particular purpose. Here is a basic guide that can help you decide on what is suitable. (The units used here are pixels, which are standard units across all computer platforms. The conversion between pixels and inches is roughly 1inch = 72 pixels or 1cm = 28 pixels) To use this particular unit of measure you will need to adjust you preference settings by selecting Edit > Preferences > Units and Rulers and changing the units and rulers to measure in pixels.

    a. Type of picture : Size in Pixels

    b. Background : 1024 x 768

    To resize a picture look on the menu bar and select Image > image size

    4 :: How do we crop an image in Photoshop?

    Cropping an image allows you to cut out any portion of the image you don’t like and/or make an image smaller. This document contains the steps performed to crop an image in each of the major image editors. To the right is a visual example of a large image, such as a image scanned into the computer being cropped to a smaller image.

    5 :: What is Gradients in Adobe Photoshop? 

    Gradients are a great way to introduce flashy, eye-catching graphics in your pages.

    6 :: How do we print the grid in Adobe Photoshop?

    Put the non printing grid on how you want it, then take a screen capture (alt + PrintScreen on PC) Open a new file, the size should be set as the size of the grab, and paste. Crop away everything (the background of the photoshop window, etc.)except for the image with grid on it…and print.

    7 :: Can you organize layers as in photoshop?

    Yes we can organize layes..
    For example you create a Ball in 1st layer and then in
    second layer you create the background. But you should lock
    all the layers and unlock the layer which u r working,
    because unlocked layers will be active always(active means,
    if u want to drage the ball, background layers also will be

    8 :: For photoshop is cs3 really that much better than cs2 on an Intel Mac?

    On both the Photoshop CS works fine. But on Mac it seems to speed up faster. The startup is much faster than on windows but relative to the velocity of the CS2, it indeed is faster. So yes, photoshop cs3 is better at functioning on an intel mac rater than cs2, due to the faster startup

    9 :: What is a Smart Object in Adobe Photoshop?

    Photoshop CS2 introduces a new type of layer called a Smart Object layer. Smart Objects are a little like symbols in Illustrator. Smart objects can consist of pixel-based content or vector-based content, like an Illustrator drawing placed in a Photoshop document. With smart objects, you can make multiple copies of a single object and all copies will be updated when one of the copies is edited ? but you can still apply layer styles and adjustment layers to the individual smart objects without affecting all copies, which provides for a lot of flexibility. Pixel-based smart objects also remember their original size and can be transformed multiple times without loss.

    10 :: How do I slice up an image in Adobe Photoshop CS4 Extended?

    Well, I just got Adobe Photoshop CS4 Extended and I saw that there is no slice tool. I found that kind of strange. I mean, that is a HUGE tool. All master web designers use the slice tool to make their websites which is what I need it for. So could someone please tell me how I slice an image in Adobe Photoshop CS4 Extended? Thanks!

    11 :: Explain about stress analysis in Adobe Photoshop?

    People working on these areas as a aerospace engineers should have familiarity and exposure to NASTRAN and MATLAB with knowledge on space environment and modeling of flexible dynamics. These aerospace engineers will be responsible to conduct stress analysis on metallic and composite structures. NASTRAN, IDEAD, Oracle and PATRAN proficiency level is required. Their duties also include on aircraft which are metallic and composite structures. This includes and understanding of control surface stiffness and loop calculations, finite element modeling (FEM), fatigue testing requirement and analysis.