Fixing Smooth Scrolling with Find-on-Page

Category Image 052

Back when we released the v17 design (we’re on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example):

… when you control+f or command+f and search on CSS-Tricks, it’ll scroll very slowly instead of snapping to the result, which makes finding information and keywords on CSS-Tricks much slower. As someone who uses this shortcut frequently, this is a usability issue for me.

Not terribly long after, I just removed it. I didn’t feel that strongly about it, and the fact that you have almost zero control over it, made me just can the idea.

I see it come up as a “CSS tip” a lot, so I chimed in with my experience:

After mentioning that, Christian Schaefer chimed in with a great idea:

Love that!

Christian blogged it:

Smooth scrolling is consequently applied to everything. Always. Even when cycling through the browser’s page search results. At least that’s the case for Chromium. So for the page search it would be desirable for the browser to make an exception to that rule and to deactivate smooth scrolling. Until the Chromium team fixes it, here is a trick how to solve the problem on your own with a little bit of extra CSS and HTML.

I’m not sure if Chrome (or any other browser) would consider that a bug or not. I doubt it’s specced since find-on-page isn’t really a web technology feature. But anyway, I much prefer find-on-page without it.

html:focus-within {
  scroll-behavior: smooth;
}

It mostly works. The bummer part about it is situations like this…

<a href="#link-down-the-page">Jump down</a>

...

<h2 id="link-down-the-page">Header</h2>

That will jump the page down. With scroll-behavior: smooth; in place, that’s kinda nice. But <h2> is typically not a “focusable” element. So, with the trick above, there is now no focus within <html> anymore, and the smooth scrolling is lost. If you want to preserve that, you’d have to do:

<h2 tabindex="-1" id="link-down-the-page">Header</h2>

The post Fixing Smooth Scrolling with Find-on-Page appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

7 Certifications for Aspiring IT Leaders

Category Image 032

In today’s digital world, enterprises and institutions of all types rely on multiple information systems as well as consumer data to run their daily business processes. This trend has seen a spike in demand for experienced information executives and IT professionals with a broad range of skills. 

Leading tech companies, federal agencies, and private corporations are seeking IT leaders who double up as technological innovators, business managers, acquisition experts, strategic thinkers, and technical professionals.

CSS Snapshot 2020

Featured Imgs 23

I think it’s great that the CSS Working Group does these. It’s like planting a flag in the ground saying this is what CSS looks like at this specific point in time. They do specifically say it’s not for us CSS authors though…

This document collects together into one definition all the specs that together form the current state of Cascading Style Sheets (CSS) as of 2020. The primary audience is CSS implementers, not CSS authors, as this definition includes modules by specification stability, not Web browser adoption rate.

Remember “CSS3”? That was the closest thing we had to a “snapshot” that was designed for CSS authors (and learners). Because CSS3 was so wildly successful, we saw a short round of enthusiasm for CSS4, me included. There is zero marketing panache on that snapshot page, which is exactly what CSS4 would need to succeed. Remember, HTML5 and friends (including CSS3) even had fancy logos!

If someone were to say to me “Chris, when CSS3 came around, I boned up on all that, but I haven’t kept up with CSS since, what should I learn?” I’d say “That’s a damn fine question, developer that has a normal healthy relationship with technology.” But honestly, I might struggle to answer cohesively.

I’d say: Uhm, CSS grid for sure. Custom properties. Clipping and Offset paths I suppose. prefers-reduced-motion. I dunno. There are probably like 100 things, but there is no great single reference point to see them all together.

I’ll work on putting a list together. I don’t think I’ll have the gumption to call it CSS4, but at least I’ll be able to answer that question. Feel free to suggest ideas in the comments.


The post CSS Snapshot 2020 appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

How to Create a Menu in WordPress

Featured Imgs 29

How to Create a Menu in WordPressYou’ve been enjoying your WordPress adventure so far. You chose a great WordPress theme, put together a nice website, and brought your WordPress SEO machinery to life. The visitors started trickling in to your new WordPress-based business, but few convert into loyal fans or customers. You check out Google Analytics, and your bounce rate is […]

The post How to Create a Menu in WordPress appeared first on WPExplorer.

10 Top Recommendations APIs

Featured Imgs 23

When was the last time you saw a movie, read a book, ate at a restaurant, or bought anything without looking at user ratings or user recommendations first? If you are like most people, it's been years. There is no doubt that recommendation services are crucial to creators, buyers and sellers.

The 2 Essential Ingredients of a Brilliant Title

Category Image 051

