20 Minimal HTML Templates for Business Websites

Featured Imgs 30

When creating a business website, it’s vital to have a design and layout that serves your content well. But this can feel like a monumental task if you don’t have design skills yourself. That’s why minimal HTML templates are so useful, of course. They save you time, and for just a small upfront investment, you can get a fantastic-looking site that suits your company for years to come.

Today, we’ve compiled twenty minimal HTML templates for creating effective business websites. The minimal design is key here: it means your content stands out and won’t be lost in a sea of clutter.

UNLIMITED DOWNLOADS: Email, admin, landing page & website templates

Starting at only $16.50 per month!




Ocularus

Example of Ocularus

The Ocularus HTML template is easy on the eyes, mostly because there isn’t a whole lot to look at. And that’s a good thing. Its minimal design allows your content to shine.

Blossom

Example of Blossom

Another option is the Blossom template. This one offers a simple layout that you can use to create any type of company website you can imagine. Add images, add text with ease here.

Sora

Example of Sora

The Sora template is aimed at photographers and but could be used for any type of business with a graphical focus.

Krome

Example of Krome

Krome is a fantastic template that is suitable for portfolios, agency websites, and more. It uses a grid-based layout for showcasing images in an eye-catching way.

Leto

Example of Leto

Leto is another minimal template that can be used for portfolios. Its grid-based design makes it easy to display graphics and images succinctly.

Minel

Example of Minel

The Minel template could be customized for a wide range of businesses. It offers an interesting menu layout, call-to-action buttons, and compelling graphics.

Opium

Example of Opium

Opium is another HTML template that uses a minimal design to great effect. Enjoy the grid layout, and timeline page option to make for a unique “about us” page, and that’s just for starters.

Minimalize

Example of Minimalize

Minimalize is a lovely-to-look at HTML template that utilizes the one-page motif to create an engaging scrolling experience for your visitors.

Vinero

Example of Vinero

Vinero is another minimal theme, this time using a monochromatic color scheme, a grid-based layout, and an overall clean look that complements your content well.

Pisend

Example of Pisend

Another option is the Pisend HTML template. This one offers a minimal design, this time for blogs. It comes with 10 demos, too, so you can opt for one and get started with inserting your content immediately.

Origin

Example of Origin

If you’re looking for a portfolio HTML template, this minimal option is a good fit. Origin offers large text, large images, and easily identifiable call-to-action buttons that leave your visitors guided through an intuitive browsing experience.

Pekko

Example of Pekko

Pekko is another HTML template that is sure to catch the eye. Its monochrome design allows you to feature your best work front and center with zero distractions getting in the way.

Jestem

Example of Jestem

Jestem is a lovely minimal HTML template that can be used in a wide variety of ways from website to vCard to online resume. It’s easy to set up for presenting your contact info, at the very least.

T-ONE

Example of T-ONE

T-ONE offers a minimal design that gives you plenty of opportunity to showcase full-width images, compelling overlaid text, graphics, and CTAs.

Omnia

Example of Omnia

Omnia is a minimal HTML template that prioritizes whitespace above all else. And to dramatic effect, I might add. Customize with your own photography and you’ll be impressed with the results.

Laboq

Example of Laboq

Another option is the Laboq template. This one could be customized to support a grid-based portfolio or even an online store.

Aether

Example of Aether

Or you may wish to consider Aether. This minimal HTML template is multipurpose and can be used for any type of site. However, it does have a penchant for agency and portfolio company websites.

Mimilism

Example of Mimilism

Mimilism offers a cohesive, grid-based design that makes it easy to display your best work or examples of your service in an appealing way. Customize, add buttons, and flavor text however you see fit. The fact remains, this template provides flexibility for creating the look you want.

Nubia

Example of Nubia

The Nubia HTML template really embraces minimalism in an eye-catching way. It has all the hallmarks: whitespace, grid-based layout, and a simple color scheme. But it presents content in such an appealing way that it looks like your site could be a magazine.

Keepsake

Example of Keepsake

Last on our list is the Keepsake template. This one offers a minimal design with a grid layout that could serve a blog, portfolio, or service agency site well.

