The multipurpose website of Aaron & Katrina Herd

Displaying WordPress Pages Like Posts

Displaying WordPress Pages Like Posts

Sometimes, you just wish you could list your WP pages more like posts. I wanted not just a list of them, but with some kind of excerpt. Here’s how I did it:

<?php
$thePages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = ‘page’ ORDER BY menu_order", ‘OBJECT’);

if ( $thePages ) : foreach ( $thePages as $pageData ) : setup_postdata( $pageData );
?>

  <!– HTML markup goes here –>
  <h3><?php  echo "$pageData->post_title"; ?></h3>
  <p><?php  echo "$pageData->post_content"; ?></p>        
<?php endforeach; endif; ?>

Naturally, this custom loop is showing the whole page content, and not just a traditional excerpt. I wasn’t able to get excerpts to work, but the full content was just fine for what I was working on. It would not be terribly difficult to use the PHP strlen(); function to limit the post content and simulate an excerpt.

Posted under: Tech Solutions | No Comments »

Fixing “Cannot connect to printer error 0x0000007e”

Fixing “Cannot connect to printer error 0x0000007e”

Recently, we had some problems setting up some network printers on computers running 64-bit Vista. We could connect to the print server, but making connections to the individual printers gave us this error. Good times.

The workaround was to add the printer manually, as a local printer. To do this: Go to Control Panel > Printers > Add Printer. Then add a new local printer, using a local port. (Not TCP/IP.) For the name, put in the whole path. This will be something like: \\YourPrintServer\ThePrintersName

Now it will ask you about drivers. (Make sure you have downloaded the 64-bit drivers for your printer.) Choose Have Disk…, and browse to where you saved them. With luck, it will now ask you for what you want to call the printer on your local computer, and you’re done!

This fix worked for every computer we ran into this error for. Good luck!

Posted under: Tech Solutions | 3 Comments »

The Kingdom By The Sea

The Kingdom By The Sea

So, just got back from what was probably one of the best vacations in my life. I was 25 ft. away from real-life gray whales. I flew a 1942 WWII plane along a beach. It was incredible.

Though as awesome as that was, I believe my favorite part was spending an entire day on the beach building sand castles with my sweet, sweet wife. Here’s the short version:

The Kingdom By The Sea

Once upon a time, there was a small castle. The rulers were wise and industrious, and the tiny kingdom began to prosper. The castle soon became a very large fortress with several buildings on the inner court. The princess even had her own tower with bridges to other parts. But it didn’t stop there. A massive wall was constructed, as well as a temple and a city gate. But what would a castle be without a proper kingdom? Roads, highways, villages, churches, mid-, low-, and high-income housing districts were constructed. There were even lakeside shorefront properties and timeshares. Pretty much everything.

As the kingdom grew, it was necessary to build towers and inns along the roads to protect the people, as well as another fort on the western border. And all the while, the castle became larger and more beautiful. A large crab shell was mounted above the city gate as a symbol of the People of the Shell.

Their prophets foretold a coming doom by flood and waves, but no one believed them. They just kept on building and building. Our kingdom is too great too be destroyed, the rulers said. (Besides, the tide wasn’t going to come in for hours!)

It wasn’t until it was too late that the council decided to take action. (They had lost contact with the western kingdoms, and there were reports of massive, incoming waves of destruction.) So they built a giant wall and levy system around the entire kingdom to protect it from the water! And it worked! For a while, it directed the waves around the outside, and a feast was held in honor of the king!

But, as the sun began to set, our poor kingdom was slowly overcome by water, even as their engineers tried to reinforce the levies. The waves were just too much! A giant monster jellyfish even landed on top of the high income suburbs!

We were very proud of that castle, though. Even as we were forced to leave for our next destination before it got too late, its walls were still standing, even though the entire kingdom around it had been washed away.

Can you see why I adore my wife? I can. I’m going to remember that day for a very, very long time.

Posted under: awesomeness, stories | 2 Comments »

Best. Blog. Comment. Ever.

Best. Blog. Comment. Ever.

Not only is the story funny, the 2nd comment down may have changed my life forever. Check it out here:
ChefStack Automatic Pancake Machine Celebrates Gluttony

Posted under: awesomeness | 2 Comments »

Recording what you hear in Windows 7

Recording what you hear in Windows 7

At first glance, it may look like Microsoft disabled recording of internal—or “what you hear”—sounds in Windows 7. (At least, that’s what it looks like in the pre-release version.)

Worry not—they didn’t, and it’s a fairly quick fix.
Update: This assumes you’re using an on-board sound card, like a Realtek. This will very likely not work if you have a SoundBlaster, as that is a different kind of issue.

To enable it:
1. Right click on the speaker icon in the bottom right.
2. Choose Recording Devices
3. In the empty white space, right-click and choose Show Disabled Devices. You should see Stereo Mix appear in the list.
4. Right click on Stereo Mix and choose Enable.
5. Right click on Stereo Mix again, and choose Set as Default Device.

Now you can record anything you hear through your speakers. If you don’t have a program that can record audio, you can get a nice one called Audacity over here. (It’s free!)

Posted under: Tech Solutions | 25 Comments »

Auto-upgrade WordPress on 1and1

Auto-upgrade WordPress on 1and1

If you’re having troubles with WordPress’s automatic upgrade function (both the WP system and plugins), and your site is hosted by 1and1, try adding this to your .htaccess file (wherever your WP root folder is.)

AddType x-mapp-php5 .php

Worked like a charm for me!

Posted under: Tech Solutions | No Comments »
Page 3 of 3«123