At WriteOps, we work with companies who are trying to sell their technical product. Almost all of them had a go at their own technical content. Their engineers wrote blogs, spoke at meet ups, and organized webinars. 

And None of Their Efforts Worked. Why?

The success of their marketing efforts wasn’t a function of money spent, nor were they solely about clever placement of paid ads. This is pretty true in general, but it is an absolute axiom when you’re marketing to the technical class.

IPinfo Launches Privacy Detection API

Featured Imgs 23

IPinfo announced today the availability of its Privacy Detection API. This API detects various methods used to mask a user's true IP address, including VPN detection, proxy detection, tor usage, or a connection via a hosting provider, which could potentially be used to tunnel traffic and mask the true IP address.

How to Recover and Restore Deleted Pages in WordPress

Featured Imgs 19

Are you trying to recover deleted pages in WordPress?

If you accidentally deleted a WordPress page, then it is possible to recover it from Trash.

In this beginner’s guide, we’ll show you how to easily recover deleted pages in WordPress and WooCommerce.

Recovering deleted pages in WordPress

How WordPress Handles Deleted Pages?

Just like your computer, WordPress moves deleted items into a ‘Trash’ folder. Doing that removes those items from your website and admin screens, but they’re not deleted permanently right away.

After 30 days, WordPress automatically deletes the item permanently from the trash, and your WordPress database.

If the page you deleted is still in the trash, then you can go ahead and restore it. We’ll show you how in a minute.

However, if it has been deleted from trash too, then you will need to try other ways to restore the deleted page in WordPress.

Sometimes you may accidentally delete a page and not notice it for a while. For instance, if you have multiple pages with the same name, and you end up deleting one that you actually needed.

Accidentally deleting similarly named pages in WordPress

Another common scenario that we have seen is users accidentally deleting pages needed by WooCommerce or their WordPress membership plugin.

That being said, let’s take a look at how to easily restore deleted pages in WordPress and WooCommerce. Here is quick table of content, so you can jump to the section that best fit your needs.

Method 1. Recover Deleted Pages from Trash in WordPress

This method is the easiest, and you should try it first before doing anything else.

Normally, when you delete an item in WordPress, it is sent to the trash folder, and you can recover it for the next 30 days. After that, it will be automatically deleted forever.

Simply go to Pages » All Pages inside your WordPress admin area. From here, you need to switch to the ‘Trash’ tab to view all the pages that have been deleted during last 30 days.

Restore deleted pages

If the page(s) you want to recover is listed there, then simply take your mouse over the page title, and you’ll see the option to ‘Restore’ it.

You can also restore multiple pages at once by selecting them and then choosing ‘Restore’ from the Bulk Actions drop-down menu at the top.

Restoring multiple pages in WordPress

You can now go to Pages » All Pages and locate the restored page there.

That was quick and easy, but what if the page you deleted is not listed under Trash?

Don’t worry, there are other ways to restore deleted pages in WordPress.

Method 2. Restore Deleted Pages in WordPress Using a Backup Plugin

Backups are one of the best WordPress security and productivity tools. All WordPress websites must set up a proper WordPress backup plugin.

These WordPress backup plugins not just help you recover a hacked WordPress site, but they can also help you recover deleted content including pages.

Note: WordPress backup plugins allow you to restore your entire website to an earlier point. This means any other changes you made to your website after that time can be lost.

If you know when you deleted a page, then you can access the last back up before that time to restore your website.

If you don’t have a WordPress backup plugin installed, then there is still a fairly good chance that your WordPress hosting company does, and you can still restore it via cPanel.

For step by step instructions you can follow our guide on how to restore WordPress from a backup. It shows how to restore WordPress from a backup using UpdraftPlus, BackupBuddy, phpMyAdmin, cPanel, and more.

Method 3. Recover Deleted WooCommerce Pages

By default, WooCommerce creates pages for the checkout, cart, shop, and account management. These are important pages for your WooCommerce store to function properly.

WooCommerce default pages

If you accidentally delete a WooCommerce page, then you can first try restoring it by looking into the Trash (see Method 1 above).

If you cannot find the page in trash, then you can simply create a new one. For instance, you can go to Pages » Add New and then create a blank page titled ‘Cart’.

Create new cart page in WooCommerce

Similarly, you can create other WooCommerce pages as well for shop, checkout, and account.

After you have created new pages, you can tell WooCommerce to use these new pages instead. Simply go to WooCommerce » Settings page and switch to the ‘Advanced’ tab.

Select WooCommerce default pages

