How to Get wordpress parent page/post title?

If you use pages and subpages or posts and parent posts on your WordPress blog, it should be a good idea to display parent page/post title while on a child page. Here’s a code to do that job easily.

To achieve this recipe, simply edit your page.php file and paste the following code where you’d like your parent page title to be displayed:

$parent_title = get_the_title($post->post_parent);
echo $parent_title;

That’s all. Also, this code should be some inspiration for creating breadcrumbs.


SEO 10 Steps to Better Search Rankings

Optimizing your website to boost its traffic is neither an easy task nor a rocket science. It is one of those tasks that require both creativity and hard-working. There are many factors that play a role in search engine rankings. Here are a few “on-site” optimization factors that are critical for better search engine rankings that could help you increase your chances of success.

To do well with your SEO strategy, you should have a solid framework to work through; this SEO framework should have the main 10 key elements in each and every SEO strategy, which are:

1. Keywords analysis = knowing your market

In any marketing activity, we should start with knowing the market. In Search engine optimization process, your ultimate goal is to deliver your marketing message to the clients.
How would you reach those clients, if they can’t find your website when they search your products and services?
Your message definitely need a medium to across to your clients, your online marketing plan will take care of this, which will start with knowing your market and keyword analysis.
Keywords analysis is the building block to any successful SEO, Which keywords your customer will use when searching your products and services, Keywords analysis works best through an extensive keyword exploration. Exploring the keywords that the researcher repeatedly searches for is one of the best techniques to do your research. One of the best tools that will help you in such exploration process is through Google keyword tool.
2. Competitive analysis
After exploring the keywords and phrases that best express your products, services, and the benefits you give to your clients. The second step is to study the strength of your competitors, through following these three steps:


  1. Selecting the competitors to analyze
  2. Analyzing the competitors websites  a. On-site (keywords, content) b. Off-site (backlinks, link building strategy)
  3. Investigating competitor SEO strategy.
  4. Competitive analysis is done through studying the websites that compete with you on such keywords, what is the strength of your competitor and how you would get a percentage of the current market shares through promoting your products and services.

3. Content
Both Quality and quantity will enable search engines to better rank your website.
4. Link building
Link Building is to create inbound links to your website. This can be done through different ways; one of them is to post your articles with links back to your website in high quality article websites. The main advantage behind link building is the quality traffic generated from those incoming links.

5. Analysis and reporting
While implementing the SEO strategy, the last step will be analyzing the process itself. We need to analyze the online marketing generated traffic, check the quality of that traffic generated and check the website organic search rank.
6. The Title Tag
The title tag plays one of the most important roles in search results at Google, and is almost always the heading Google chooses for each of its listings. Placement of your target phrase is best used near the start of the tag and repeated again in the middle or near the end. For best results each page on your site should have a totally unique title tag.

7. Meta Description Tag
The Meta Description tag is still occasionally used by Google as the description which appears in the search results themselves. Adding your keyword/s at the beginning of the description can help to attract a new visitor.

8. Meta Keyword Tag
When it comes to Google this tag is not really considered that much, and won´t influence your rankings too much. But still needs to be there for other Search Engines and it is best to keep it clean. When adding keywords to this tag, do not SPAM it, just add enough relative keywords that relate to the content of your page.

9. Heading Tags
Placement of target phrases within heading tags helps to establish the importance of those given phrases. Only place target phrases within a heading tag if it makes sense to do so, and don´t flood a page with numerous tags.

10. Image Alt Text
While image alt text still plays a minor role, its biggest part is within the use of image based navigation. If you have an image linked to another page, the alt text will be attributed much the same way as standard link anchor text is.

Continuous reporting for the SEO strategy is required to reach the main goal of quality traffic and improved conversion rate.

Why SEO doesn’t work?

Many webmasters face the problem that their SEO campaigns don’t deliver the expected results. Why are your campaigns under performing? What can you do to make sure that search engine optimization works for you?
There can be several reasons why your SEO isn’t a success:

Wrong Goals
If your website doesn’t have many high rankings yet then you cannot expect that Google will display your site on the first result page for keywords such as “mp3” or other very competitive one-word keywords.

You have to start with more targeted key phrases first. Optimize your pages for many different keywords with lower competition. The more high rankings your website has for keywords with lower competition, the more likely it is that your website will also get high rankings for more competitive keywords that belong to the same topic.

It’s like running a marathon. You have to run smaller distances first before you can run the full 26 miles and 385 yards.

Don’t Take SEO Seriously
Search engine optimization isn’t set-and-forget. It takes some time to make things happen. Search engine optimization is an investment into your company and it should be treated like that.

If all you do to ‘promote’ your website is to submit it to search engines then you won’t be successful. You have to invest time and effort into the optimization of your site. Tools can help you to save a lot of this time and effort but you still have to work with your site.

Focus Wrong Elements
Some webmasters are obsessed with the length of the title tag. Others submit their website every few days to search engines. Other webmasters insist that a particular part of their website links must use the rel=nofollow attribute.

You don’t have to chase the latest search engine optimization trend. These trend topics usually make the difference between position 8 and position 9. If your website isn’t listed on the first result page at all, you have to get the basics right.

The most important factors that will get your website on Google’s first result page are optimized web pages with good content with a tool and good back links with the IBP link improver.

Wrong Keywords
This is an extremely common mistake that many webmasters make. If you choose the wrong keywords, you will waste a lot of time and money.

The best keywords for your website are not the keywords with the biggest search volume. The best keywords also aren’t the keywords that will boost your ego and it’s also not the “obvious” keywords that will work best for SEO.

The best keywords for SEO are the keywords that deliver targeted visitors who will buy. It does not matter if a keyword has thousands of searches. If none of the visitors who find your site through that keyword will buy, then this keyword won’t do you any good.

Wrong Links
To get high rankings on Google, your website must have good back links. Automatic links from link building schemes don’t work. Actually, that kind of links can even get you in trouble with Google.

You must get the right kind of back links to succeed. Use professional link management tools and consider purchasing text links from a quality site.

Search engine optimization can contribute greatly to the success of your website. It’s important that you do the right things in the right order and that you focus on the right elements. If you can tick all boxes in the checklist, your website is ready to get top 10 rankings on Google for your most important keywords.

The On Demand Global Workforce - oDesk

How to use JS file with APEX?

Today we can not think an application without Ajax/js. Good news APEX already included external js/css facility. First time i have faced some problem implemented external js in APEX but finally implemented. Now step by step we will show the process…

1. Open your application and click ‘Shared components’.

Application Home


2. At the bottom of the page ‘Files’ block, click ‘Static files’

3. Click ‘Create’ button from top right corner. Browse your js file i.e.jquery.js

4. Now go your page where you want to implement this js file. Click ‘Edit page #’ & edit page properties. GO to ‘HTML Header and Body Attribute’ and put like bellow line..

<script src=”#APP_IMAGES#jquery.js” type=”text/javascript”>


5. Now call your js functions & enJoy!

Best of luck , if further any query please buzz me.


Zend Certified Engineer (ZCE) Study Guide Links

PHP Basics

Object Oriented Programming

PHP 4/5 Differences

  • Object Orientation
  • E_STRICT – In PHP 5 a new error level E_STRICT is available. As E_STRICT is not included within E_ALL you have to explicitly enable this kind of error level. Enabling E_STRICT during development has some benefits. STRICT messages will help you to use the latest and greatest suggested method of coding, for example warn you about using deprecated functions.
  • References vs. Object Handles | Further Reading

Streams and Network Programming



Databases and SQL

Strings and Patterns


XML and Web Services

Web Features

Design and Theory


About ‘ROWNUM’ in Oracle

ROWNUM is an Oracle pseudo column which numbers the rows in a result set.

SELECT rownum, table_name
FROM user_tables;

————- —————–

5 rows selected