Set Up a Minimal HTML Template for Your Business

Now that you have twenty minimal HTML templates to choose from, you can hopefully get started with setting up your own business website quickly. So many of these offer demos as well, so you can import that data, add your own images and content and get rolling with launching your new site in a matter of hours. Which is pretty great if you ask us.

How to Create a Custom Bootstrap Theme from Scratch

Bootstrap

This post is originally published on Designmodo: How to Create a Custom Bootstrap Theme from Scratch

How to Create Custom Bootstrap Template from Scratch

Bootstrap, the most popular front end framework in the world, makes it easier for web designers and developers to quickly generate creative website themes. So, let’s build a Bootstrap website that works across modern web browsers and different viewports such …

For more information please contact Designmodo

Ringtone on Windows Mobile 7 MP3?

Category Image 006

How can we use an mp3 song for a ringtone, we used to be able to use it on Windows 6.5, are we unable to find any details about it anywhere on Windows 7 mobile phones and there are no choices in the phone's music side to set it as a ringtone or settings?

Beginner’s Guide on How to Add a Link in WordPress

Category Image 091

Do you want to add a hyperlink in WordPress? Recently, one of our users asked us how to add a link in WordPress.

There are several different ways to add links in WordPress. You can add links in your posts, pages, navigation menu, sidebar widgets, footer area, and more.

In this comprehensive beginner’s guide, we will show you how to add a link in WordPress posts, pages, widgets, navigation menus, and more.

How to easily add a link in WordPress

Since this is a detailed tutorial, please use the navigation below to quickly jump to the section you need:

Why Are Links Important?

Links are the bloodstream of the internet, which makes them really important.

Basically, most websites on the internet are connected via links, which is why the term ‘web’ or ‘World Wide Web’ was introduced in the first place.

These are the hyperlinked text, buttons, and other elements that you click to go from one page to another or from one website to another.

Imagine visiting a web page with no link for you to click on. You’ll have no option but to click on the back button in your browser.

For individual websites, links tell your users where to click to view more information.

Properly placing links on your website allows you to increase the time users spend on your website. It also helps users discover more content, make a purchase on your online store, or subscribe to your email newsletter.

That being said, let’s take a look at how to easily add links in different areas of your WordPress website.

How to Add Links in WordPress Posts and Pages

WordPress makes it really easy to add links in your blog posts and pages using the block editor.

Simply edit your post or page, or create a new one.

Next, highlight the text that you want to attach the link to. This selected text is called the anchor text for the link. Now click on the ‘Link’ button:

You’ll see a box where you can enter a URL. A URL is a web address. For instance, WPBeginner’s guide on how to start a WordPress blog has the URL https://www.wpbeginner.com/start-a-wordpress-blog.

You can simply copy and paste the URL of the post or page you want to link to, like this:

Creating a link by pasting in a URL using the WordPress block editor

Click the Apply (Enter) button to insert the link into your post.

If you’re linking to content on your own site, then it might be quicker to search for it. Type a word or two from your content title, and WordPress will find it:

Searching for a page to link to using the WordPress block editor

Click on the title of the page or post you want to link to, and the URL will be automatically added for you. Again, you’ll need to click the Apply button to put the link into your post.

If you want to set your link to open in a new tab, then click the arrow on the right. You can then click the toggle and set your link to open in a new tab.

Setting your link to open in a new tab using the WordPress block editor

Note: We recommend that you only use this option for links to third-party websites. This way your users don’t leave your website while visiting it.

Adding Link in Old WordPress Editor

If you are using the older classic editor instead of the block editor, then the process for adding a link is quite similar.

Open up the post that you want to edit, or create a new one. Find the text you want to use as the link’s anchor and highlight it. Then, click the ‘Link’ button which should appear in the first row of toolbar buttons.

Creating a link using the WordPress classic editor

You can then copy and paste the URL you want to link to, or search for it, as in the block editor.

Pasting your URL directly onto the anchor text

Another, even quicker, way to add a link in both the block editor and classic editor is to simply paste the URL onto the anchor text.

First, copy the URL you want to link to. Then, highlight your chosen anchor text in your post.

