• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

Links

How to direct new registered users to a page on your WordPress website without plugin

October 30, 2019 by admin Leave a Comment

When you have people register on your WordPress website you may want to redirect those new registered users to a page on your website. If you want to do that without a plugin you can then add this code to your functions.php file. You may want to backup your WordPress website before you make updates to it.

/**
 * Redirect registered users
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function do_registration_redirect(){
return home_url( '/done/' );
}
add_filter( 'registration_redirect', 'do_registration_redirect' );

You can then replace the /done/ with the page you want new registered users to go to. Now if that works for you it would direct new registered users to the page you list on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, Redirect, Users

How to find the id of one of the categories on the blog of your WordPress website

October 29, 2019 by admin Leave a Comment

On your WordPress website you may want to know the id number of one of the categories on the blog of your website. You may want to do something like remove one category from the blog on your front page and having that id number may help with that.

  1. From the WordPress admin left menu click on posts > categories
  2. Hover your mouse over the title of the category that you want the id for
  3. Look in the lower left corner of your internet browser
  4. You should see a url listed
  5. That url will likely look like https://yourdomain/wp-admin/term.php?taxonomy=category&tag_ID=# with more text in the link where the # is the category id

Now that you have that id number you can use that if needed in your code on there like in the post linked at the top of this post on here.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Categories, Links, WordPress Admin

How to find the WordPress id number of a post on your website

October 29, 2019 by admin Leave a Comment

On your WordPress website you may want to find out the id number of a post on your website. This post has information on one way to find out the id number of a page on your website on there.

  1. From the WordPress admin left menu click on posts
  2. Hover your mouse over the title of the post that you want the id for
  3. You may need to click to the next page until you find the post you want the id for
  4. Look in the lower left corner of your internet browser
  5. You should see a url listed
  6. That url will likely look like https://yourdomain/wp-admin/post.php?post=#&action=edit where the # is the id number of that post

Now that you have that id number for that post you can use that if needed in your code on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, WordPress Admin

How to find out the id number of a page on your WordPress website

October 29, 2019 by admin Leave a Comment

If you are using WordPress for your website you may have times that you need the id number for a page on your WordPress website. There is an easy way to find out the id number of a page on your website.

  1. From the WordPress admin left menu click on pages
  2. Hover your mouse over the title of the page that you want the id for
  3. Look in the lower left corner of your internet browser
  4. You should see a url listed
  5. That url will likely look like https://yourdomain/wp-admin/post.php?post=#&action=edit where the # is the id number of that page

That was easy right? Now that you have that id number you can use that if needed in your code on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, WordPress Admin

How to disable the WordPress Link Manager link-manager.php without a plugin

October 29, 2019 by admin Leave a Comment

On your WordPress website there is a tool that you may or may not see in your left admin menu titled Links. You may not want to have that tool on your website if you do not use something like that to manage lists of links on there. If that is from the WordPress link manager there is a way to disable it without using a plugin. You can then add this code to your functions.php file. You may want to backup your WordPress website before you make updates to it.

/**
 * Remove link manager
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
update_option( 'link_manager_enabled', 0 );

Now if that works for you it would remove the link manager page from the left menu in your WordPress admin on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, WordPress Admin

How to use the Pretty Links WordPress plugin to shorten or mask links like affiliate links

October 28, 2019 by admin Leave a Comment

If you use WordPress for your website you may use affiliate links or different links that you may want to shorten or mask with a domain link instead. One reason you may want to do this is if you have a link to a youtube video that you made for your website you may want the link to be yourdomain.com/youtube instead of youtube.com/linktext. We use the Pretty Links plugin for that on this website.

This post has information that may help you with using that plugin to shorten or mask links like affiliate links on WordPress on there. If you have not installed the pretty links plugin here is information on how to install the pretty links plugin on your website. You may want to make a backup of your website before you install or use plugins like this one on your website.

  1. From the WordPress Admin you can click on pretty links > add new in the left menu
  2. On that page you can then add the title for the link
  3. Then you can put in the type of redirection you want to use and 307 temporary is the default on it
  4. Then you can put in the target url which would be your affiliate link or the youtube link if like in the example at the top of this post
  5. Then you can use the pretty link field to type in text you want in the link like we typed in youtube in the example at the top of this post
  6. Then you can click on the copy to clipboard button to the right of the pretty link field to copy the link to use on your website
  7. Then you can put in notes if you want for it
  8. Then you can click on the update button to update the link on it.

Then you can use the shortened or masked link in a wordpress post or page on your website.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Affiliate Marketing, Links, Plugins, WordPress Admin

How to install the Pretty Links plugin for WordPress for affiliate links and link shortening and masking

October 28, 2019 by admin Leave a Comment

On your WordPress website you may use affiliate links or different links that you may want to shorten or mask with a domain link instead. For example if you have a link to a youtube video that you made for your website you may want the link to be yourdomain.com/youtube instead of youtube.com/linktext. There is a WordPress plugin that we use titled Pretty Links. This tutorial has information that may help you with installing that plugin to your website on there. You may want to make a backup of your website before you install plugins like this one.

  1. From the WordPress Admin you can click on plugins > add new in the left menu
  2. In the search bar at the top right you can type in pretty link in it
  3. That should then bring up a list of plugins with pretty links at the top of the list there
  4. You can then click the install now button
  5. Then you can click the activate button
  6. Then you can click on settings > pretty links in the left menu
  7. From that page you can look through the different settings you have available and run the pretty links tool if you want.

You can do settings on the plugin to have it shorten links or mask links when you want to.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tutorials Tagged With: Affiliate Marketing, Links, Plugins, WordPress Admin

How to redirect http to https in your WordPress website using your .htaccess file

October 26, 2019 by admin Leave a Comment

If you are using WordPress and have updated your website with a SSL to have https for the url instead of http you may want to have the website redirect http urls to https. That way it may help when people type in http urls to redirect them to the https url instead. You can put this code in your .htaccess file using FTP to do that.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

You should be very careful when you edit the htaccess file.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: .htaccess, FTP, HTTPS, Links, SSL

How to add WooCommerce Cart link to WordPress menu

May 4, 2016 by admin Leave a Comment

If you are using WooCommerce for an online store plugin for your WordPress site, you may want to add a link to the WooCommerce Cart to your WordPress menu. Just follow these steps below to add a Cart link to your WordPress menu that links to your WooCommerce Cart page.

  1. From WordPress Admin Menu, click on Appearance > Menu
  2. From here on left side of page, find pages box
  3. Click View All
  4. There should be a page listed for Cart
  5. Click check box next to Cart page and then click Add to Menu button
  6. Move Cart link to where you want it in the menu and be sure to hit Save Menu

There you go, you should now have a link to WooCommerce Cart page in your WordPress menu. Hope this helps with your WordPress problem, enjoy.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, Menus, Plugins, WooCommerce

How to move the WordPress breadcrumbs in StudioPress Genesis

November 6, 2015 by admin Leave a Comment

If you have breadcrumbs enabled in your StudioPress Genesis theme, you may want to move or reposition the WordPress breadcrumbs. Just add this WordPress Code Snippet to the functions.php file in your current WordPress theme in order to move the breadcrumbs to another location.
[Read more…] about How to move the WordPress breadcrumbs in StudioPress Genesis

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, Pagination, StudioPress Genesis, Templates

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com