Here is a summary of how ROWNUM can be used.

Limiting Rows

ROWNUM can be used to limit the number of rows returned by a query in a similar way to LIMIT in Postgres and MySql, TOP in SQL Server and FETCH FIRST in DB2.

SELECT rownum, table_name
FROM user_tables
WHERE rownum <=3;

————- —————–

3 rows selected


The use of ROWNUM is not restricted to select statements. It can be used with DML statements that update the database too.

FROM all_objects
WHERE rownum <= 1000;

Table created

SET object_id = rownum,
created = created + INTERVAL '1' MINUTE * rownum
WHERE rownum 2;

——– —————-

3 rows selected

You will notice that an inline view has been introduced to transform the ROWNUM pseudo column into a ‘real’ column before we do the comparison.

It is tempting to write the above SQL as follows.

SELECT table_name
FROM user_tables
WHERE rownum > 2;


0 rows selected

However, this query will always return zero rows, regardless of the number of rows in the table.

To explain this behaviour, we need to understand how Oracle processes ROWNUM. When assigning ROWNUM to a row, Oracle starts at 1 and only only increments the value when a row is selected; that is, when all conditions in the WHERE clause are met. Since our condition requires that ROWNUM is greater than 2, no rows are selected and ROWNUM is never incremented beyond 1.

The bottom line is that conditions such as the following will work as expected.

.. WHERE rownum = 1;

.. WHERE rownum 10;

Top-n Query

Typically, a top-n query sorts data into the required sequence and then limits the output to a subset of rows.

For example, suppose we wish to retrieve the top three earners from our employee table.

SELECT ename, sal
SELECT ename, sal
FROM emp
WHERE rownum <=3;

———- ———
KING 5000
SCOTT 3000
FORD 3000

3 rows selected

The inline view (the inner select) sorts the rows and passes the result up to the outer select. The outer select then limits the output to three rows.

It may seem more natural to use the following SQL.

SELECT ename, sal
FROM emp
WHERE rownum <=3

———- ———————-
ALLEN 1600
WARD 1250

3 rows selected

However, this does not give us the result we want because Oracle assigns the ROWNUM values to the rows before it does the sort.

In this example, Oracle will retrieve three rows from the table, any three rows, and sort only these three rows. We really need Oracle to sort all the rows and then return the first three. The inline view will ensure that this will happen.

Sort Performance

Limiting rows on a sorted result set using ROWNUM can also provide an added performance benefit. Rather than physically sorting all the rows to retrieve just the top few, Oracle maintains an array which contains just the highest or the lowest values (depending on whether we specified ASC or DESC in the ORDER BY clause). The size of the array will be the number of rows we wish to return. As rows are processed, only the highest (or lowest) values are retained in the array. All other rows are discarded.


Next, we will see how ROWNUM is used to select a range of rows from within a result set. This is useful if we are to provide pagination on a web screen, for example.

Suppose we are paging through the employee table in name order and we wish to display rows six to ten inclusive.

SELECT rnum, ename, job
(SELECT /*+ FIRST_ROWS(10) */ rownum rnum, ename, job
(SELECT ename, job
FROM emp
ORDER BY ename)
WHERE rownum 5;

——– ———- ———

5 rows selected

We use nested inline views to retrieve and sort the data and then apply the range check using ROWNUM. We have split the upper and lower bound check, which allows Oracle to use COUNT(STOPKEY) in the execution plan when checking for ROWNUM <= 10. This is a performance optimization which, along with the sorting optimization described earlier, will ensure that our query runs efficiently as the table grows.

The FIRST_ROWS(n) hint also tells Oracle to optimize the query so that the first n rows are returned as quickly as possible.


ROWNUM provides a mechanism for returning a subset or range of rows from a query. It can be misleading at first if not properly understood but, once mastered, is invaluable for limiting result set output for pagination and top-n style queries.

For more information on ROWNUM, see Tom Kytes article on OTN.

For more information on Oracle, visit level up.