Category Archives: Homeschool

How To Show/Hide WordPress Menus With Conditional Statements?

You can use each item of WordPress menus with your conditional statements. The plugin allows visibility features to all WordPress menus you manage from the dashboard’s appearance section. It allows you to display or hide menus based on conditional statements such as show/hide this menu if the page is a single page, if a user is logged in etc.

To start, first install and activate the If Menu plugin then visit your area Dashboard -> Appearance -> Menus page and select a menu from the ‘Select a menu to edit‘ drop box. [Read: How To Create & Manage WordPress Menus?]

Let’s say you want to add a ‘Login’ link in your navigation menu but you want to show it only to logged-out users (as it is of no use for logged-in users) then first add the custom login to your menu structure and tick ‘Enable Conditional Logic ‘ checkbox.

As you tick this option it starts showing a show/hide dropdown box with if conditional logic options as shown in the given screenshot. Now select a show or hide option and then choose your visibility conditions.

How To Use Conditional Statements With WordPress Menus?

In the above example, we have selected the hide option with the conditional statement ‘if a user is logged in’ to make the login button automatically disappear for all logged-in users. Alternatively, in the above-given case, we can also use the ‘show’ option for all ‘logged out’ users.

The plugin lets you set basic visibility rules such as the user is logged in, its user role, the page type (front page, archive page, search page single page or post), or the visitor device is mobile. It also offers a premium version with an advanced set of visibility rules such as the visitor’s location, visitor’s language, based on WooCommerce subscriptions or memberships, his WishList, and its subscription level.

How To Create & Manage Menus In WordPress?

In a website, menus are the set of content filter links typically placed horizontally at the top of a website to provide easy navigation. A Menu shows what you are offering on your website.

For example: If you are running a blog on recipes then you can use navigation for offering various dish types like separate menus for dishes, soups, desserts, fast foods, detox meals, etc. In this lesson, we will guide you to the WordPress menu system covering all its important parts so that you can create new menus and add them to specific locations.

Different themes provide you with different menu locations and by default most themes use the page links in navigation menu locations. The reason is generally users create a website with typical pages like About, Contact, and Home, and a blog page. Hence these pages are shown automatically in the menu bar.

But WordPress allows you to create custom menus containing links to pages, categories, and other specific links. So if you don’t want to display pages in a menu location then create menus and assign them to display on a menu location that your theme provides.

How To Create A WordPress Menu?

Step-1: Creating A New Menu

How To Create Menus In WordPress? 1

To create your first WordPress menu, log in to your WordPress admin area (yourdomain.com/wp-admin) then navigate to Appearance -> Menus page, click the create a new menu‘ link, give your menu a name (this is not visible on the front) and click ‘Create Menu‘ link.

Step 2: Adding Menu Items

How To Create Menus In WordPress? 2

After the menu is created, you can add menu items from the left column to the menu structure box. Example: For adding a custom link:

  1. Click ‘Links’ (on the left column)
  2. Type or paste the link
  3. Type link text
  4. Click the ‘Add to Menu‘ button.

Step 3: Creating Multilevel Menus

How To Create Menus In WordPress? 3

After creating navigation links, you can drag-drop to reorder them. You can make navigation go deep by adding submenus. To add a submenu, simply drag and place a menu item a little bit right to its parent as shown in the given screenshot.

Here are the steps to create sub-menus:

  1. Position your mouse over the ‘child’ menu item.
  2. While still holding your left mouse button, drag it to the right and release the mouse button.
  3. You can repeat these steps for each sub-menu item then click the Save Menu button visible in your Menu Editor.

Step 4: Set The Menu Location

How To Create Menus In WordPress?4

After the menu structure is created, assign it to a theme location. Scroll down to the ‘Menu Settings‘ section and choose a theme location.

[heading size=”17″]Step-5: See How It Looks[/heading]
How To Create Menus In WordPress? 5

Visit your website’s home and see what it looks like. Given screenshot shows the menu we have created in the top primary location of the Twenty Fourteen WordPress theme.

How To Manage Multiple Menus?

You can create several menus, and assign them to different locations. If you are using the default Twenty Fourteen then you can add a menu on the top of your website, and another menu in the left sidebar’s vertical menu location. WordPress also provides you a menu widget (in Appearance -> Widgets page) you can use for manually displaying any menu in your sidebar or footer widget area.

How To Create Menus In WordPress? 6

