"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
Wednesday, February 26, 2020
Research Indicates That Attention Spans Are Shortening
[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Zia Muhammad via Digital Information World
What is a PHP File?
In this quick post, we’re going to discuss the ins and outs of a PHP file. If you are a novice to PHP programming, this article should help you to understand various aspects of a PHP file.
PHP is a server-side scripting language which is mostly used to build web-based applications. These may range from a very simple blog website to a full-fledged eCommerce website for selling products online. In fact, PHP is one of the most popular server-side scripting languages, with a very healthy market share.
So when you start learning PHP programming, the first thing you should do is make yourself familiar with .php files.
What Is a PHP File?
When it comes to learning the PHP scripting language, you'll be creating and coding files with the .php extension. So what exactly is a PHP file?
Generally speaking, a PHP file is a plain-text file which contains code written in the PHP programming language. Since PHP is a server-side (back-end) scripting language, the code written in the PHP file is executed on the server. The PHP engine on the web server converts all the code written in PHP to HTML, so the resulting web page contains only HTML code when it’s sent to the client side for rendering in the user browser.
In fact, a PHP file may contain a plain text, HTML tags or code as per the PHP syntax. When you access any PHP-based web page, the request is sent to the server where the PHP code is interpreted and executed by the PHP engine. The PHP code is converted to HTML and it’s merged with the other plain text and HTML in the file. Finally, the completed HTML is sent to the client after the page executes.
If you view the source of any PHP file in a browser, you’ll never see the original PHP code in it, since it’s already executed and converted to HTML by the server.
That's an overview of how a PHP file works, In the next section, we’ll see an example of what a PHP file looks like.
Structure of a PHP File
In this section, we’ll quickly go through the structure of a PHP file. Let’s have a look at an example PHP file:
<?php echo "<b>Hello World</b>"; ?>
In the above example, the code which is wrapped by <?php
and ?>
tags is a PHP code. And as we discussed in the previous section, a PHP file may contain code other than PHP, and it may be a plain text or HTML tags. The code which is wrapped by <?php
and ?>
tags is executed on the server side. In the case of the above example, the output looks like following after PHP code execution.
<b>Hello World</b>
In fact, the structure of a PHP file may look like:
<?php //PHP code ?> <div>other HTML tags</div> plain text <?php // more PHP code ?> <p>more HTML</p>
So as you can see, a PHP file can mix code, HTML, and plain text.
The short_open_tag
Tag
In the previous section, we saw that the PHP code is wrapped by <?php
and ?>
tags in a PHP file. However, the php.ini
configuration file provides a directive named short_open_tag
which allows you to use a short form of PHP’s open tag.
If you enable the short_open_tag
directive, you can wrap your PHP code between <?
and ?>
instead of <?php
and ?>
, and it’ll work perfectly. You can set this and other directives in the php.ini configuration file. I explain how to find and use this in another post.
There is one catch—if you use the short open tag, you need to be careful when combining PHP code with XML code, since the syntax of the opening XML tag <?xml
may create issues and that XML code would be detected as PHP.
In fact, it’s considered as a best and recommended practice to avoid using a short form of PHP’s open tag.
And with that, we’ve reached the end of this quick tutorial. I hope this post has helped you to understand the basics of a PHP file. You can learn more about PHP programming in the courses and tutorials here on Envato Tuts+!
-
WordPressLearn PHP for WordPressRachel McCollin
-
PHPHow to Use PHP in HTMLSajal Soni
-
PHPWhere Is php.ini, the PHP Configuration File?Sajal Soni
The Best PHP Scripts on CodeCanyon
CodeCanyon is a marketplace for plugins and scripts. You can explore thousands of the best and most useful PHP scripts ever created on CodeCanyon. With a low-cost one time payment, you can purchase these high-quality WordPress themes and improve your website experience for you and your visitors.
Here are a few of the best-selling and up-and-coming PHP scripts available on CodeCanyon for 2020.
-
PHP14 Best PHP Event Calendar and Booking ScriptsKyle Sloka-Frey
-
PHP10 Best PHP URL Shortener ScriptsMonty Shokeen
-
PHP12 Best Contact Form PHP ScriptsNona Blackman
-
PHPComparing the 5 Best PHP Form BuildersNona Blackman
-
PHPCreate Beautiful Forms With PHP Form BuilderAshraff Hathibelagal
by Sajal Soni via Envato Tuts+ Code
Preloader Style 258
The post Preloader Style 258 appeared first on Best jQuery.
by Admin via Best jQuery
Range Slider Style 60
The post Range Slider Style 60 appeared first on Best jQuery.
by Admin via Best jQuery
Reddit releases 2019 transparency report: Highlights its effort to maintain content standard
[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Saima Salim via Digital Information World
Why Facebook And YouTube Creators Trust Group Chats More Than Partner Managers?
[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Aqsa Rasool via Digital Information World
How to Use WordPress
If you’ve just set up your first WordPress website, or you’re thinking of doing so, you might be wondering just how you use WordPress.
How can you create a website with WordPress? How do you get your site looking the way you want it to? How do you add content and extra features?
In this article I’ll answer all of those questions. I’ll show you how to set up a WordPress website, how to install a theme for the design, how to install plugins to make your website work the way you want it to, and how to create and manage content.
So let’s get started!
How to Create a Website with WordPress
If you want a WordPress website, you have two options:
- A site hosted on WordPress.com. With this model, you add your site to the existing network at WordPress.com and choose the plan that’s right for you. You can get a free site, but features will be very limited.
- A self-hosted site, sometimes called WordPress.org. This is a site you install on hosting space you buy from a hosting provider. The WordPress software is free so you only have to pay for hosting. You’ll find you get much more flexibility with this model, and the site is yours; it doesn’t belong to the people at WordPress.com.
In this article, I’ll focus on self hosted WordPress sites, but there are some elements (such as how you add posts and pages) that are relevant to WordPress.com too.
So once you’ve decided to create a self hosted WordPress site, you’ll need to do two things:
- Find a hosting provider and sign up for hosting.
- Install WordPress on your hosting.
You can install WordPress in one of two ways: using an auto-installer your hosting provider gives you (which is the easier way); or installing WordPress manually (which is slightly more reliable). If you’re new to creating a website I recommend using an auto installer.
We’ve created a guide to installing WordPress: follow that if you haven’t already got your site set up.
Discount for Self-Managed Hosting With SiteGround
If you decide to go with a WordPress.org site, take a look at SiteGround. It comes with an easy installer, free support, and automatic updates. We're happy to be able to offer a huge discount of 70% off self-managed WordPress hosting, thanks to our partnership with SiteGround.
The WordPress Admin Screens: An Overview
Once you’ve created your site, you’ll be confronted with the WordPress admin screens.
The menu on the right leads you to the main sections:
- Dashboard: the main dashboard, which acts as a shortcut to the rest of your site. You can also update themes and plugins from the Updates page in this section.
- Posts: here’s where you add posts. I’ll explain how you use posts shortly.
- Media: the library for all of your media uploads, including images, file attachments and video.
- Pages: add static pages to your site here.
- Comments: manage comments that people make on your posts.
- Appearance: configure the way your site looks, with a theme, widgets, menus and the Customizer.
- Plugins: install and manage plugins, which add extra functionality to your site.
- Users: add more users to your site, who can access or create content depending on what level of access you give them.
- Tools: tools such as the importer for if you want to import content from another website, and other tools that might be added by plugins.
- Settings: configure the site’s settings. I’ll look at these in more detail shortly.
When you install plugins, you’ll find that some of them add extra items to the admin menus. Some will add more items to the existing menus, and some (increasingly, these days) will add a new main level menu item. These will appear at the bottom of the menu (or at the top in the case of the Jetpack plugin, which gives your self hosted site the same features as a WordPress.com site).
Take some time to explore these admin screens and see what they do. You’ll find they make more sense once you start adding content and installing plugins, which we’ll come to shortly.
How to Use a Theme for Your Website’s Design
Every WordPress site needs a theme. This is the code that determines how your site looks, and how it displays your content.
When you first install WordPress, the default theme will be installed and activated for you. At the time of writing, this is the twenty twenty theme: there’s normally a new theme every year.
Sticking with the default theme will make your site look just like millions of others, so it’s worth changing it. There are thousands of great themes our there, and many of them are free.
You install a new theme by going to Appearance > Themes. You can then activate themes in this screen, but I recommend doing it via the Customizer (Appearance > Customize). If you use the Customizer, you can preview what your theme will look like before you activate it.
You can install as many themes as you like and try them out. But you can only have one activated. If you want a theme with more flexibility, you might prefer to buy a premium theme from a provider like Envato. Premium themes tend to have more widget areas, more options for navigation and layout, and more customization options.
The Best WordPress Themes on ThemeForest
While you can do a lot with free themes, if you are creating professional WordPress sites, eventually you will want to explore paid themes. You can discover thousands of the best WordPress themes ever created on ThemeForest. These high-quality WordPress themes will improve your website experience for you and your visitors.
Here are a few of the best-selling and up-and-coming WordPress themes available on ThemeForest for 2020.
-
Inspiration15+ Best WordPress Portfolio Themes for CreativesBrenda Barron
-
WordPress Themes23+ Best Responsive WordPress Themes (For Sites in 2020)Brenda Barron
-
WordPress Themes20+ Best Coaching & Consulting WordPress Themes (2020)Brenda Barron
How to Install Plugins for Extra Functionality
Once you’ve got a theme, you might be thinking about plugins. Plugins are code you add to your site that adds extra functionality. But don’t worry: you don’t actually work with the code. It’s all done in the admin screens.
You might be wondering why WordPress doesn’t come with all the features you need out of the box, but it’s more efficient to keep the core software lean and then add what you need.
To install a plugin, go to Plugins > Add New. From here you can choose from popular plugins or search for plugins with specific features. Click the Install button to install a plugin and then the Activate button to activate it.
Once you’ve installed a plugin, you can manage it from the Plugins screen.
Here you can update plugins, deactivate and activate them, and delete them if you no longer need them. It’s wise to keep your plugins up to date as any updates might be to improve security.
There are a few plugins I always install on a new WordPress site:
- A backup plugin
- A security plugin
- A performance plugin
- A SEO plugin
Installing plugins like these will make sure your site is secure and fast, and that people can find it. Learn more about installing plugins in our guide.
The Best WordPress Plugins on CodeCanyon
You can also find top-quality professional WordPress plugins on CodeCanyon. These plugins come with free support and lifetime upgrades, and can help take your site to the next level.
Here are a few of the best-selling and hot new WordPress plugins available on CodeCanyon for 2020.
-
WordPress24 Best WPBakery Page Builder (Visual Composer) Addons & Plugins of 2020Daniel Strongin
-
WordPress17 Best WordPress Slider & Carousel Plugins of 2020Daniel Strongin
-
WordPress20 Best WordPress Calendar Plugins and WidgetsDaniel Strongin
-
WordPress Plugins25+ Best Popup & Opt-In WordPress PluginsDaniel Strongin
How to Add Posts and Pages
You’re probably itching to start creating some content.
In WordPress, there are two main types of content:
- Posts. These are your regular updates, your news items or blog posts. This is the content you would expect people to come back for updates on, and that you would share in your social media channels.
- Pages. Static content that doesn’t change much over time and is rarely added to. This will include your ‘About’ page and your ‘Contact’ page, as well as pages detailing your services.
You can also add custom post types to WordPress if you install specific plugins. For example, an e-commerce plugin like WooCommerce will add a ‘product’ post type. That will appear in the mind menu and you’ll use it to add all your products.
To add a post, click Posts > Add New. This takes you to the editing screen.
In this screen, you use blocks to add content. Types of blocks include:
- Paragraphs
- Lists
- Headings
- Images
- Galleries
- Buttons
Some plugins add extra blocks you can use: for example a forms plugin will add a form block so you can add a form to a post or page.
You can learn more about posts and pages in our free Beginner's Guide to WordPress course.
Assigning Categories and Tags
You can also add your post to one or more categories, or assign tags to it. You’ll find these on the right hand side, in the Document pane. Below is an example from one of my own websites.
Categories are useful for organizing your site; think of them as sections. You can add categories to your main navigation menu and then people can find posts on a given topic. Or they can go to the main blog page and see all of your posts, with the most recent shown first.
Tags are lower level: you wouldn’t use them for navigation, but for adding an extra layer of metadata to posts. The best way to access tag archives is via the Tag Cloud widget, which you can add to your site’s sidebar or footer.
Adding Metadata
You can also add more to your post, including a featured image and an excerpt. These will be displayed on your main blog page where all of your posts are listed, or on other archive pages such as a category or tag page. Below you can see an example from my own website.
Publishing and Editing
Once you’re happy with your post, you can preview it using the Preview button and publish it using the Publish button. You can also schedule it to be published in the future by changing the publication date; the Publish button will change to a Schedule button.
Creating pages is almost exactly the same as creating posts. There’s just one difference, and that’s that pages don’t have metadata like an excerpt, featured image or categories. And to create a page, go to Pages > Add New.
You can edit your posts and pages at any time, even after they’ve been published. Just click on Posts or Pages and then select the post or page you want to edit. Make the changes and click the Update button.
How to Edit Your Site’s Settings
So now you’ve got some content; it’s time to tweak the settings for your site. You do this via the Settings menu.
Settings you can edit include:
- General: things like the site name, domain name and strapline.
- Writing: defaults and emailing-in posts (which I wouldn’t recommend).
- Reading: specify whether your home page will list all your blog posts or will be a static page. If it’s a static page, you’ll need to create that page and also create an empty page to hold all your blog posts. If you choose to show all your blog posts on the home page, you don’t need to create the page: WordPress will do it for you.
- Discussion: configure security settings for comments.
- Media: set the default image sizes.
- Permalinks: enable pretty permalinks here, which will make your URLs look nicer and improve your SEO.
- Privacy: set up your privacy policy page.
If you’ve installed some plugins, you’ll probably find you have a few extra options here. Take some time to look through the Settlings screens and get things working the way you want to.
How to Add Menus and Widgets
There’s a lot to think about when you’re getting to grips with using WordPress to manage your site, and you’re not done yet.
Once you’ve created some posts and pages and installed some plugins, it’s time to add a navigation menu and some widgets.
The navigation menu is essential: without it, people won’t be able to get around your site. And widgets will give your site visitors extra content or navigation that they can access on every page of the site.
You can create as many navigation menus as you want by going to Appearance > Menus. One of the will be your primary navigation, and you can use others in the Navigation Menu widget to display extra menus in your sidebar or footer.
You can also add as many widgets as you want (although I would caution going overboard). Widgets let you add snippets of content to every page (and post) in your site, including:
- Navigation menus
- Call to action buttons
- Forms
- Lists of posts
- Category lists
- A tag cloud
This is just a tiny section of what’s available.
How to Manage Your Site
Once you’ve created your site and added content to it, your job isn’t done. You’ll need to manage it on an ongoing basis.
This will include:
- Keeping the software up to date: both WordPress itself and your themes and plugins.
- Adding new content on a regular basis.
- Dealing with any security issues (which is why you install a security plugin).
- Working on your SEO to get more visitors (hence the SEO plugin).
- Sharing your content via social media and other channels (which you can automate with a range of plugins).
Keep on top of your website, and it will work harder for you. A stagnant site will drop through the search engine rankings and may become insecure. Make sure you manage your site regularly and it will be an asset to you or your business.
Summary
Working with WordPress isn’t as difficult as some people will tell you. Once you’ve installed the software and got to grips with the admin screens, you’ll be able to quickly add content and configure your site settings.
And over time, you’ll see your content expand and your visitor numbers grow. Enjoy!
by Rachel McCollin via Envato Tuts+ Code