Next, you can either right-click and select ‘Paste’ or simply press Ctrl+V (Windows) or Command+V (Mac) to paste the URL.

Paste your link directly into your content

WordPress will automatically detect that you’re pasting a URL, not text, and will turn the anchor text into a link.

Take a look at our tips for mastering the WordPress content editor to learn more about using the block editor effectively.

How to Add Links in WordPress Text Widgets

WordPress allows you to add widgets to your site’s non-content areas like sidebar, footer, or other widget areas.

Some of these widgets are automated and do not have many options. For example, the Recent Posts widget will automatically show links to your recent posts. You don’t need to do anything extra.

However, if you want to add some custom text with links in your sidebar, then you can use the Text Widget.

Go to the Appearance » Widgets page and then drag ‘Text’ widget into your sidebar or other widget area.

You can then type in your text and add a link just as you would when adding one to a post or page.

Adding a link in a widget

Make sure you click the ‘Save’ button beneath your widget after making changes.

How to Add Links in WordPress Navigation Menus

Do you want to add links to your site’s navigation menu? WordPress comes with a built-in drag and drop menu editor which allows you to create and manage navigation menus on your WordPress site.

Go to the Appearance » Menus page. If you don’t already have a menu set up, then you can create one by entering a menu name.

Next, select the pages you want to add to your menu on the left-hand side, then click the ‘Add to Menu’ button.

WordPress will automatically link to your selected posts and pages. You can move menu items and up and down to rearrange them.

You can also add any link you want to your menu. It doesn’t have to be a page or post on your site. For instance, you could enter the URL of your Twitter profile and add that to your navigation menu.

To enter a link, just click the arrow next to the ‘Custom Links’ section on the left. You can then type in the URL and the text you want to use for the link.

Adding a custom link to your navigation menu

For more help with creating your menu, take a look at our beginner’s guide on how to add navigation menus in WordPress.

How to Add Title and Nofollow in WordPress Links

It’s often useful to give your links a title. This is the text that appears when someone runs their mouse cursor over the link, like this:

A link with a title

Adding a title often makes it clear where the link leads to. It can be helpful or even reassuring for your readers.

However, WordPress does not allow you to add title to the links with the default editor. You can still add it, and we’ll show you how to do that in a bit.

You may also want to add a nofollow tag to external links. This tells search engines not to pass your site’s SEO score to that link because you don’t own or control the content on that website.

WordPress also does not support nofollow by default either.

Method 1. Use AIOSEO plugin in Gutenberg

All in One SEO plugin (AIOSEO) for WordPress automatically adds the title, nofollow, sponsored, and UGC attributes to your links.

All in One SEO Title and Nofollow

Method 2. Use HTML code in Gutenberg

If you’re using the Gutenberg editor, and don’t want to use AIOSEO, then you’ll need to manually edit the HTML to add title and nofollow attributes to your links.

First, add your link within your paragraph block in the usual way. Next, click on the three vertical dots and select ‘Edit as HTML’ as shown here:

Switching to the HTML view of a block in the WordPress block editor

You’ll now see the HTML code for your block.

Viewing the HTML code for a block in the WordPress editor

You can add a title and/or a nofollow attribute to the link like this:

<p>You can find out more about our company on our <a href="https://www.examplecompany.com/about-us/" title="About Us" rel="nofollow">About Us</a> page.</p>

For the title, you can change “About Us” to be whatever you want. With the nofollow attribute, this should always be rel="nofollow". Don’t forget the double quotation marks around the title and the “nofollow” as your link won’t work correctly without them.

Method 3. Use a Plugin with the Classic Editor

If you’re using the Classic Editor, you can install and activate the the Title and Nofollow for Links plugin.

This plugin will add title, nofollow, and sponsored checkbox options to the insert link popup.

Highlight your anchor text and click the ‘Link’ button, then click the cog:

Locating the cog icon for a link in the classic editor

You’ll then see the additional options:

Additional options created by the Title and Nofollow for Links WordPress plugin

For more help, take a look at our guide on how to add title and nofollow to the insert link popup in WordPress for more information on this plugin.