How To Create Menus In WordPress? 7

To manage your menus, menu items, their structure, and location, visit the Appearance -> Menus page and select a menu to edit. Another tab with the title ‘Manage Locations‘ allows you to manage menu locations in bulk.

How To Easily Add Keywords To Your Google Ads?

Google Ads keywords are specific words or phrases that advertisers use in their campaigns to target relevant search inquiries. These keywords are used for triggering ads when people search for similar terms on Google or its other related platforms. An effective keyword selection ensures that ads are shown to people interested in the advertised products or services.

There are different match types for keywords:

  • Broad match: Ads appear for related searches.
  • Phrase match: Ads appear for searches that include the keyword phrase.
  • Exact match: Ads appear only for precise searches of the keyword.

Optimizing keyword choice can improve ad relevance, reduce costs, and increase click-through rates (CTR).

Following are the steps for adding keywords to your advertisement campaign but before that read this article for creating Google Ads. You can add keywords while or after creating your advertisement.

  1. Open your Google Ads account.
  2. Click the ‘Campaigns’ icon.
  3. In the section, menu drop-down click the Audiences, keywords, and Content.
  4. Click the option ‘Search keywords’ and click the ‘+’ plus button.
  5. Search for your campaign by name or campaign ID in the “Select an ad group” window to select a campaign.
  6. Select the ad group where you want to add your keywords.
  7. You can add keywords by entering or pasting one per line.
  8. While selecting an ad group, you’ll see relevant keyword ideas. You can also enter a related website of your niche or a product similar to yours to see its keywords.
  9. Click the ‘+’ plus sign next to the keywords you want to add to your ad group.
  10. If necessary, you may modify match types after adding the keywords
  11. Click the ‘Save’ button.

You can also add keywords to videos and other display campaigns:

  1. In your Google Ads account, click the ‘Campaigns’ icon.
  2. Click the Audiences, keywords, and Content as we have done above.
  3. Click Content and then click the Display/Video keywords tab.
  4. Click the ‘+’ plus button.
  5. Search for your campaign by name or campaign ID in the “Select an ad group” window to select a campaign.
  6. Select the ad group where you want to assign the keywords.
  7. Add the keywords one per line as we have done above.
  8. Select either the ‘Audience’ or the ‘Content’ for your keyword setting
  9. Click the ‘Save’ button.

When you add good keywords to your Google Ads campaigns, several positive outcomes may occur:

  1. Improved Ad Relevance: Targeting appropriate keywords ensures your ads appear for searches relevant to your business.
  2. Higher Click-Through Rate (CTR): With well-chosen keywords, users are more likely to click on ads that match their intent.
  3. Better Quality Score: Google’s system rewards ad relevance, leading to lower costs per click and better ad positioning.
  4. Enhanced Conversion Rates: Reaching the right audience increases the chances of conversions.
  5. Reduce Ad Spend: Avoiding irrelevant clicks helps reduce ad spend.

Good keywords directly align your ads with potential customer searches, boosting ad performance across multiple metrics.

How To Create And Manage SRV Records Using cPanel?

An SRV (Service) record is a DNS record that defines the location of services on a domain, such as SIP (Session Initiation Protocol), XMPP (Extensible Messaging and Presence Protocol), or game servers. Unlike other DNS records like A records (which map domain names to IP addresses), SRV records help identify a service’s hostname, port, and priority on a domain, allowing different services to be hosted on separate servers.

An SRV record has the following components:

  • Service: The name of the service (e.g., _sip for SIP or _xmpp for XMPP).
  • Protocol: Either TCP (Transmission Control Protocol) or UDP (User Datagram Protocol), which defines the protocol used by the service.
  • Priority: Similar to MX records, the priority dictates which server should be used first when multiple are available (lower numbers represent higher priority).
  • Weight: Specifies the relative weight for records with the same priority. It helps in load balancing, where a higher weight means more traffic should be directed to that server.
  • Port: The port number through which the service is accessible (e.g., 5060 for SIP).
  • Target: The hostname of the server providing the service (e.g., server.example.com).

For instance, an SRV record might be used to define that a particular service (e.g., SIP) should be resolved to a specific hostname on a particular port, while also specifying which server should be tried first (via priority).

