Tagged with " wordpress"

Free WordPress Plugin: Correct My Headings

Apr 10, 2012 by     No Comments    Posted under: archives

Type “correct my headings” and click the “Search Plugins” button in your WP Dashboard or download this plugin from the WordPress Plugin Directory.

If your subheadings appear on archive pages, they need to start from H3 (because H2 tags are used by the post titles on archive pages). This plugin dynamically corrects subheadings before they are displayed on your site — for SEO and semantic markup purposes. Depending on how you use headings in the text of your posts (you could have them starting from the H2 level or from the H3level) you will have a couple of options to choose from in the plugin’s settings page.

Options page

This plugin does not make any changes to your database: the subheadings will only be displayed differently on the front-end site. If you disable the plugin or decide to uninstall it everything will turn back to normal.

To install it type “correct my headings” and click the “Search Plugins” button in your WP Dashboard or download this plugin from the WordPress Plugin Directory.

If you have any questions or suggestions, please leave them in the comment section below.

Password protected area in WordPress

Apr 2, 2012 by     No Comments    Posted under: archives

If you ever need to set up a simple password protected section under WordPress, these snippets and plugins might come in handy when you’re hacking through your theme.

I believe this would be the logical approach: you create a main password protected page for your private section and then you create a bunch of child pages under that page. This way you’ll be using native WordPress functionality (page organization and page visibility) for most of your private section.

But you may find that a couple of patches will be in order.

WordPress Plugins

FT Password Protect Children Pages

One thing you will not want will be to have to password protect each subpage individually. You’ll just want to set a password for the main parent page and have all its child pages inherit the password protection. This plugin does exactly that.

Page Template Extended

Similarly, if you decide to use a specific page template for the protected section, it would be ideal to just set the page template to the main parent page and not have to worry about setting it for each of its child pages. This plugin makes subpages inherit their parents template.

Logout Password Protected Posts

You’ll also need a log out link that WordPress doesn’t provide by default. After installing this plugin you’ll be able to use <?php do_action(‘posts_logout_link’); ?> anywhere in your WordPress theme to produce the log out link.

Listing the subpages

Use this code in your theme to display the main parent page as a heading and the child pages below it.

If you’ve created a page template for your protected pages, you can use the code above in it to give your users a navigation between the subpages.

A couple of snippets for functions.php

Change the default password protected text

The default text on password protected posts or pages is This post is password protected. To view it please enter your password below. Should you wish to change this text, add the following code to your theme’s functions.php file:

Change the part where it says “This is my custom text…” in the code above.

Remember: never edit WordPress core files. Either use a plugin or use the functions.php file and filter your changes in from there.

Remove the word “Private:” from the titles

By default the titles of the password protected pages are preceded by the word “Private:” (followed by a colon). To prevent this from happening, add the following filter to your theme’s functions.php file:

Protected: Don’t let the image resizer crash your server

Mar 29, 2012 by     Enter your password to view comments.    Posted under: archives

This post is password protected. To view it please enter your password below:


Exclude trackbacks from recent comments listing

Sep 30, 2008 by     8 Comments    Posted under: archives

To spare some time I tryed googleing for don’t show trackbacks in recent comments but wasn’t able to find anything relevant at first glance.

So, if you have the FreePress Recent Comments Widget and the long site titles from the trackbacks/pingbacks are breaking your design, here’s your quick tip from VileWorks:

  • go to Dasboard \ Plugins \ Recent Comments (edit)
  • find this line (line 234 in recentCommentsWidget.php):
    $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $limit";
  • change it to:
    $request .= "AND comment_approved = '1' AND comment_type <> 'trackback' AND comment_type <> 'pingback' ORDER BY comment_ID DESC LIMIT $limit";

(more…)