How to Add Link Buttons in WordPress

Do you want to add a button to your WordPress posts or pages? There are many ways you can do this. The easiest is using WordPress’s built-in Button block.

Create a new post or page, or edit an existing one. Then, click the (+) icon to create a new block. Select ‘Button’ from the ‘Layout Elements’ options, or simply search for the Button block.

Adding a 'Button' block to your post or page in WordPress

You can type the text for your button by clicking in the colored area. Enter the URL that the button should go to in the ‘Link’ box.

Adding the text and link for your button

To change the button’s alignment, or to make the text bold or italic, just use the controls at the top of the block itself.

You can make more changes to how the button looks in the block options on the right-hand side of your screen. For instance, you might want to change the color or add a wider border.

You can also change the link settings here. You can set your link to open in a new tab, and if you want, you can also add the ‘nofollow’ attribute to the link by typing it in the ‘Link rel’ box.

The right hand panel where you can edit your button's design and how the link works

What if you’re still using the old WordPress classic editor? You can install the “Forget About Shortcode Buttons” plugin to easily create buttons while you’re editing a post or page.

Simply install and activate the Forget About Shortcode Buttons plugin. Then, create a new post or edit an existing one.

You’ll see the ‘Insert Button’ icon in the toolbar, on the right hand side:

The Insert Button icon on the right hand side of the classic editor's toolbar

Click on the button, and you’ll see a popup. Here, you can customize your button, choose colors, borders, add text, add an icon, and include the link itself while seeing a live preview.

Creating a button for your link and customizing the design

For more information and details take a look at our guide on how to add buttons in WordPress without using shortcodes.

How to Embed Linked Content in WordPress

You can easily embed certain types of content in WordPress by simply inserting its URL in your post. This is sometimes called creating a “content card” in your post.

Just paste the whole URL into its own paragraph block. The whole tweet, including images, likes, timestamp, and more will be embedded like this:

Embedding a tweet by pasting in the link to it in WordPress

The process is the same for YouTube videos. Simply find the video you want to use on YouTube and copy the URL from the top of your browser window:

Get the link to your chosen YouTube video from your browser's address bar

Next, paste the link into your post or page. It’ll automatically embed the video:

Embedding a YouTube video into your post

As well as being great for Twitter posts and YouTube videos, this method also works for many other types of content. You can find out more from WordPress’s support article on ‘Embeds’.

How to Add Affiliate Links in WordPress

Do you want to increase your site’s revenue by using affiliate links? Affiliate marketing provides a steady income to many blogs and websites.

All you need to do is add special referral links to products and services that you recommend. When your visitors purchase these products after clicking your links, you get a commission.

The problem that most beginners face is that each product or website they want to recommend has a different URL. It’s tricky to keep track of these, especially if you’re recommending lots of products.

The best way to add and manage affiliate links is by using an affiliate management plugin. We recommend using either Pretty Links or Thirsty Affiliates.

Both of these plugins work by creating redirect links such as www.yoursite.com/refer/partnersitename that send people to your special affiliate link.

The plugins will add a new option to your WordPress menu where you can add your affiliate links. Here’s how that looks with ThirstyAffiliates. You simply copy and paste your special affiliate link into the ‘Destination URL’ box.

Adding a link in ThirstyAffiliates

You can set specific options for your link on the right hand side, deciding whether to nofollow it, open it in a new window/tab, and more.

Setting the options for your affiliate link with ThirstyAffiliates

Once you’re done, click ‘Save Link’.

After you’ve set up your affiliate links, you can easily add them into your posts and pages. In a paragraph block, click the down arrow then select the ‘Affiliate Link’ option:

Adding an affiliate link to your post

Next, type in the start of whatever you named that affiliate link. In our example, that’s “Our Affiliate Partner”.

Finding your affiliate link by searching for it

You can then click the name and click ‘Apply’ to add the affiliate link to your post.

If you ever need to change an affiliate link (e.g. if the company you’re linking to moves to a different affiliate program) then that’s really easy to do.

You just change it once in your dashboard, under “ThirstyAffiliates” or “Pretty Links”. The redirect link stays the same as before, but it’ll now redirect to the new affiliate link everywhere it’s used.