Why You Might Use an SRV Record

  1. VoIP (Voice over IP): SRV records are frequently used to direct voice traffic for services like SIP to the correct server.
  2. XMPP/Jabber: To direct instant messaging traffic via XMPP servers.
  3. Load Balancing: Distribute network traffic across multiple servers with the same priority and weight.
  4. Game Servers: To resolve different game servers to different addresses or ports.

How To Create An SRV Record On cPanel?

If you’re hosting your website or services with cPanel, you can easily create an SRV record to help route traffic to specific services on your domain.

Follow these steps to create an SRV record in cPanel:

Step-1 Log into cPanel

Access your cPanel control panel using your login credentials. Typically, the URL is yourdomain.com/cpanel.

Step-2 Go to the Zone Editor

Find and click on Zone Editor in the Domains section of the cPanel dashboard. This is where you manage DNS records for your domain.

Step-3 Select the Domain

Once you’re in the Zone Editor, you’ll see a list of your domains. Find the domain where you want to create the SRV record and click Manage.

Step-4 Add SRV Record

In the Manage section, click on + Add Record (usually near the top of the page). From the dropdown, select SRV Record.

Step-5 Fill in the SRV Record Details:

  • Service: Enter the name of the service, starting with an underscore (e.g., _sip or _xmpp).
  • Protocol: Enter the protocol, also with an underscore (e.g., _tcp or _udp).
  • Priority: Choose a priority number (e.g., 1 for the highest priority).
  • Weight: If you want load balancing between multiple servers, set a weight (e.g., 5). If you’re not load balancing, you can set this to 0.
  • Port: Enter the port number on which the service is hosted (e.g., 5060 for SIP).
  • Target: Enter the hostname of the server (e.g., sip.example.com) where the service is running.

Step-6 Set the Time-to-Live (TTL)

TTL determines how long the SRV record is cached. The default value is usually fine, but you can set it lower (e.g., 300 seconds) if you want updates to propagate quickly.

Step-7 Save the Record

Once you’ve filled in all the necessary details, click Save or Add Record to finalize the creation of your SRV record.

Step-8 Test Your SRV Record

After adding the SRV record, it may take a few minutes to propagate. You can test it using tools like DNS lookup services or the command line (e.g., nslookup for Windows or dig Linux/Mac).

Depending on the service you’re configuring (e.g., SIP server or XMPP), you may need to update the client or server settings to start using the new SRV record.

