I am trying to show different result in 1 page with links example.
i have 4 items – example1, example2, example3, example4
each of the example has 3 or 4 pages of information depends on the type.
so if want to see the information of example3 type3 i would get that information on page Example3
I don’t want to make like 30 pages just for 4 items i want my Menu to look like
Main item Example
Sub Items Example1, Example2, Example3, Example4
and then put links in each sub page with the action thing like:
php?example=1&type=1 show example1 type1 else if example=1&type=2 show example1 type2 else if example=2&type=1 show example2 type1 and so on~
If any one can give me an example of how to do it please i would be great full.
if its possible with WordPress-plugin or any other way i would like to hear it.
Edit:
this is how i tried it and it works but i don’t know if action are good to use with WordPress website i have read on the web people says its not a good choice to use.
<?php
$Example= $_GET['example'];
if ($Example== 'example1')
{
echo "Hello example1";
}
if ($Example== 'example2')
{
echo "Hello example2";
}
if ($Example== 'example3')
{
echo "Hello example3";
}
if ($Example== 'example4')
{
echo "Hello example4";
}
</php>
And sorry if i made any typo’s
Thanks in advance,
Jawido
You will have to use the custom query to retrieve the information depending upon url query string. Use category to group the posts. For example, posts that falls under category of example1 can be retrieved on page by using
You would want to go through the documentation for Wp_Query http://codex.wordpress.org/Class_Reference/WP_Query.
Use get_post if you want to get the information of individual page.