For more handy affiliate plugins, check out our post on the best affiliate marketing tools and plugins for WordPress.

How to Manually Add a Link in HTML

Occasionally, you might want to add a link to your site using HTML code. This could happen if you need to use a custom HTML block or widget.

You might also need to directly edit a link in your theme file. Just make sure you always use a child theme so you don’t lose your changes when you update the parent theme.

It’s easy to create a link in HTML. To try it, add a custom HTML block to a post or page. You can find this block under ‘Formatting’ or you can search for it using the search bar.

Adding a custom HTML block to your post or page

Next, you’ll see a box where you can write HTML. Copy this code into the box:

<a href="https://www.yourlinkhere.com">Text</a>

It should look like this:

The HTML code to create a link

You can click the ‘Preview’ tab to see how your code will look in your post or page:

Previewing how the HTML will display in the post or page

Now click back to the ‘HTML’ tag. Change the URL to the URL you want to link to. Change the word ‘Text’ to whatever word or words you want to use for your link.

To add a title to your link, you’ll need to include it in the code like this. You can change “This is the title” to anything you want.

<a href="https://www.yourlinkhere.com" title="This is the title">Text</a>

If you want your link to open in a new tab, simply add target="_blank" to the HTML code, like this:

<a href="https://www.yourlinkhere.com" target="_blank">Text</a>

If you want your link to be nofollowed, add rel="nofollow", like this:

<a href="https://www.yourlinkhere.com" rel="nofollow">Text</a>

You can include all of these at once. This is how a link with a title, that opens in a new tab and is nofollowed, would look:

<a href="https://www.yourlinkhere.com" title="This is the title" target="_blank" rel="nofollow">Text</a>

That’s how you create a link in HTML, if you ever need to.

An anchor link is a type of link on the page that brings you to a specific place on that same page. It allows users to jump to the section they’re most interested in.

Take a look at the animated screenshot below:

Anchor link preview

These type of links are really helpful when writing longer tutorials or content, so your users can easily jump to the section they’re most interested in.

We have created a detailed step by step guide on how to easily add anchor links in WordPress.

Want to add social share links or buttons on your site?

These links make it easy for your users to share your content on their favorite social networks. Sometimes social share links or buttons are also accompanied by total share count.

Facebook social share button

We don’t advise users to add these links manually. Instead, you should always use a social share plugin.

We have a step by step guide on how to add social share buttons in WordPress.

We hope this article helped you learn how to add a link in WordPress. You may also want to see our beginner’s guide on how to create a professional business email address, and how to start an email newsletter to grow your audience.

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 Beginner’s Guide on How to Add a Link in WordPress appeared first on WPBeginner.

How Will Facebook's Acquisition of Giphy Impact API Integrations?

Featured Imgs 23

Last week, Facebook announced its acquisition of Giphy, one of the most popular GIF sites across the internet. In its announcement, Facebook disclosed that the Facebook family of apps already makes for half of Giphy's traffic, with Instagram making up half of the overall Facebook traffic. Accordingly, the Giphy team will become part of Instagram which has enjoyed API integration with Giphy for quite some time.

How to Import and Export Navigation Menus in WordPress

Featured Imgs 13

Do you want to export a navigation menu from one WordPress site and import it into another?

The default WordPress import / export feature allows you to transfer menus as part of the full site transfer, but it does not let you import / export menus by themselves.

In this article, we’ll show you how to easily import / export navigation menus in WordPress, so you can save time.

How to import and export navigation menus in WordPress

Understanding WordPress’s Import / Export Features

On every WordPress site, you have built-in import and export features. You can find these under Tools » Import and Tools » Export in your WordPress dashboard.

The Import and Export options under the Tools menu in the WordPress dashboard

If you go to the Export page, you’ll see the WordPress default options. These let you choose between exporting all content, or exporting only your posts, pages, or media.

The built-in Export options in WordPress

All content includes your navigation menus … plus posts, pages, comments, custom fields, terms, and custom post types.

But in many cases, you don’t want to import everything. For instance, you might just want to replicate your navigation menu and the pages included in it, but not your posts or any other pages.

Luckily, there’s an easy plugin that extends this functionality, so you can only import and export navigation menus in WordPress.

That being said, let’s take a look at how to import and export navigation menus without exporting all the content.

Export and Import Navigation Menus in WordPress

Before going further, make sure you’re happy with the menu you’ll be exporting. You can find your site’s menu under Appearance » Menus.

Editing your navigation menu in the WordPress dashboard

If you need help to create or change your menu, take a look at our tutorial on how to add a navigation menu in WordPress.

Next, you need to install and activate the WPS Menu Exporter plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Export page in your WordPress admin dashboard.

You should now see an additional option to export navigation menu items. This will include your menu itself, plus all the pages that are linked from your menu.

If you have any posts in your menu, those will be included too, along with any comments on them.

The Export Navigation Menu Items option in the Export tool

Simply select the Navigation Menu Items radio button and then click the ‘Download Export File’ button.

This lets you download your navigation menu and its associated pages to your computer. These are stored in an .xml file with the name site.wordpress.yyyy-mm-dd, where “site” is the name of your website and “yyyy-mm-dd” is the date.

The downloaded .xml file containing your navigation menu items and pages

Importing Your WordPress Menu to Your New Site

You can import the .xml file you just downloaded by using WordPress’s standard Import feature. It’s a simple process. You just need to upload your navigation menu file to your new site.

Important: Make sure you don’t have any existing pages with the same name as pages in the menu you’re importing, not even in the trash. Otherwise, the import tool may not be able to import those pages correctly.

First, log in to your WordPress dashboard on the new site where you want to import your menu.

Next, go to Tools » Import. You’ll need to install the WordPress importer. Just click the ‘Install Now’ link beneath ‘WordPress’ at the bottom of the list.

Installing the WordPress import tool

Once you’ve installed the WordPress importer, you should see a ‘Run Importer’ link in place of the ‘Install Now’ link.

Click the link to run the WordPress import tool

After you click on this link, you’ll see the Import WordPress screen. Here, you’ll need to click the ‘Choose file’ button so you can select the .xml file you downloaded earlier.

Once you’ve selected your file, go ahead and click the ‘Upload file and import’ button.

Upload your .xml file and click the button to import it to your new site

On the next screen, you’ll be asked to ‘Assign Authors’. The default option is to import the original author of the menu content.

Choose which user to assign pages to when you import them

In many cases, it’ll make the most sense to set an existing user as the author of the imported content. You can do that by selecting the user’s name from the dropdown menu.

Selecting an author from the dropdown list to assign the pages to

If you plan to re-use the content of the pages themselves, then you’ll also want to check the ‘Download and import file attachments’ box. This means that images will be included in the import.

Once you’re happy with your settings, click the ‘Submit’ button at the bottom of the page.

Upon completion, you should see the following message:

The success message after importing the navigation menu

Viewing Your Imported Menu and Pages

The import has put your menu and the associated pages in place. To take a look at the imported menu, just go to Appearance » Menus. Here, you can make sure that it’s been imported correctly.

You can also click on the Pages tab in your WordPress dashboard to check out the new pages that have been imported along with the menu.

Viewing the list of pages on your website

That’s it, you’ve successfully imported your navigation menu and the associated pages. You can edit the menu and the pages however you like.

We hope this article helped you learn how to import and export navigation menus in WordPress. You might also like to take a look at our tutorials on how to style WordPress navigation menus and how to create a dropdown menu in WordPress.

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 Import and Export Navigation Menus in WordPress appeared first on WPBeginner.

13 Popular Shipping APIs

Featured Imgs 23

Shipping is the circulatory system of our global economy. And lately, it seems the doorstep is the new mall. Everybody is getting almost everything shipped, and retailers, restaurants, wholesalers, and eCommerce stores need to make sure they are using the best tools to get the job done.

How to Check if Post has Taxonomy Term

Category Image 036

Something I did not know about when working with Custom Post Types and Custom Taxonomies. Normally when checking if a regular WP Post belongs to a specific category, we can use the WordPress function in_category(). But that does not work with Custom Post Types. To check if a CPT belongs to a specific term in a Custom Taxonomy, use has_term() instead.