From here, you can select pages you created earlier under the Page Setup section.

For the shop page, you’ll need to switch to the ‘Products’ tab and then select the page you want to use as your Shop page.

Shop page

Don’t forget to click on the ‘Save changes’ button to store your settings.

Method 4. Restore Selected Pages from a WordPress Backup (Advanced)

This method is a bit complicated, unreliable, and is not recommended for beginners. However, it would be useful if you don’t want to restore a complete a website and lose any changes you made after that backup.

You can simply restore your WordPress back up to a local server installation and then copy and paste the page contents that you wish to restore.

First, you’ll need to download your WordPress backup files to your computer. Simply go to your WordPress database backup plugin page and you will be able to see recent backups.

For instance, here is how you’ll see your recent backups listed in the UpdraftPlus.

Download WordPress database backup

Simply click on the database backup to download it to your computer.

Next, you will need to restore your WordPress site to a local server. You can install WordPress on your computer using WAMP (or MAMP for Mac).

After that, you can use can install your WordPress backup plugin on local server installation and restore using the backup files.

Optionally, if you have only the database backup, then you can restore that using phpMyAdmin as well.

Once you have restored the WordPress database, you will need to update WordPress Site and Home URLs in the database. To do that, simply open phpMyAdmin on your local server by typing the following URL:

http://localhost/phpmyadmin/

After that, you need to select your WordPress database from the left column and then click on the wp_options table. Switch to the browse tab and locate the rows containing ‘siteurl’ and ‘home’ under the option_name column.

Change site URLs

You’ll notice that the option_value column contains the URL of your live website. You need to edit both of these rows and replace your option_value to match your local server WordPress site.

After that click on the ‘Go’ button to save your changes.

You can now login to your localhost installation, and you’ll see all your old pages listed under Pages » All Pages.

Editing a WordPress page

Go a head and edit the page you want to restore. All you need to do is copy the content and paste it to your live WordPress website as a new page.

Copy page content

Don’t forget to update or publish changes on your live website.

We hope this article helped you learn how to recover deleted pages in WordPress. You may also want to see our complete WordPress security guide to keep your WordPress site safe and secure, and our list of the must have WordPress plugins for all websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Recover and Restore Deleted Pages in WordPress appeared first on WPBeginner.

5 Questions To Ask an Ottawa Graphic Designer Before You Hire Them

Featured Imgs 23

Many Ottawa companies these days are hiring professional graphic design firms or freelancers to absolve some challenges behind branding, but they do not always hire the right person. Since graphic designers are all unique—some with university degrees, some self-taught—you have to look through a lot of profiles before finding the one. 

It’s a little like dating! Fortunately, you won’t have to go on a million blind dates. All you have to do is ask the right questions during the Zoom conference or phone call. Aside from interviewing a graphic designer and getting them to tell you little tidbits about themselves, in creating rapport, you should consider the following questions:

Question #1: Can I See a Portfolio and References?

Any designer in Ottawa worth your time should have a professional portfolio with previous work. They should provide you with samples of styles they are adept in, as well as projects that are potentially similar to yours. As you peruse the portfolio, look at the aesthetic, the use of colours, and the composition. Ask yourself if it is what you want. 

At the same time, you should ask for references or any proof of reviews or testimonials from previous clients. Take both positive and negative feedback into consideration. How the professional handles the worst reviews is going to tell you a lot more than how they replied to a good one. 

Question #2: How Long Does It Take to Develop a Design?

While time is relative to the intricacies of the design and how many people are working on it, an experienced designer will be able to estimate a turnaround time. This is a good indicator of competency. 

Going with a freelancer? Then you should know that they probably have multiple projects going on and are doing so on their own unique schedule. You have to make sure you are both on the same page. Make sure they are going to be responsive to your emails and calls and that they confirm when they can deliver. 

Question #3: Can You Tell Me About You/Your Team’s Design Process?

Even if you don’t know anything about graphic design, the professional should be able to describe how the team (or the individual) comes up with their ideas and develops them. There is usually a system in place to help graphic designers produce quality work. Regardless of the complexity of the project, a trustworthy graphic designer will have steps they take that are easy to understand and logical. If they have trouble discussing this, they probably are not skilled enough to complete the job. 

Question #4: Who Owns The Copyright After Design Completion?

Never forget the all-important licensing and copyrighting. Sometimes, graphic designers are not happy to surrender their right to original work. Others will not have issues with it. This is up to you, but if you plan on making changes to the digital work in the future but may not want to use the same graphic designer, make sure you both agree that you receive the copyrights and licensing to do so. 

