One place for hosting & domains

      How to Set Up Your WordPress Menus (In 3 Steps)


      Your WordPress menus are important elements. They provide the fastest way for your users to find your content and navigate your site. Consequently, using poorly organized or unwieldy menus can be detrimental to your UX and, in turn, damage your search engine rankings.

      Fortunately, WordPress includes a menu editing system that’s easy for all users to grasp. For instance, you can select the location of your menu and the pages you want to display. The location can vary depending on your theme, although most WordPress themes include several options.

      An Introduction to WordPress Menus (And Why You Need Them)

      Menus are navigational tools that enable your users to find content on your site. This makes them essential to your site’s overall organization and user experience:

      dropdown menu

      For example, if a reader discovers your site through a search engine, they may not always land on your home page. To learn more about your site, they will need to know how to explore your other content. Out of habit, they will look for your menus to get a feel for what else there is to explore.

      WordPress menus can improve your site’s Search Engine Optimization (SEO). Search engines reward relevant content, so making sure your menus are clear can help increase your rankings.

      There are a few other ways that menus can boost your SEO, such as:

      • Improved UX: If your readers have a pleasant UX, they are likely to spend more time on your site. This means lower bounce rates for you.
      • Sitelinks for Search Engine Results Pages (SERPS): Search engines results will display the main page and links to internal pages if the site and its navigation are well organized.
      • Easier crawling by search engines: Search engines use bots to crawl through your site and index your pages. Having well-organized navigation that clearly shows what content is available for each menu topic makes it easier for bots to find and index your content.

      The key is to have well-organized menus in a prominent location. While the perks of better SEO are awesome, menus also make it easy for your readers to find the content you’ve crafted for them.

      How to Set Up Your WordPress Menus (In 3 Steps)

      In WordPress, menus are an inherent element. Additionally, many themes come with predefined menus and locations.

      However, it is also important for you to understand the best way to incorporate menus on your site. We recommend you create a sitemap (or at least a navigational strategy) before you start adding menus to your site.

      Step 1: Create a New Menu in WordPress

      Once you’ve made a navigational plan or sitemap, you’re ready to create your menus. Within WordPress, navigate to Appearance > Customize, then click on Menus:

      WordPress menu

      If you don’t have a menu set up yet, you can simply select Create New Menu to get started. You’ll be given the option to name your menu and choose where it will appear:

      create a new menu in WordPress

      Keep in mind that the locations for your menu will vary depending on your theme. When you’ve made your choices, click on Next and select the Add Items button. Now, it’s time to start building your menu!

      Step 2: Add Your Navigation Items

      For each new menu you add to WordPress, you’ll be able to include any of your pages, posts, and other content. You’ll see each of your site’s elements separated into various sections, and they’re all selectable. Just click on an item to add it to your menu:

      adding new pages to your WordPress menu

      Once selected, you’ll see the item show up in the left-hand column. If you make a mistake, you can select the red X icon to delete an entry. You can even create new content here and immediately add it to your menu. For example, to add a new page, you simply need to type a name for it in the box at the bottom of the Pages section, then select the Add button.

      As you add items, you should see them appear on your site in the preview panel. This useful feature lets you see what your menu looks like as you’re building it. Once you’ve selected everything you want to include in your menu, it’s time to start organizing it.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      Step 3: Organize Your Menu’s Structure

      This is arguably the easiest part of setting up your WordPress menus. Organizing your menu items is as simple as dragging and dropping them into place.

      To do so, hover over any menu item you’ve added. You’ll see your cursor turn into a crosshair. From here, simply drag and drop the item up or down to reorder it:

      reorder menu items in WordPress

      If you’d like to create a menu hierarchy using submenus, you can do that here as well. Just drag an item to the right, and it will automatically become a sub-element of the menu item right above it.

      When you’re ready to move on, click on the Publish button at the top of the page to preserve your changes. Alternatively, you can select Save Draft or Schedule if you don’t want your new menu implemented quite yet.

      The Live Customizer is usually the best way to set up your menus since you can see your changes while you make them. However, it’s worth noting that you can create menus through a similar process in the Appearance > Menus section of your dashboard:

      WordPress menus

      If you’re good with code, you can also use CSS to change your menu’s placement using hooks and filters. If you go down this route, however, you’ll want to follow your theme’s documentation to avoid issues with your site’s layout.

      How to Add Additional Menus Using the WordPress Menu Widget

      If you’d like to include additional menus elsewhere on your site (within your footer, for example), you can use WordPress’ menu widgets to get the job done. To add menus to these areas, you’ll need to return to Appearance > Customize in WordPress. This time, you’ll want to visit the Widgets section:

      WordPress menu Widgets

      Here, you’ll see a list of preset widget areas, which will vary depending on your theme, but they’re usually located in your sidebars and/or footer. Choose the area where you want your menu to be placed, and you’ll be presented with a number of widget options.

      To add a new widget, you’ll want to search for one called Navigation Menu. If it isn’t already in place, you can select Add a Widget, search for it, then click to add it to your widget area:

      add a new WordPress Widget

      Next, expand the widget by clicking on it. You’ll get the chance to add a title (which is optional), and also select the menu you’d like to display. If you haven’t created any menus yet, you’ll be given the option to do so now. Widgets provide you with yet another way to display menus on your website and will be especially helpful if you’re short of suitable locations within your chosen theme.

      Create Your First WordPress Menu Today

      When it comes to creating a great UX, easy-to-follow navigation should be one of your highest priorities. Just as importantly, your search engine rankings also benefit from well-organized content that’s easy for readers to find.

      Fortunately, WordPress makes it super easy to add menus to your site. You can select the items you want to display, re-arrange their order, and choose a location for your menu.

      Do More with DreamPress

      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

      Managed WordPress Hosting - DreamPress



      Source link

      How to Set Up TOBS, The Observability Stack, for Kubernetes Monitoring


      Introduction

      TOBS, short for The Observability Stack, is a pre-packaged distribution of monitoring tools and dashboard interfaces which can be installed into any existing Kubernetes cluster. It includes many of the most popular open-source observability tools with Prometheus and Grafana as a baseline, including Promlens, TimescaleDB, Alertmanager, and others. Together, these provide a straightforward, maintainable solution for analyzing server traffic and identifying any potential problems with a deployment up to a very large scale.

      TOBS makes use of standard Kubernetes Helm charts in order to configure and update deployments. It can be installed into any Kubernetes cluster, but it can be demonstrated more effectively if you’re running kubectl to manage your cluster from a local machine rather than a remote node. DigitalOcean’s Managed Kubernetes will provide you with a configuration like this by default.

      In this tutorial, you will install TOBS into an existing Kubernetes cluster, and learn how to update, configure, and browse its component dashboards.

      Prerequisites

      To follow this tutorial, you will need:

      Step 1 — Verifying your Kubernetes Configuration

      In order to install TOBS, you should first have a valid Kubernetes configuration set up with kubectl from which you can ping your worker nodes. You can test this by running kubectl get nodes:

      If kubectl is able to connect to your Kubernetes cluster and it’s up and running as expected, this command will return a list of nodes with the Ready status:

      Output

      NAME STATUS ROLES AGE VERSION pool-uqv8a47h0-ul5a7 Ready <none> 22m v1.21.5 pool-uqv8a47h0-ul5am Ready <none> 21m v1.21.5 pool-uqv8a47h0-ul5aq Ready <none> 21m v1.21.5

      If this is successful, you can move on to Step 2. If not, you should review your configuration details for any issues.

      By default, kubectl will look for a file at ~/.kube/config in order to understand your environment. In order to verify that this file exists and contains valid YAML syntax, you can run head on it to view its first several lines, i:

      Output

      apiVersion: v1 clusters: - cluster: certificate-authority-data: …

      If the file does not exist, ensure that you are logged in as the same user that you configured Kubernetes with. ~/ paths reflect individual users’ home directories, and Kubernetes configurations are saved per-user by default.

      If you are using DigitalOcean’s Managed Kubernetes, ensure that you have run the doctl kubernetes cluster kubeconfig save command after setting up a cluster so that your local machine can authenticate to it. This will create a ~/.kube/config file:

      • doctl kubernetes cluster kubeconfig save your-cluster-name

      If you are using this machine to access multiple clusters, you should review the Kubernetes documentation on using environment variables and multiple configuration files in order to avoid conflicts. After configuring your kubectl environment, you can move on to installing TOBS in the next step.

      Step 2 — Installing TOBS and Testing Your Endpoints

      TOBS includes the following components:

      • Prometheus is a time series database and monitoring tool that works by polling metrics endpoints and scraping and processing the data exposed by these endpoints. It allows you to query this data using PromQL, a time series data query language.
      • Alertmanager, usually deployed alongside Prometheus, forms the alerting layer of the stack, handling alerts generated by Prometheus and deduplicating, grouping, and routing them to integrations like email or PagerDuty. To learn more about Alertmanager, consult the Prometheus documentation on alerting.
      • Grafana is a data visualization and analytics tool that allows you to build dashboards and graphs for your metrics data.
      • kube-state-metrics is an add-on agent that listens to the Kubernetes API server and generates metrics about the state of Kubernetes objects like Deployments and Pods. These metrics are served as plaintext on HTTP endpoints and consumed by Prometheus.
      • Lastly is node-exporter, a Prometheus exporter that runs on cluster nodes and provides OS and hardware metrics like CPU and memory usage to Prometheus. These metrics are also served as plaintext on HTTP endpoints and consumed by Prometheus.

      In order to install TOBS, you first need to run the TOBS installer on your control-plane. This will set up the tobs command and configuration directories. As mentioned in the prerequisites, the tobs command is only designed to work on Linux/macOS/BSD systems (like the official Kubernetes binaries), so if you have been using Windows up to now, you should be working in the Windows Subsystem for Linux environment.

      Retrieve and run the TOBS installer:

      • curl --proto '=https' --tlsv1.2 -sSLf https://tsdb.co/install-tobs-sh |sh

      Output

      tobs 0.7.0 was successfully installed 🎉 Binary is available at /root/.local/bin/tobs.

      You can now push TOBS to your Kubernetes cluster. This is done by a one-liner using your newly-provided tobs command:

      This will generate several lines of output and may take a few moments. Depending on your exact version of Kubernetes, there may be several warnings in the output, but you can ignore these as long as you eventually receive the Welcome to tobs message:

      Output

      WARNING: Using a generated self-signed certificate for TLS access to TimescaleDB. This should only be used for development and demonstration purposes. To use a signed certificate, use the "--tls-timescaledb-cert" and "--tls-timescaledb-key" flags when issuing the tobs install command. Creating TimescaleDB tobs-certificate secret Creating TimescaleDB tobs-credentials secret skipping to create TimescaleDB s3 backup secret as backup option is disabled. 2022/01/10 11:25:34 Transport: unhandled response frame type *http.http2UnknownFrame 2022/01/10 11:25:35 Transport: unhandled response frame type *http.http2UnknownFrame 2022/01/10 11:25:35 Transport: unhandled response frame type *http.http2UnknownFrame Installing The Observability Stack 2022/01/10 11:25:37 Transport: unhandled response frame type *http.http2UnknownFrame W0110 11:25:55.438728 75479 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ W0110 11:25:55.646392 75479 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ … 👋🏽 Welcome to tobs, The Observability Stack for Kubernetes …

      The output from this point onward will contain instructions for connecting to each of Prometheus, TimescaleDB, PromLens, and Grafana’s web endpoints in your browser. It is reproduced in full below for reference:

      Output

      ############################################################################### 🔥 PROMETHEUS NOTES: ############################################################################### Prometheus can be accessed via port 9090 on the following DNS name from within your cluster: tobs-kube-prometheus-prometheus.default.svc.cluster.local Get the Prometheus server URL by running these commands in the same shell: tobs prometheus port-forward The Prometheus alertmanager can be accessed via port 9093 on the following DNS name from within your cluster: tobs-kube-prometheus-alertmanager.default.svc.cluster.local Get the Alertmanager URL by running these commands in the same shell: export POD_NAME=$(kubectl get pods --namespace default -l "app=alertmanager,alertmanager=tobs-kube-prometheus-alertmanager" -o jsonpath="{.items[0].metadata.name}") kubectl --namespace default port-forward $POD_NAME 9093 WARNING! Persistence is disabled on AlertManager. You will lose your data when the AlertManager pod is terminated. ############################################################################### 🐯 TIMESCALEDB NOTES: ############################################################################### TimescaleDB can be accessed via port 5432 on the following DNS name from within your cluster: tobs.default.svc.cluster.local To get your password for superuser run: tobs timescaledb get-password -U <user> To connect to your database, chose one of these options: 1. Run a postgres pod and connect using the psql cli: tobs timescaledb connect -U <user> 2. Directly execute a psql session on the master node tobs timescaledb connect -m ############################################################################### 🧐 PROMLENS NOTES: ############################################################################### PromLens is a PromQL query builder, analyzer, and visualizer. You can access PromLens via a local browser by executing: tobs promlens port-forward Then you can point your browser to http://127.0.0.1:8081/. ############################################################################### 📈 GRAFANA NOTES: ############################################################################### 1. The Grafana server can be accessed via port 80 on the following DNS name from within your cluster: tobs-grafana.default.svc.cluster.local You can access grafana locally by executing: tobs grafana port-forward Then you can point your browser to http://127.0.0.1:8080/. 2. The 'admin' user password can be retrieved by: tobs grafana get-password 3. You can reset the admin user password with grafana-cli from inside the pod. tobs grafana change-password <password-you-want-to-set>

      Each of this is provided with a DNS name internal to your cluster so that they can be accessed from any of your worker nodes, e.g. tobs-kube-prometheus-alertmanager.default.svc.cluster.local for Prometheus. In addition, there is a port forwarding command configured for each that allows you to access them from a local web browser.

      In a new terminal, run tobs prometheus port-forward:

      • tobs prometheus port-forward

      This will occupy the terminal as long as the port forwarding process is active. You can press Ctrl+C to gracefully quit a blocking process such as this one when you want to stop forwarding the port. Next, in a web browser, go to the URL http://127.0.0.1:9090/. You should see the full Prometheus interface running and producing metrics from your cluster:

      Prometheus welcome

      You can do the same for Grafana, which is accessible at http://127.0.0.1:8080/ as long as port forwarding is active in another process. First, you’ll need to use the get-password command provided by the installer output:

      • tobs grafana get-password

      Output

      your-grafana-password

      You can then use this password to log into the Grafana interface by running its port forwarding command and opening http://127.0.0.1:8080/ in your browser.

      • tobs grafana port-forward

      Grafana welcome

      You now have a working TOBS stack running in your Kubernetes cluster. You can refer to the individual components’ documentation in order to learn their respective features. In the last step of this tutorial, you’ll learn how to make updates to the TOBS configuration itself.

      Step 3 — Editing TOBS Configurations and Upgrading

      TOBS’ configuration contains some parameters for the individual applications in the stack, as well as some parameters for the TOBS deployment itself. It is generated and stored as a Kubernetes Helm chart. You can output your current configuration by running tobs helm show-values. However, this will output the entire long configuration to your terminal, which can be difficult to read. You can instead redirect the output to a file with the .yaml extension, because Helm charts are all valid YAML syntax:

      • tobs helm show-values > values.yaml

      The file contents will look like this:

      ~/values.yaml

      2022/01/10 11:56:37 Transport: unhandled response frame type *http.http2UnknownFrame
      # Values for configuring the deployment of TimescaleDB
      # The charts README is at:
      #    https://github.com/timescale/timescaledb-kubernetes/tree/master/charts/timescaledb-single
      # Check out the various configuration options (administration guide) at:
      #    https://github.com/timescale/timescaledb-kubernetes/blob/master/charts/timescaledb-single/admin-guide.md
      cli: false
      
      # Override the deployment namespace
      namespaceOverride: ""
      …
      

      You can review the additional parameters available for TOBS’ configuration by reading the TOBS documentation

      If you ever modify this file in order to update your deployment, you can re-install TOBS over itself using the updated configuration. Just pass the -f option to the tobs install command with the YAML file as an additional argument:

      • tobs install -f values.yaml

      Finally, you can upgrade TOBS with the following command:

      This performs the equivalent of a helm upgrade by fetching the newest upstream chart.

      Conclusion

      In this tutorial, you learned to deploy and configure TOBS, The Observability Stack, on an existing Kubernetes cluster. TOBS is particularly helpful because it eliminates the need to individually maintain configuration details for each of these apps, while providing standardized monitoring for the applications running on your cluster.

      Next, you might want to learn how to use Cert-Manager to handle HTTPS ingress to your Kubernetes cluster.



      Source link