Check if WP Post belongs to specific category

To check if the current post belongs to a specific category, use in_category(). For example in your theme's single.php template, you can do this:

if (in_category(1)) {
	
	// post is in category with ID = 1
	
}

Here we are checking if the post belongs to category with ID = 1. You can change that to any category ID, name or slug, or an array containing multiple values.

Here is an example where mutliple categories are checked:

if (in_category('donuts')) {
	
	// post belongs to "donuts" category
	
} elseif (in_category(array('coffee', 'beer'))) {
	
	// post belongs to either "coffee" or "beer"
	
} else {
	
	// post does not belong to any of the above categories
	
}

Notice the use of an array in the elseif condition. You can specify as many categories as needed using an array of category IDs, names, or slugs.

Check if CPT belongs to specific taxonomy term

Now for the main point of this tutorial. To check if the current post belongs to a specific term in a custom taxonomy. For example, if we have a taxonomy named download_category and want to check if the current post belongs to the term combo, we can do this:

if (has_term('combo', 'download_category')) {
	
	// post belongs to "combo" in "download_category" taxonomy
	
}

When calling has_term(), the first parameter is the name of the term, and the second parameter is the name of the taxonomy.

To check multiple terms, use an array of term IDs, names, or slugs. For example:

if (has_term(array('combo', 'book', 'deal'), 'download_category')) {
	
	// post belongs to "combo", "book", or "deal" in "download_category" taxonomy
	
}

So this example will check if the current post belongs to "combo", "book", or "deal" in the "download_category" taxonomy.

Bonus Tip: Check for *any* taxonomy term

To check if the current post belongs to any term in a given taxonomy, simply leave the first parameter empty/blank. Example:

if (has_term('', 'download_category')) {
	
	// post belongs to a term in the "download_category" taxonomy
	
}

Here we are checking if the current post belongs to any term in the "download_category" taxonomy.

That's the thick and thin of it.

Bottom line is just remember:

  • Check post for category — use in_category()
  • Check post for tax term — use has_term()

5 Steps for Design Thinking

Featured Imgs 23

What Exactly Design Thinking Mean? Design thinking is both a theory and a procedure, concerned about taking care of complex issues in a profoundly client driven way. It centers around people as a matter of first importance, trying to understand individuals’ needs and encourages successful solutions to address those issues. It depends vigorously on the […]

The post 5 Steps for Design Thinking appeared first on designrfix.com.

I need help with “before insert” Trigger

Category Image 101

I'm trying to create a trigger that does two things, first take an ip that's in dot notation and run inet_aton on it and put the result in another field. Second, checks a lookup table to identify an ip range that the result of the first action falls into and enters the id of that row in the table. Do I have to break this down to separate triggers, a before insert and an after insert? This is a mysql database.

DELIMITER //
CREATE TRIGGER download_ins  BEFORE INSERT ON download 
 FOR EACH ROW begin
   declare vip varbinary(16);
   select `ADDRESS` from `download`;
   vip = inet_aton(`ADDRESS`);
   set NEW.ip_address = vip;

   declare vrefer int(25) unsigned;
   select id
  from `ip_lookup`
  where NEW.ip_address between ip_lookup.start and ip_lookup.end
  limit 1; 
  if vrefer is not null then
    set NEW.refer = vrefer;
  else
    exit;
  end if;
END; //

DELIMITER ;

Thanks in advance

Archived DaniWeb

Featured Imgs 23

Ever wonder what DaniWeb was like way back in the day?

Well now you don't have to guess.

Forums and tags have a new filter in the dropdown to list all Archived topics.

CSS fix for 100vh in mobile WebKit

Featured Imgs 23

A surprisingly common response when asking people about things they’d fix about anything in CSS, is to improve the handling of viewport units.