Question #5: Can You Work Within Our Budget? Or How Much Do You Charge For Services?

Some graphic designers have a fixed rate for a project. Others charge by the hour. Factors can alter the price, such as the number of designs you order, revisions, planning, licensing, and so on. All these impact the price. A graphic designer who is reliable will be honest and transparent about their charges and include that in any contract you sign. 

In short, hiring graphic designers for a project is much like hiring anyone else. You need to gauge their personality and their skill before giving them the green light. By asking these 5 questions, you will find the right person for the job in no time. 

All in One SEO Plugin Turns on Automatic Updates without Notifying Users, Removes Functionality in Latest Release

Category Image 091

Buried in the changelog of a series of minor releases that dropped before the Christmas holiday, All in One SEO plugin users were given the surprise gift of automatic updates. After a seemingly endless run of releases (12 updates during a span of six weeks at the end of 2020), the plugin’s developers decided to change its auto update policy so that it defaults to “on.” The plugin is installed on more than 2 million WordPress sites.

Version 4.0.8, released December 21, 2020, flipped on automatic updates without notifying users of the change. Despite having auto updates turned off for the plugin, many users discovered the change when they were notified by email that their sites had been updated without permission.

Frustrated users took to the plugin’s support forums to report the issue and find out how it was possible.

“Multiple sites have updated to 4.0.11 without my permission and while all auto updates are disabled,” one user said. “I/we do not want to hear that ‘it shouldn’t happen’ and we are looking into.

“Your once reliable plugin has destroyed hundreds of pages of social meta data on multiple sites, broken layout (and this after I fixed the problems and told you last week, I will be disabling all updates).”

Others commented on the issue, citing problems with a previous major release as the source of many bugs that followed.

“The rollout of version 4, and auto-updating without any chance to backup first was a blunder by AIOSEO,” plugin user Derek Haines said. “It has cost me hours, days, and now weeks to fix the problems caused.”

The All in One SEO plugin team apologized for the inconvenience users experienced but said they could not reproduce it on their end. The plugin’s settings page has a toggle for auto updates but it is just a wrapper for WordPress’ auto updater.

“I just wanted to give you an update and let you know that we’ve decided to remove our own auto-update functionality all together since this issue seems to be happening on a limited amount of websites and we aren’t able to reproduce it on our end,” Arnaud Broes said.

The problem was also discussed in the Advanced WordPress Facebook group.

“All In One SEO Pack apparently turned auto updates on, and in a few cases I found sites where those updates failed,” Eric Karkovack reported. “I had no idea they were turned on and in one case a site was inaccessible.”

Karkovack noted that there was only a small mention in the changelog, despite the plugin liberally using the dashboard notification UI for sales.

William Earnhardt, WordPress core contributor and developer at Bluehost, offered some insight as someone who has worked on core as well as plugins installed on a massive scale.

“In my experience if you are weighing the two options, auto-updates prevent significantly more issues and support requests than they create,” Earnhardt said. “So I’m strongly in the camp of enabling them by default, with a mechanism for preventing or disabling for those who prefer (core makes this possible with filters and now with per-plugin UI).

“I think when making these decisions, we as developers have to consider what is best for the broadest number of users and be realistic about the type of users we have. If a user is already not updating plugins regularly, it is unlikely they are going to have the awareness to flip a toggle to turn auto-updates on. So opt-in makes them mostly useless.”

Earnhardt agreed that notifying users of the change would have been a good idea, but admin notices are already “frequently abused and quite noisy.”

“It would likely be missed if not persistent, but really should only show after the update and then go away,” he said. “Is that enough when combined with a note in the changelog? Probably for most, but I’m sure some would disagree.”

As promised nine days ago, All in One SEO’s developers have now removed the functionality from the plugin in its first update of 2021, version 4.0.12 released today. It is noted in the changelog: “Fixed: Completely remove auto updates wrapper to let WordPress handle updates.”

allow to edit adress book

558fe5180e0e8fc922d31c23ef84d240

Write a C# console program that allows the user to edit an address book by displaying the following menu to the user:
1- Add New Address
2- Delete Address
3- Modify Address
4- View Address
5- Quit

when the user enters 1 the program just displays "You wish to add an address." And it does similarly for choices 2, 3, and 4. When the user enters 5 the program ends. The program should repeatedly ask the user for a choice until the user enters 5. If the user, by mistake, enters anything other than an integer number between 1 and 5 inclusive, the program alerts the user by an error message then gives him the chance to continue by redisplaying the menu.