Category: WordPress

How to import posts from one WordPress site to another

Here’s a quick and easy way to copy posts from one site to another using the built-in Tools on your WordPress dashboard. In this example I am importing WordPress posts from SiteA to SiteB (both are self-hosted WordPress sites).

1. Login to SiteA. Select TOOLS_EXPORT (You may be asked to install the plugin. Do it.), choose the content to export. Download Export File.

Tools_Export
Tools_Export

2. Login to SiteB. Select TOOLS_IMPORT. Select to import from WordPress. If you haven’t done this before, you will be prompted to download the import plugin. Do it. Select the file (the one you just downloaded from SiteA).

Tools_Import
Tools_Import
If asked, download the plugin...
If asked, download the plugin…
Change author, import attachments...
Change author, import attachments…

3. Done.

Notes:
I selected “Import attachments” thinking that images associated with my posts would be moved to the new site — didn’t happen.

Embedded images do appear in posts, but they source from their original URLs. So, if I remove the images from SiteA, I will need to move them to SiteB and re-embed them manually.

Click-able images still point to their original locations.

Share this:

How to Remove the Password Reset – Found it!

So glad to find this! Just copy the code, create the plugin, activate and no more “reset password”!

By default, WordPress allows every user to change/reset their passwords. This is a great option, but in some cases you do not want to have this option available for all user levels. In this article, we will share our story on why we need this functionality, and we will also show you how to remove the ability for non-admin users to change/reset their passwords in WordPress.

via How to Remove the Password Reset / Change option from WordPress.

Share this:

How to not show the author name on a WordPress blog

Here, the Network 1.4 by EugeneO theme has an option for showing the author name.

Maybe you don’t want your username showing up on your blog posts?

By default most WordPress themes automatically include the date and author name for all posts. Most of the time your “author name” is your username.

Some themes will let you select whether to show the author name on posts…

OPTION 1

If your theme does not have this option, you can remove the author name with this edit to your index.php file. Remove this line of code from your index.php, single.php, etc…

<p>by <?php the_author(); ?></p>

 

OPTION 2

nickname
Add a new nickname, then select it in the pull-down menu.

If you would rather not fiddle with php code, there is another way to alter the author name on posts.

1. In the “Users” section of your Dashboard select the author you would like to alter. My user name is MBenny (my author name is also MBenny), but I would rather people saw me as “Mike”.

2. Change the “Nickname” to the name you would like people to see on your posts. I changed mine to “Mike”. (Caution: Do not change the User name, the first name or the last name — just the Nickname.)

3. Underneath that field pull down the “Display name publicly as…” and select the new name.

4. Now, all of your post will include your new “altered” name.

To hide your name completely, change your Nickname to the name of your blog or use a dash, hyphen or other character.

I hope this works for you. Comment below if so…

 





Share this:

How to remove the date from WordPress posts

Found it!!

From John Lamansky WordPress Expert site

How to Remove Dates from WordPress Posts

If your content is not time-oriented (such as when using WordPress in non-blog contexts), you may wish to remove the publication date from your posts since this information is not relevant and can give the impression that your older content is outdated.

1. The Manual Method

The “proper” way to do this would be to edit your theme and remove the code that displays the post dates.

  1. Backup your theme, just in case
  2. Go to “Appearance > Editor” and repeat the following steps for each of your theme’s PHP files
  3. Look for these function calls in your theme’s code: the_date(), echo get_the_date(), the_modified_date(), and the_time()
  4. Surround the function calls with PHP comment markers (/* and */); here are some examples:
    <?php /*the_date();*/ ?>
    <?php /*the_date('F j, Y');*/ ?>
    <?php /*echo get_the_date();*/ ?>
    <?php /*the_modified_date();*/ ?>
    <?php /*the_modified_date('', 'Last modified ');*/ ?>
    <?php /*the_time( get_option('date_format') );*/ ?>
  5. You may want to remove other text surrounding the function call. For example, if your theme has this code…
    <div>Published on <?php the_time( get_option('date_format') ); ?></div>

    …and you replace it with this…

    <div>Published on <?php /*the_time( get_option('date_format') );*/ ?></div>

    …your theme will output “Published on,” but not the date. Deleting “Published on” from your theme file will remove it from your site. Just be aware that you may have to remove text like this from your theme files to get a clean-looking result.

  6. Click “Update File”

 

Honestly #1 just looks like too much effort. I prefer the idea of just messing up one file, so I select choice #2 (below)…

 

2. The Automatic Method

If you’re looking for a quick fix, just go to “Appearance > Editor” in your WordPress admin and add this code to the top of your theme’s functions.php file:

function jl_remove_post_dates() {
	add_filter('the_date', '__return_false');
	add_filter('the_time', '__return_false');
	add_filter('the_modified_date', '__return_false');
} add_action('loop_start', 'jl_remove_post_dates');

(Note: This method requires WordPress 3.0 or above)

Now check your site and verify that the post dates are gone. If they’re not, try replacing the code above with this more “aggressive” version:

function jl_remove_post_dates() {
	add_filter('the_date', '__return_false');
	add_filter('the_time', '__return_false');
	add_filter('the_modified_date', '__return_false');
	add_filter('get_the_date', '__return_false');
	add_filter('get_the_time', '__return_false');
	add_filter('get_the_modified_date', '__return_false');
} add_action('loop_start', 'jl_remove_post_dates');

The first (less aggressive) fix worked for me! Thank you John!

I see you haven’t posted anything new on your site since 2011, I hope all is well with you.

Thank you

Share this:

Better search results for your #WordPress site

Highlighted search results
Highlighted search results

I found a great way to get improved search results on your WordPress site!

This plugin allows you to select which areas of your blog are searched and allows you to highlight the search results on your search results page (without editing your search.php file).

Just…

  • Download the plugin or Search for “Search Everything” in PLUGINS _ ADD NEW
  • Activate the plugin
  • Set your preferences in SETTINGS _ SEARCH EVERYTHING

No need to replace or edit any code. It just takes over from the default WordPress search widget function.

WordPress › Search Everything « WordPress Plugins.

Share this:

Pagination for WordPress posts!

Add pagination
Screenshot to show placement of the code

I’ve been digging around for a not-too-technical way to paginate single WP blog posts (ie: Next post ~ Previous post). Found it!

By adding the red line of code to the single.php file  just below the the “posts” line, I now have simple pagination above any single post on my blog. The single.php file is located in your theme directory. [Appearance / Themes / Editor]

The pagination only shows up when you are viewing a single post (single.php), which comes in handy if someone goes directly to a blog post via a search result or Tweet.

Here’s the code…

<p><?php previous_post('%', 'Previous:', 'no'); ?>
| <?php next_post('%', 'Next:', 'no'); ?></p>

fyi, the ‘no’ is saying do not show the title of the next or previous post. Change it to ‘yes’ to show the post titles and see if it works for you. Also, you can remove or change “|” to anything else you want to use as a separator.

fyi, I am using WordPress 3.3.1 / zeeBizzCard theme.

Let me know if you have any success with this.

 

Share this: