In WordPress, Page navigation is so popular. we use it as default or plugin. it works nice, but sometime we face problem when we use query_posts() for selected category post.
i hope this is a solution for them.
I found this solution working fine, check this : URL: http://raiseitsolutions.com/forum
$content = ‘Link‘;
//create some arbitrary HTML for the example
$dom = new DOMDocument();
//creates special DOM object
$dom->loadHTML($content);
//generates the DOM for the document $content
$xpath = new DomXPath($dom);
//creates special xpath object that interacts with the DOM object
//for some reason this is never used again in this script. idk why they put it in here.
$tag = $dom->getElementsByTagName(”a”);
//finds all occurrences of the ”a” tag in $content and stores as an array
$counter = $tag->length;
//gets the length of the array
for ($i = 0; $i item($i)->nodeValue;
//result = one individual ”a” tag (at index i in the array $tag)
$content = str_replace($result, ”.$result, $content);
//adding a google fav icon image in front of every ”a” tag in the array $tag
echo $tag->item($i)-> getAttribute(‘href’).”;
//print out all the URL’s of where the links go from each ”a” tag in $content
}
This piece of code is great. But if you have made significant revisions to the page (like changing the slug) it gets messed up and shows a slug such as domain/revision-8
How failsafe is the function for the depth of category? I mean, because it depends on the ID. I have to make a website with more than a thousand categories: cat > subcats > subsubcats > posts.
i think it.s more that ok , i just tested with your kind of depth , cat->subcat->subsubcat->posts and work super duper ok ! i allso used ”Collapsing Categories” plugin to get a nice list of categories in a widget
2011-06-10 @ 12:19 e m
In WordPress, Page navigation is so popular. we use it as default or plugin. it works nice, but sometime we face problem when we use query_posts() for selected category post.
i hope this is a solution for them.
I found this solution working fine, check this : URL:
http://raiseitsolutions.com/forum
2011-06-02 @ 9:56 e m
@Sharecash
seems like this to me:
$content = ‘Link‘;
//create some arbitrary HTML for the example
$dom = new DOMDocument();
//creates special DOM object
$dom->loadHTML($content);
//generates the DOM for the document $content
$xpath = new DomXPath($dom);
//creates special xpath object that interacts with the DOM object
//for some reason this is never used again in this script. idk why they put it in here.
$tag = $dom->getElementsByTagName(”a”);
//finds all occurrences of the ”a” tag in $content and stores as an array
$counter = $tag->length;
//gets the length of the array
for ($i = 0; $i item($i)->nodeValue;
//result = one individual ”a” tag (at index i in the array $tag)
$content = str_replace($result, ”.$result, $content);
//adding a google fav icon image in front of every ”a” tag in the array $tag
echo $tag->item($i)-> getAttribute(‘href’).”;
//print out all the URL’s of where the links go from each ”a” tag in $content
}
2011-06-01 @ 4:29 f m
I had a different problem, but your solution to your problem helped me a lot. Thank you.
2011-05-27 @ 7:16 e m
This piece of code is great. But if you have made significant revisions to the page (like changing the slug) it gets messed up and shows a slug such as domain/revision-8
2011-05-26 @ 9:25 e m
This plugin is not working in WP 3.1.2
2011-05-02 @ 9:43 f m
How failsafe is the function for the depth of category? I mean, because it depends on the ID. I have to make a website with more than a thousand categories: cat > subcats > subsubcats > posts.
2011-05-03 @ 10:32 f m
i think it.s more that ok , i just tested with your kind of depth , cat->subcat->subsubcat->posts and work super duper ok ! i allso used ”Collapsing Categories” plugin to get a nice list of categories in a widget
2011-04-30 @ 12:44 f m
This solved a problem for me – many thanks!
2011-04-27 @ 12:35 e m
i use this tutorial to make a cool confirmation,,,,,thanxxxx
2011-04-14 @ 6:00 e m
Would love it if someone would further explain this to me?
2011-04-13 @ 2:25 e m
Thanks for this post. It is very useful and time saver.