Tag: PHP
Calling a WordPress loop from inside a WordPress loop
Recently I came across a sitution whereby I wanted to call a list of WordPress posts from inside the body of another post, i.e., not coding it into a template, but embedding into the body of the post itself. Not a big drama
, I thought to myself: I already have the exec-php plugin installed to enable the execution of PHP from within WordPress posts, so all I needed to do was call the WordPress loop from the point inside the post where I wanted my list of links to appear, e.g.:
<ul>
<php $my_query = new WP_Query('cat=XX');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<php the_permalink(); ?>"><php the_title(); ?></php></a></li>
</php><php endwhile; ?>
</php></ul>
More on Calling a WordPress loop from inside a WordPress loop
Checking backlinks with Yahoo’s Site Explorer Inbound Links API
Recently I wanted to create a page that would list the backlinks to certain sites that I had chosen. Yahoo always seems to have the most comprehensive list of backlinks and luckily they also make available a series of APIs that enables you to access their data. Using the Site Explorer Inbound Links API, and an example of a script towards the bottom of that page, I was able to put together a script that closely mirrors the sort of results you would get if you entered a site’s URL into Yahoo’s Site Explorer.
More on Checking backlinks with Yahoo’s Site Explorer Inbound Links API