Finally, ensure the SRV record works correctly by monitoring the service traffic to the specified target and port. Double-check the values (especially protocol, port, and target) if there are issues.

    This way, you can efficiently create an SRV record for your domain in cPanel, ensuring your services are properly routed and functioning smoothly.

    How To Hide Dashboard Menu Items From Subsite Admins In WordPress?

    Do you want to hide some specific admin menu items from subsite administrators on your WordPress multisite network? Superadmins can selectively hide side admin menus and their sub-menus from the admins of other websites on a multisite network or from other users on the website.

    How To Hide WordPress Menus & Top-Bar Items?

    For a basic single-site WordPress installation, you may use the Hide Admin Menu plugin. Simply install and activate it, after activation visit the ‘Hide Menu’ item on your dashboard.

    Here it offers you checkbox options to show or hide the side admin menu as well as the top-bar items.  You simply need to select your options and click the ‘Update’ button.

    Admin also can hide menu according to the role of users.

    How To Hide WordPress Menus Network Wide?

    Another plugin called User Role Editor works both for single and multisite WordPress installations. Simply install and network activate it. Upon activation, navigate to Settings -> User Role Editor on your network admin dashboard.

    Select the ‘Administrator’ role, remove the capabilities that you want to remove, tick the “Apply to All Sites” option (so that it applies to all the sites on the network), and save your new settings.

    Now check the backend of any of your subsites and you will notice that the selected menu is no more there. Similarly, you can hide other menu pages as well. 

    How To Check The Health & Security Issues On Your WordPress Site?

    WordPress provides you with a tool that is essential for maintaining your website’s health. On your dashboard, the Tools -> Site Health section provides an overview of your site’s performance and security status. It helps ensure that your site runs optimally by checking for issues like outdated software, missing security features, or misconfigurations.

    1. Status: Lists critical and recommended improvements.
    2. Info: Provides detailed server and site information such as PHP version, themes, and plugins.
    3. Debugging: Helps identify potential problems.
    4. Performance: Suggests ways to improve loading speed.
    5. Security: Highlights areas to enhance security such as HTTPS, file permissions, etc.

    The page shows information about your WordPress configuration and items that may need your attention. On the top it shows critical issues that may have a high impact on the performance or security of your site, resolving these issues should be prioritized.

    It also recommends some improvements, these are basically the tasks that are considered beneficial to your site, although not as important to prioritize as a critical issue, they may include improvements to things such as the performance and user experience of your website.

    How To Quickly Start A Website On Your Domain Name?

    Here are the simple steps to register a domain name, subscribe to cPanel hosting, install WordPress, and manage your site on Sangkrit.net:

    1. Register Domain: Visit Sangkrit.net, search for your desired domain name, and complete the purchase.
    2. Subscribe to cPanel Hosting: Subscribe to a cPanel hosting plan during domain registration when the system prompts you to add hosting.
    3. Access Your Hosting: Navigate to your account’s ‘My Products’ section and click ‘Setup’ next to your hosting to enter your domain name. Next, click ‘Manage’ to access your hosting’s cPanel.
    4. Install WordPress via Installatron: On cPanel, navigate to Installatron, select WordPress, and install it.
    5. Manage Website from WordPress Admin: After WordPress installation, click the admin URL to access the admin dashboard and manage your website content.

    You can access your WordPress dashboard by visiting yourdomain.com/wp-admin, and logging in with the credentials you created during installation. From the WordPress admin area, you can customize your site, install themes, add plugins, and create content.

    How To Easily Create Responsive Google Ads?

    As we have discussed in one of our lessons you need to keep basic images of aspect ratio (square, landscape, and logo images) in hand before you start creating a responsive Google Ad.

    Apart from images, you will need:

    1. At least one short headline of 30 characters or fewer. This works as the first line of your ad.
    2. A long headline of 90 characters or fewer characters.
    3. At least one description. It is shown with the headline and asks people to take action.
    4. A business name which is simply the name of your business.
    5. A final URL. This is the website or the webpage where people will go after clicking on your ad. Don’t use any shorted or redirected URL here or your advertisement will be rejected.

    Once you have the images, business name, headlines, description, and URL simply follow these steps and you will easily create a responsive Google Ad of your choice.

    1. Open your Google Ads account and click the Campaigns icon.
    2. From the section menu, select the Campaigns drop-down.
    3. Click on Ads.
    4. Click the plus button.
    5. Choose a Responsive display ad.
    6. Select the appropriate ad group.
    7. Click Images to upload your images and Logos for logo images.
    8. Fill in the ad details, including multiple headlines and descriptions for the responsive ad.
    9. Preview the ad and click Save.

    Once you do that, your ad goes for a review by Google before it gets published online.

    How To Auto Redirect Old Permalinks To New Ones In WordPress?

    Changing WordPress default permalinks to a “Post Name” structure is crucial for better SEO, user experience, and readability. Default URLs in WordPress are often unattractive and not informative (e.g., ?p=123). By switching to post name permalinks, the URLs become more meaningful and descriptive (e.g., example.com/sample-post), which helps search engines understand the content better, leading to improved rankings.

    Additionally, this format is more user-friendly, making it easier for visitors to remember and share, enhancing your site’s visibility and accessibility. But the problem occurs when you switch to a new permalink structure (Dashboard -> Settings -> Permalinks), your old links archived by search engines or shared on social media become a broken link to your website.

    In this lesson, you will learn about auto-redirecting old permalinks to new ones. You can simply change your default WordPress permalinks, switch to SEO-friendly post-name permalinks, and then automatically redirect old permalinks to new ones in one click with the help of a plugin.

    WP Permalink Redirect is a WordPress plugin that automatically process permalink redirection on your website. All you have to do is install-activate it and that’s all. The plugin has no configuration page, it immediately starts to work upon activation.

    Upon activation, the plugin also removes duplicated content issues and redirects your visitors to the new permalink using a 301 i.e. permanently redirect status code. You can even confirm its working with Google webmaster tools. It also takes good care of website pagination of taxonomies like categories and blog lists to allow them to work normally on your WordPress site.

    What Image Ratio & Dimensions Work For Google Ads?

    In this lesson, you will get the easiest information on image ratio and sizes so that you can create your first Responsive Google Ad without any hassles.

    To make a Google Ad you will need a minimum of three images:

    1. At least One Square Image of Ratio 1:1 – Maximum of 600 x 600 pixels and Minimum of 300 x 300 pixels
    2. At least One Rectangular (Landscape) Image of Ration 1.91:1 – Maximum of 1200 x 628 pixels and Minimum of 600 x 314 pixels
    3. At least One Logo Image of Ratio 1:1 – Maximum of 1200 x 1200 pixels and Minimum of 128 x 128 pixels or 4:1 – Maximum of 1200 x 300 pixels and Minimum of 512 x 128 pixels

    The maximum file size for all images for Google Ads is 5120 KB, and they should be in GIF, JPG, or PNG file types. If your images are heavy then you can minify them online using some free service like Adobe Image Resize, which lets you both resize i.e. scale the image or minify it.

    So first create some square, landscape, and logo images for your Google Ads, and then you will be able to create your first advertisement by following these steps:

    1. Open your Google Ads account and click the Campaigns icon.
    2. From the section menu, select the Campaigns drop-down.
    3. Click on Ads.
    4. Click the plus button.
    5. Choose a Responsive display ad.
    6. Select the appropriate ad group.
    7. Click Images to upload your images and Logos for logo images.
    8. Fill in the ad details, including multiple headlines and descriptions for the responsive ad.
    9. Preview the ad and click Save.

    Once you do that, your ad goes for the review.

    How To Remove The Tag Base From WordPress Permalinks?

    You can remove the base tag slug in the WordPress permalinks structure. Earlier this was done with the help of a plugin or PHP function but now you can do it from your admin area dashboard.

    By default the tag URL on WordPress looks something like this – yourdomain.com/tag/tag-name, now we have to remove the tag from the permalink so that URLs should look something like this yourdomain.com/tag-name/.

    These steps allow you to remove the tag prefix completely by modifying your site’s permanent link settings.

    1. Navigate to your WordPress dashboard
    2. Navigate to Settings -> Permalinks page
    3. Scroll to Custom Structure and put ‘/%tag%/%postname%/’.
    4. Go to Tag Base and type in a dot “. “
    5. Save your changes.

    The tag prefix is removed by typing the dot in the tag base field. It completely removes the mandatory tag base from the tag permalinks, so the tag name comes right after your domain name in the permalink structure.

    By default, this field is left blank which represents the default prefix.

    How To Remove The Category Base From WordPress Permalinks?

    You can remove the base category slug in the WordPress permalinks structure. Earlier this was done with the help of a plugin or PHP function but now you can do it from your admin area dashboard.

    By default the category URL on WordPress looks something like this – yourdomain.com/category/category-name, now we have to remove the category from the permalink so that URLs should look something like this yourdomain.com/category-name/.

    These steps allow you to remove the category prefix completely by modifying your site’s permanent link settings.

    1. Navigate to your WordPress dashboard
    2. Navigate to Settings -> Permalinks page
    3. Scroll to Custom Structure and put ‘/%category%/%postname%/’.
    4. Go to Category Base and type in a dot “. “
    5. Save your changes.

    The category prefix is removed by typing the dot in the category base field. It completely removes the mandatory category base from the category permalinks, so the category name comes right after your domain name in the permalink structure.

    By default, this field is left blank which represents the default prefix.

    Alternatively, you may add the following rule in .htaccess file present in the root directory of your website :

    RewriteRule ^category/(.+)$ https://www.yoursite.com/$1 [R=301,L]

    This also removed the category base, don’t forget to replace yoursite.com with your domain. The same can be done with the help of the Yoast SEO plugin. If you are using it on your website simply navigate to Yoast SEO -> Search Appearance and open the ‘Taxonomies’ tab.

    Scroll to the Category URLs, select ‘Remove the categories prefix’, and save the changes.

    How To Display Outdated Content Alerts With Old Post Notice In WordPress?

    The Old Post Notice plugin is a valuable tool for WordPress users managing blogs with large archives. It helps notify visitors when viewing older posts that might contain outdated information. This feature can significantly enhance the user experience, ensuring readers are aware that the content they’re consuming may no longer be current, which is especially important for tech, news, or product blogs that update frequently.

    The plugin offers several features that provide flexibility and control over how notices appear on older posts:

    1. Customizable Notices: You can set your own notice text to inform users about a post’s potential outdatedness. This customization includes options for color schemes (background and text) and where the notice appears—above or below the content.
    2. Post Age Settings: You decide how many days old a post should be before the notice is triggered. This allows you to target only significantly older posts while keeping recent articles clear of notices.
    3. Published vs. Modified Date: The plugin lets you choose whether the notice is based on the post’s original publish date or the last modified date. This is useful if you frequently update older posts with fresh information.
    4. Built-in and Custom Styling: It includes a default styling option, but advanced users can disable it to apply their custom CSS.
    5. Control Over Activation: You can easily enable or disable the notice without losing your settings.

    How to Use Old Post Notice Plugin?

    Once you install and activate the Old Post Notice plugin, follow the given steps of configuration:

    Step-1 Navigate to Settings -> Old Post Notice in your WordPress dashboard.

    Step-2 Enable the notice by ticking the option. You may customize the notice text, choose the number of days to trigger the notice, and decide whether it’s based on the post’s published or modified date.

    Step-3 Adjust the styling options, such as the background and text colors, or apply custom CSS if desired. Then save your changes.

      The notice will automatically display on all posts that meet the given age criteria.

      The plugin lets you keep your blog relevant and transparent, ensuring that your readers are informed about older content. This adds credibility to your site and helps manage user expectations.

      How To Set External Links To Open In A New Tab In WordPress?

      It is easy to link a word and set its target to blank so that it opens in a new tab. Most website owners want to make all external links open in a new window and all internal links open in the same tab, you can make this thing easy and automatic with the help of a plugin.

      Simply install and activate Open external links in a new window on your WordPress site. Once the plugin is activated, navigate to your admin area dashboard Settings -> External Links page.

      By default, the plugin makes all external links open in a new tab but on its settings page, you can type URLs that should either be forced to open in a new window or ignored. Some of the basic features of this plugin include:

      1. It opens up all (or specific) external links in a new window
      2. It produces XHTML Strict compliant and is search engine optimized (SEO)
      3. It can can open external links starting with http:// or https:// in a separate browser window or tab
      4. It handles the links client-side, which lets search engines follow the links properly
      5. It becomes inactive when a browser does not support JavaScript, and hence doesn’t result any errors

      If you need more advanced features, there is another free plugin called WP External Links. This plugin lets you manage all external and internal links on your website by enabling you to control icons, nofollow, no opener, UGC (User Generated Content), sponsored, and yes if links open in a new window or new tab.

      How To Make All Links (Internal & External) Open In New Tab In WordPress?

      You can set all links (internal and external) on your WordPress website to open in a new tab.

      By default all WordPress links open in the same tab, although there is an option in the links box to set specific links to open in a new tab, you can do that while adding a new link in your post or page content. But to make all the links open in a new browser tab, you simply need to add a few lines of JavaScript code to your website which can be done by activating the following plugin.

      The WordPress plugin Open Links In New Tab automatically sets links to open in a new tab. You simply need to install and activate it on your website and that’s all. The plugin provides you an option if you want to set only external links to open in a new tab, or just internal links in a new tab, or both.

      This plugin works by adding a few JavaScript code lines on your website, it doesn’t depend on any external library and doesn’t even require jQuery, which is the most common JavaScript library.

      How To Open WordPress Navigation Menu Links In A New Tab?

      The navigation menu links are the links you display in your website’s menu bar. Managing WordPress menus is easy, its default interface allows you to add menu items from various filters of your website, rearrange them with drag and drop interface, and set their navigation label and title attribute.

      However, some advanced options can be enabled from the ‘Screen Options’ tab present in the top right corner of the menu admin screen. In this lesson, you will see how to make some menu links to open in a new tab.

      Visit your WordPress admin area dashboard and navigate to Appearance -> Menus page. Now click the ‘Screen Options‘ tab and tick ‘Link Target‘ option visible in the ‘Show advanced menu properties’ section.

      This adds a new checkbox ‘ Open link in a new window/tab‘ option on each menu link added to your menu structure. Now all you need to do is tick that option on links that you want to open in a new tab.

      Click Save Menu to apply the updates. This will ensure the selected menu links open in a new tab.

      How To Open Navigation Menu Links In New Tab (Using Block Editor)?

      To open navigation menu links in a new tab in block themes in WordPress, follow these steps:

      1. Navigate to Appearance -> Themes to use the full site editor.
      2. Click on the header section, then select the Navigation Block where the menu is located.
      3. Use the ‘+’ icon to add a link or edit an existing one.
      4. Toggle the option for ‘Open in new tab’ to ON.
      5. Save your changes by clicking the ‘Submit‘ button and then ‘Save’ button at the top.

      You can also open all external links on your website automatically in a new tab or window with the help of a plugin. You will learn about it in the next lesson.

      How To Find & Remove Broken Links In WordPress?

      Broken Link Checker is a popular WordPress plugin that lets you identify and fix broken links on your website. A broken link, also known as a dead link, can negatively impact both user experience and SEO rankings. This plugin scans your website content—posts, pages, comments, etc to detect any non-working URLs, images, or embedded media like YouTube videos that may have been removed or relocated.

      To start removing broken links using the Broken Link Checker plugin on your WordPress site, simply follow these steps:

      1. Install & Activate the Plugin: Install Broken Link Checker from the Plugins -> Add New page and activate it.
      2. Scan for Broken Links: The plugin will automatically begin scanning your site for broken links. You can monitor the scan in your WordPress dashboard under the Link Checker page.
      3. Fix or Remove Links: Once broken links are detected, go to the Broken Links page. You can either: Update the broken link, remove it, or dismiss that it’s not an issue.
      4. Bulk Actions: The plugin allows you to fix multiple links at once using bulk actions for faster management.

      By following these steps, you can keep your WordPress site free from broken links, ensuring a better user experience and preserving SEO rankings.

      The plugin does real-time monitoring and also sends you email as it finds any dead links on your website. You can fix or remove the link from the plugin’s interface.

      How To Add Product Videos In WordPress WooCommerce Website?

      You can add videos to describe or promote your products at your WordPress eCommerce store. This enhances the shopping experience and helps showcase product features effectively.

      Woocommerce allows anyone to build an online shop without technical skills. All you have to do is register your domain name, subscribe WordPress, and install the WooCommerce plugin. Then you can manage your website from its admin interface.

      This lesson will guide you on adding single or multiple videos on any product to its linked featured image or product gallery.

      WPC Product Videos for WooCommerce

      To start you will need to install-activate a WordPress plugin called WPC Product Videos for WooCommerce. Upon activation, open the product you want the video to be added or you can do this while adding a new product.

      The product admin page will show you a newly added field for the video URL, this is next below the featured image section. Simply paste your video URL there and update or publish your product. It boosts product presentation and can improve conversions.

      The plugin works for YouTube and Vimeo videos. Alternatively, you can upload your video from your WordPress Media Library and use then its URL.

      Product Video Gallery for WooCommerce

      Product Video Gallery for WooCommerce is another plugin that allows you to enhance product pages by adding videos to the product gallery. It supports various video formats like YouTube, Vimeo, or self-hosted videos, making it easy for you to display your product through engaging visuals.

      Simply install and activate it on your website and then navigate to Products -> WC Product Video, now tick the checkbox to configure a setting, and then save your changes. The plugin usage is quite simple, to add a video to your product: open the edit product page and insert your product YouTube video URL in {Product Video Url} field. That’s it.

      This plugin lets users upload multiple videos alongside product images, creating a dynamic gallery. It also integrates smoothly with WooCommerce themes, providing a more interactive shopping experience for customers.

      How To Clean Unnecessary Tables From MySQL Database?

      Cleaning unnecessary database tables means deleting tables that were created before by some plugin and now are not in use on your website. Removing such tables lightens up your MySQL database. In this lesson, you will learn about cleaning up a database manually and with plugins’ help.

      Before making any changes, always ensure and be careful when deleting database tables, as removing the wrong ones can break your WordPress site. Always keep a full WordPress database backup.

      Step-1, access your hosting’s cPanel and locate the phpMyAdmin option under the Databases section. Click on it to access the database management interface.

      Step-2 In phpMyAdmin, find your WordPress database on the left-hand side panel. Click on the name of the database to view the tables it contains.

      Step-3 Now identify unnecessary tables. Unnecessary tables might come from uninstalled plugins or themes. Tables that don’t seem to match the standard WordPress table names like wp_posts, wp_users, or wp_options may be safe to delete. Some tables have a prefix based on the name of a plugin (e.g., wp_woocommerce_* for WooCommerce).

      Step-4 Once you identify the tables you no longer need, select them by checking the box next to each table. Then, scroll down and choose Drop from the options in the dropdown menu. Confirm the deletion.

      Automatically Identify & Clean MySQL Database Tables

      Alternatively, You can clean your database with a plugin. Plugins such as WP-Optimize or Advanced Database Cleaner let you automatically identify and clean up unnecessary tables without manually going into phpMyAdmin.

      These WordPress plugins provide you with an easy way to clean up unnecessary database tables from your WordPress site.

      What Are the Standard WordPress Database Tables? A Breakdown Of Core WP Tables

      A standard WordPress installation creates a set of database tables that store various types of data, such as posts, users, comments, and settings. Apart from this plugins create their tables and some themes may also do that, but deactivating such plugins and themes leaves their tables on your website clattering your database.

      In this lesson, you will learn about the main 12 standard WordPress database tables so that whenever you like to clean up your database you don’t disturb the core tables that are the life-line of your WordPress site.

      1. wp_posts – Stores all content types like posts, pages, revisions, and custom post types.
      2. wp_postmeta – Contains metadata (custom fields) for posts, such as additional information like SEO settings or image data.
      3. wp_users – Holds information about all registered users, including username, password, email, and user roles.
      4. wp_usermeta – Stores additional metadata about users, such as permissions, preferences, and profile information.
      5. wp_options – Contains various site-wide settings such as the site URL, admin email, time zone, and installed plugins.
      6. wp_terms – Stores the categories, tags, or any custom taxonomies used to classify content.
      7. wp_term_taxonomy – Describes the taxonomy (e.g., category, tag) for each term from the wp_terms table.
      8. wp_term_relationships – Links posts, pages, or custom post types to their respective terms (categories, tags).
      9. wp_comments – Stores comments on posts and pages, including comment content, user details, and approval status.
      10. wp_commentmeta – Contains metadata about comments, such as IP addresses, ratings, or spam status.
      11. wp_links – Used to manage the blogroll feature, which is now deprecated but still exists in older versions.
      12. wp_actionscheduler_actions (optional in newer WordPress versions) This is used to store scheduled actions or cron jobs, commonly created by WooCommerce and other plugins.

      Each table uses a default prefix of wp_.

      While installing WordPress manually on your hosting account, a step asks you to enter the database name, database username, database user password, and host and the last field asks for the table prefix which by default is wp_.

      This wp_ is the table prefix. this can be changed during installation to enhance security (e.g., mywebsite_) and it also lets you host multiple websites on a single database.

      To change the table prefix while installing WordPress using Installatron, in the “Advanced Settings” section, you’ll find an option for “Table Prefix.” By default, the table prefix is set to wp_, but you can modify this to a unique prefix, such as mywebsite_ or any combination of letters and numbers for added security.

      After entering your desired prefix, continue with the installation process as usual. This change helps secure your site by preventing common SQL injection attacks that target the default table prefix.

      How To Run Multiple Websites In One Database?

      Some low-cost hosting options offer you one or a limited amount of MySQL databases. But do you know that you can run multiple websites in one database, and all websites will work independently without affecting the content and logins of other websites running on the same database.

      You can also install different CMS or applications on the same database. For instance, WordPress and MediaWiki can run on a single database without affecting each other.

      Running multiple websites in a single database is possible by using table prefixes or customizing your database structure. Here’s how you can set it up, especially if you are using a CMS like WordPress.

      While installing WordPress manually on your hosting account, a step asks you to enter the database name, database username, database user password, and host and the last field asks for the table prefix which by default is wp_. This wp_ is the table prefix.

      So all you have to do instead of using wp_ you have to use a different table prefix for every new website on your database.

      For example,

      When you install a CMS like WordPress, you can specify a table prefix during installation. If you want to run multiple websites in one database, use different table prefixes for each website. For example:

      • Website 1: wp1_
      • Website 2: wp2_

      This way, the tables for each website will be separated within the same database.

      For easy remembrance you can use wp1_ , wp2_, wp3_, wp4_ and so on. Not only WordPress but you can install any CMS by using a different unique for each website you install on your database.

      For non-CMS-based websites, you can manually create separate tables for each website within the same database.

      For example, you can create tables for:

      • website1_users
      • website2_users
      • website1_posts
      • website2_posts

      Alternatively, installing a WordPress multisite network is an advanced way of making multiple WordPress sites on the same database. Its main advantage is that you don’t have to install WordPress separately for every new website you create.

      Simply add the following line to your wp-config.php file:

      define( ‘WP_ALLOW_MULTISITE’, true );

      Now log in to your WordPress dashboard and navigate to Tools -> Network Setup to configure it.

      By implementing these methods, you can efficiently run multiple websites in one database without needing separate databases for each.