One thing that comes up often is how they relate to scrollbars. For example, if an element is sized to 100vw and stretches edge-to-edge, that’s fine so long as the page doesn’t have a vertical scrollbar. If it does have a vertical scrollbar, then 100vw is too wide, and the presence of that vertical scrollbar triggers a horizontal scrollbar because viewport units don’t have an elegant/optional way of handling that. So you might be hiding overflow on the body when you otherwise wouldn’t need to, for example. (Demo)

Another scenario involves mobile browsers. You might use viewport units to help you position a fixed footer along the bottom of the screen. But then browser chrome might come up (e.g. navigation, keyboard, etc), and it may cover the footer, because the mobile browser doesn’t consider anything changed about the viewport size.

Matt Smith documents this problem:

On the left, the browser navigation bar (considered browser chrome) is covering up the footer making it appear that the footer is beyond 100vh when it is not. On the right, the -webkit-fill-available property is being used rather than viewport units to fix the problem.

And a solution of sorts:

body {
  min-height: 100vh;
  /* mobile viewport bug fix */
  min-height: -webkit-fill-available;
}

Does this really work? […] I’ve had no problems with any of the tests I’ve run and I’m using this method in production right now. But I did receive a number of responses to my tweet pointing to other possible problems with using this (the effects of rotating devices, Chrome not completely ignoring the property, etc.)

It would be better to get some real cross-browser solution for this someday, but I don’t see any issues using this as an improvement. It’s weird to use a vendor-prefixed property as a progressive enhancement, but hey, the world is weird.

Direct Link to ArticlePermalink

The post CSS fix for 100vh in mobile WebKit appeared first on CSS-Tricks.

4 Sports Blogs That Broke the Mold and Gatecrashed the Mainstream

Fotolia Subscription Monthly 4685447 Xl Stock

Whether you’re a fan of boxing, the beautiful game of soccer, or America’s favorite pastime of baseball, there is a blog out there for you, with dedicated webmasters and writers who have spent years developing and fine-tuning their sites. As a homage to these heroes of the internet, we thought we would piece together a mishmash of some […]

The post 4 Sports Blogs That Broke the Mold and Gatecrashed the Mainstream appeared first on WPArena.

Discoverability with infinite scroll

Featured Imgs 11

How do you handle your link discoverability when also using infinite scroll.

As we know, Google has been ignoring link rel=prev/next for years.

A lot of my older content is showing up with no internal links.

I do have HTML page navigation but its hidden with display:none

Google Patches Critical Vulnerability in Site Kit Plugin

Wp Plugins

In late April Wordfence discovered a critical vulnerability in Google’s Site Kit plugin for WordPress that would make it possible for any user on the site to gain full access to the Google Search Console without verifying ownership. Google patched the vulnerability and released the fix in version 1.8.0 on May 7, 2020.

Wordfence published a timeline of the vulnerability, describing it as a proxySetupURL disclosure:

In order to establish the first connection with Site Kit and Google Search Console, the plugin generates a proxySetupURL that is used to redirect a site’s administrator to Google OAuth and run the site owner verification process through a proxy. Due to the lack of capability checks on the admin_enqueue_scripts action, the proxySetupURL was displayed as part of the HTML source code of admin pages to any authenticated user accessing the /wp-admin dashboard.

The other Aspect of the vulnerability is related to the site ownership verification request, which used a registered admin action that was missing capability checks. As a result, any authenticated WordPress user was capable of initiating the request.

Wordfence identified several ways a malicious attacker might use this vulnerability to the detriment of the site’s ranking and reputation, including manipulating search engine results, requesting removal of a competitor’s URLs from the search engine, modifying sitemaps, viewing performance data, and more.

The security fixes are not detailed in the plugin’s changelog on GitHub. It does, however, include a note at the top that states, “This release includes security fixes. An update is strongly recommended.” Google has not published a post to notify users on the news section of the plugin’s official website. Without Wordfence’s public disclosure, users may not know about the importance of the update.

Google’s Site Kit plugin has more than 400,000 active installs, according to WordPress.org. Details of the 1.8.0 update are not available to users in the admin, since the plugin’s changelog is hosted on GitHub. There is no way for users to know that the update includes security fixes without clicking through to research. Due to the great deal of sensitive information to which attackers could gain access, users are advised to update the plugin as soon as possible.