<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amirition</title>
    <description>The latest articles on DEV Community by Amirition (@amirition).</description>
    <link>https://dev.to/amirition</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F48146%2F89b43763-bf7b-4b44-971e-db3f4698b8f5.jpg</url>
      <title>DEV Community: Amirition</title>
      <link>https://dev.to/amirition</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amirition"/>
    <language>en</language>
    <item>
      <title>WordPress config file and what we can do with it?</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Tue, 28 Jun 2022 12:36:14 +0000</pubDate>
      <link>https://dev.to/amirition/wordpress-config-file-and-what-we-can-do-with-it-a9o</link>
      <guid>https://dev.to/amirition/wordpress-config-file-and-what-we-can-do-with-it-a9o</guid>
      <description>&lt;p&gt;&lt;code&gt;wp-config.php&lt;/code&gt; is located in the root directory of your WordPress installation and it contains some important information. &lt;br&gt;
Remeber that before making any changes to this file, create a backup of your website (files + database) pr at least create a copy of the &lt;code&gt;wp-config.php&lt;/code&gt; itself. Also, it's safer if you keep the sample file there and don't delete it. &lt;br&gt;
I assume that you know some basic &lt;code&gt;PHP&lt;/code&gt; and you're familiar with WordPress concepts. &lt;/p&gt;

&lt;p&gt;First of all, when you're trying to create a new WP website, it shows you a installer page like this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fhV9Auki--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a57yyi0g60j0msl2fvk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fhV9Auki--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a57yyi0g60j0msl2fvk3.png" alt="WordPress install step UI" width="795" height="835"&gt;&lt;/a&gt; &lt;br&gt;
I'm sure you're all familiar with it since it's the easy way to create the new website. But there is another way to set this information too. Actually this installer do that nasty work for us. If you open a freshly downloaded WordPress and look into it, you can see that there is no &lt;code&gt;wp-config.php&lt;/code&gt; file, but there is a &lt;code&gt;wp-config-sample.php&lt;/code&gt; and that installer, creates a copy of this file, change the name and then put your information into it. Information like databse name, user and password. &lt;br&gt;
So if you don't want to use the visual installer, or you have some problems opening it, you can do this manually. Create a copy of &lt;code&gt;wp-config-sample.php&lt;/code&gt; and rename it to &lt;code&gt;wp-config.php&lt;/code&gt; and then change this databse information section: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_cjiCAXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oh973tjgcx0406nu8hc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_cjiCAXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oh973tjgcx0406nu8hc.png" alt="Databse info in config file" width="880" height="582"&gt;&lt;/a&gt;&lt;br&gt;
Remeber that it's good to add all of your custom codes, between these two comment lines, except they already have a section in the file: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t2m7I5cQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qnjz28jhlk0lcdbfxme8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t2m7I5cQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qnjz28jhlk0lcdbfxme8.png" alt="Where to add codes in wp-config.php" width="880" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Permissions and access
&lt;/h2&gt;

&lt;p&gt;The default permission for this file is 644 or as might see in other systems, &lt;code&gt;rw-r--r--&lt;/code&gt;. This will only allows the WordPress to change this file and other codes won't be able to do so. In order to keep your website safe, make sure that the file never gete a greater number for the permission. &lt;/p&gt;

&lt;p&gt;Ok, so let's see what is the use of this file? &lt;/p&gt;

&lt;h2&gt;
  
  
  WordPress debug mode
&lt;/h2&gt;

&lt;p&gt;In WordPress, every error is handled the right way via PHP exceptions. For example this is an example of how an error is handled: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6FXiK_zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrqx5mroynh5m7qbrevh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6FXiK_zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrqx5mroynh5m7qbrevh.png" alt="WP Insert Post Error" width="880" height="296"&gt;&lt;/a&gt;&lt;br&gt;
This code was grabbed from &lt;a href="https://developer.wordypress.org/reference/functions/wp_insert_post/"&gt;&lt;code&gt;wp_insert_post&lt;/code&gt;&lt;/a&gt; documentation. You don't see these errors and warnings by default. So make sure that you're on a development or staging website, then turn the &lt;a href="https://wordpress.org/support/article/debugging-in-wordpress/"&gt;debug mode&lt;/a&gt; on to see the errors. &lt;/p&gt;

&lt;h2&gt;
  
  
  Moving folders
&lt;/h2&gt;

&lt;p&gt;A good step to make your site more secure is to move your directories like wp-content, plugins or themes. Most of malwares try to find your content folder and then manipulate some files in that folder. If you change the address, they can still find it, but it would be harder for them. &lt;br&gt;
For moving these directories, there are &lt;a href="https://developer.wordpress.org/apis/wp-config-php/#moving-wp-content-folder"&gt;some constants&lt;/a&gt; that you can use. &lt;/p&gt;

&lt;h2&gt;
  
  
  Do &lt;code&gt;php.ini&lt;/code&gt; things
&lt;/h2&gt;

&lt;p&gt;Sometimes you want to change some things in the &lt;code&gt;php.ini&lt;/code&gt; file, but you don't have access to that file. You can do some of these changes with &lt;a href="https://developer.wordpress.org/apis/wp-config-php/#configure-error-logging"&gt;config&lt;/a&gt; file. &lt;/p&gt;

&lt;h2&gt;
  
  
  All constants
&lt;/h2&gt;

&lt;p&gt;There is a lot of constants that you can change on this file. This is a &lt;a href="https://wp-kama.com/1588/konstanty-wordpress"&gt;good reference&lt;/a&gt; to see a list of all the things that you can change on &lt;code&gt;wp-config.php&lt;/code&gt; file. &lt;/p&gt;

&lt;p&gt;There are of course other things that you can do with this file, let me know if there is any other important and cool one! &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webdev</category>
      <category>wpconfig</category>
      <category>php</category>
    </item>
    <item>
      <title>Reng Player and how it's different</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Fri, 24 Jun 2022 14:32:24 +0000</pubDate>
      <link>https://dev.to/amirition/reng-player-and-how-its-different-49i2</link>
      <guid>https://dev.to/amirition/reng-player-and-how-its-different-49i2</guid>
      <description>&lt;p&gt;A year ago, I was trying to post a podcast on my WordPress blog and at that time, I used default player of the WordPress. It was pretty fast and useful and it got the job done. &lt;br&gt;
But I thought maybe we can get a another player which satisifies me just a little more. &lt;br&gt;
There are a lot of tutorials out there to work with &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API"&gt;Web Audio API&lt;/a&gt; which is a very powerful one. &lt;br&gt;
So I decided to bring some more functionalities and maybe a better design to the audio player in WordPress. This is how it looks like on Gutenberg: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--raOWNf4R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eil8d6g9idut1m5j6by7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--raOWNf4R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eil8d6g9idut1m5j6by7.png" alt="Reng Player admin area" width="827" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This little block player shows a nice bar, audio title and artist and also the cover. I tried to apply the main color of the cover image somehow in the player and I think the details bar at the bottom of the player was a good choice. This is how it looks like on the front area: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4qKkievt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcsif215ugluclmwrgkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4qKkievt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcsif215ugluclmwrgkh.png" alt="Reng Player front area" width="880" height="182"&gt;&lt;/a&gt;&lt;br&gt;
It's very lightweight and responsive and I think adding playlists to it in the future would be a good idea. &lt;/p&gt;

&lt;p&gt;Like this player? It's already available as a &lt;a href="https://wordpress.org/plugins/reng-player/"&gt;block plugin on WordPress repository&lt;/a&gt;. You can install it on your website and give me feedback. &lt;br&gt;
Think this worth your contribution? Then make one &lt;a href="https://github.com/amirition/reng-player"&gt;on Github&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Your Career as a WordPress Expert, Starts at Developer Reference</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Sun, 20 Jun 2021 05:29:39 +0000</pubDate>
      <link>https://dev.to/amirition/your-career-as-a-wordpress-expert-starts-at-developer-reference-20ea</link>
      <guid>https://dev.to/amirition/your-career-as-a-wordpress-expert-starts-at-developer-reference-20ea</guid>
      <description>&lt;p&gt;We're living at the era of video tutorials. You can find a Youtube video containing anything you need, in detail, for your development. While they contain good information, but they're not immune to changes in code reference and also may not tell you the best way. &lt;/p&gt;

&lt;p&gt;As you know, WordPress is open source and it changes all the time. If you write a code today, in a month, it might not be the best way and other approaches may appear in the community. &lt;/p&gt;

&lt;p&gt;You should remember that you can find the best way to do somthing in WordPress, in developer reference. &lt;/p&gt;

&lt;p&gt;I talked in deatial about the developer reference and how you can get the best out of it in this video. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/H-Rzn6JdyCo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  What is WordPress Developer Reference?
&lt;/h3&gt;

&lt;p&gt;In WordPress Developer Reference website, you can find the information about four main sections: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hooks&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classes&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Methods&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In each section and each page, there is information about how you can use the function or class. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete Documentation&lt;/strong&gt; &lt;br&gt;
You can see that what parameters with which type of data this function accepts. You can see that what kind of data it returns. &lt;br&gt;
Also you can see the source code of the function in the WordPress trac. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Contributed Notes&lt;/strong&gt; &lt;br&gt;
A useful part of the reference is where users contriburted to the documentations. This contribution can be writing good code examples, tipping about a common bug or explaining the missed things in the reference. &lt;br&gt;
As a WordPress developer, you can contribute to writing code in the reference too. You only need your WordPress account, some development knowledge and a good problem to solve. &lt;/p&gt;

&lt;p&gt;How did you learned to code? Do you prefer video tutorials or just plain code? Do you read a whole programming book or just read the sections you need? &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>programming</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>WordPress Concepts: Taxonomies and Categorizing Posts </title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Fri, 14 May 2021 18:03:30 +0000</pubDate>
      <link>https://dev.to/amirition/wordpress-concepts-taxonomies-and-categorizing-posts-3hc9</link>
      <guid>https://dev.to/amirition/wordpress-concepts-taxonomies-and-categorizing-posts-3hc9</guid>
      <description>&lt;p&gt;In the previous posts, I wrote about custom post types and action/filters in WordPress. Another great concept that can help you in understanding and developing WordPress themes and plugins is taxonomies. &lt;br&gt;
So basically a taxonomy is something that you classify, categorize or group WordPress post types with. How about an example? &lt;br&gt;
Suppose that you have a website with a custom post type, Movie! &lt;br&gt;
anything about a movie that you can categorize your movies with can be a taxonomy. For example genre, country, award, rate and etc.&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qFhWgCvJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/feg4v2v8htx9xvhemvlc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qFhWgCvJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/feg4v2v8htx9xvhemvlc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the above picture, the IMDB uses taxonomies too. For genre taxonomy, horror is a "term" in WordPress. So every taxonomy has some terms in it. Horror, drama, comedy, sci-fi, and western are some terms for genre taxonomy. &lt;/p&gt;

&lt;p&gt;WordPress has two default taxonomies which we're all familiar with: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tags&lt;/strong&gt; Which are non-hierarchical built-in taxonomies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Categories&lt;/strong&gt; Which are hierarchical built-in taxonomies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can create your own taxonomy and create an archive page for them. Find out how to create a taxonomy for CPT in &lt;a href="https://developer.wordpress.org/plugins/taxonomies/working-with-custom-taxonomies/"&gt;WordPress developer reference&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;How did you use taxonomies in your project? Are tags and categories enough for any project? Tell me in the comments. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to process a heavy request in WordPress</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Fri, 07 May 2021 17:52:35 +0000</pubDate>
      <link>https://dev.to/amirition/how-to-process-a-large-request-in-wordpress-3og5</link>
      <guid>https://dev.to/amirition/how-to-process-a-large-request-in-wordpress-3og5</guid>
      <description>&lt;p&gt;Requests in WordPress and PHP have a limited time to run. I recently had a problem with processing a huge file. What I wanted to do, didn't fit in a single request so I'd done a little research. &lt;br&gt;
At first, I thought about the cronjobs and it was the right solution but you have to just tweak it a little. &lt;/p&gt;

&lt;h2&gt;The Problem&lt;/h2&gt;

&lt;p&gt;I had a CPT and a CSV file, containing the information about every post. Every file had about 1000 rows and 40 columns so it was very big for a single request. &lt;br&gt;
Noticing that one column was an array of remote images that had to be uploaded to my website. When I tested it, only 3 posts were imported and this was not the result I expected.&lt;/p&gt;

&lt;h2&gt;Solution 1: Background Processing&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/deliciousbrains"&gt;
        deliciousbrains
      &lt;/a&gt; / &lt;a href="https://github.com/deliciousbrains/wp-background-processing"&gt;
        wp-background-processing
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      WordPress background processing class
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
This plugin can run your tasks in the background. The full tutorial for using its classes is on their GitHub page. 

&lt;p&gt;What this plugin does is simply saving all the data you need for your requests in the database. Every row contains the information for a single request and then runs a cronjob every 5 minutes that grabs the latest row from the database and runs the request. Sound very simple but yet powerful and with a lot of features. &lt;/p&gt;

&lt;h2&gt;Solution 2: Batch Processing&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/gdarko"&gt;
        gdarko
      &lt;/a&gt; / &lt;a href="https://github.com/gdarko/wp-batch-processing"&gt;
        wp-batch-processing
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🚈 Easily process large batches of data in WordPress. Provide the data, setup the processing procedure, run the batch processor from the admin dashboard. Profit.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
This plugin helps you to do your large requests too. It saves the data in the database and has a user interface! You can go to its page and run the batch and see how many of the requests are done.

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8YNPcint--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/li1pmo1h48i3sd8424qw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8YNPcint--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/li1pmo1h48i3sd8424qw.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But the actual difference is that this plugin does not use cronjob. It just runs an ajax call which in the last row of the database runs. Then at that ajax call, another ajax call runs, and the information about the success or the failure of the previous call shows in the interface. One other thing to mention, you can't leave the page or the process will be paused. &lt;/p&gt;

&lt;h2&gt;My Code &lt;/h2&gt;

&lt;p&gt;So enough theoretical and let's see some code. I went with the batch processing plugin. &lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;As the tutorial on the GitHub page says, you should create an instance of the class but my point was to show you how I handled my file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further Problem&lt;/strong&gt;: One of the major problems I've faced was that my file was so large that even the batch processor couldn't handle the first step of the work; which would be saving the items in the database. So if you're facing the same problem, what did you do to overcome this? &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>ajax</category>
      <category>webdev</category>
      <category>php</category>
    </item>
    <item>
      <title>Freelancing as an extrovert, It's NOT easy! </title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Tue, 01 Oct 2019 09:26:54 +0000</pubDate>
      <link>https://dev.to/amirition/freelancing-as-an-extrovert-it-s-not-easy-5ehm</link>
      <guid>https://dev.to/amirition/freelancing-as-an-extrovert-it-s-not-easy-5ehm</guid>
      <description>&lt;p&gt;Well they say there is two kind of people, the one who likes to talk to people, hate to be alone too much and wants to be surrounded by people and his friends and the one who does not. &lt;br&gt;
I don't deny that everyone needs to be alone sometimes and in the other hand needs to meet people and be in a group but one that defines you as an extrovert or introvert is what you feel or do most of the time. &lt;/p&gt;

&lt;h2&gt;What an extrovert person does? &lt;/h2&gt; 

&lt;p&gt;There are some good things and bad things about being extrovert, we will mention the ones that are related to freelancing. &lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
        &lt;strong&gt;Talking: &lt;/strong&gt;I hate to admit this, but when I'm alone in front of the laptop, I miss talking to someone so much that either I start talking to myself about the work that I'm doing(most of the time it became like a tutorial video) or I seek someone to chat in the social media which is not the best option. 
    &lt;/li&gt;
    &lt;li&gt;
    &lt;strong&gt;Sociable: &lt;/strong&gt;I want to do the work by actual communication, talk to people about the best way in person. If I be alone more than 2 or 3 hours, I can't focus on the work anymore. I'm like a drug addict who needs to inject some communication. 
    &lt;/li&gt;
    &lt;li&gt;
    &lt;strong&gt;Distraction: &lt;/strong&gt;Distraction is a bad thing when you're in charge of timing, financing and doing the actual work. You need to handle all of these yourself and and distraction can be harmful. As an extrovert, I'm enthusiastic about most of the things and imagine if someone texts me for a "thing" or I just caught up in the instagram or youtube loop. 
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So while you might have a lot of traits that make you an extrovert, you might also find yourself sometimes exhibiting traits that are more introverted in nature.&lt;br&gt;
These were my feelings around the time that I'm freelancing and of course you can relate to some of them and not all of them. I sometimes think that should I do somethings that make my freelancing more bearable for an extrovert or should I completely forget about this and change the way I'm doing programming? Or should I just have another job? &lt;/p&gt;

&lt;p&gt;I love the freedom of freelancing, I can work whenever I want, whenever I want and that's great! But as I read somewhere and it was so true, this freedom is a two-edged sword. Most of the time, I take too much advantage of this freedom and drown in my extrovertial activities that I forget I need to work too.  &lt;/p&gt;

&lt;h2&gt;What do I do when I get bored programming? &lt;/h2&gt; 

&lt;p&gt;Yes, I get bored when I'm by myself, coding for more than an hour and nothing is exciting anymore.&lt;br&gt;
First of all, I play the damn music to avoid that terrifying silence. The genre depends on my mood but it never stops. Maybe when I'm in the mood and the music is good, I dance! Maybe I get out and make a coffee, Maybe I chat for a while with most accessible person.&lt;br&gt;
These things make the freelancing more bearable and from time to time, I change my workplace and move to someplace else, Because that's what gave freelancing a meaning; You have the freedom of choosing the place and the time of doing your job.&lt;/p&gt;

&lt;p&gt;But still I'm struggling for finding the best solution. What do you think about this? &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
      <category>productivity</category>
      <category>psychology</category>
    </item>
    <item>
      <title>Wordpress concepts: Post types, The most basic things</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Mon, 09 Sep 2019 06:47:20 +0000</pubDate>
      <link>https://dev.to/amirition/wordpress-concepts-post-types-the-most-basic-things-2bn1</link>
      <guid>https://dev.to/amirition/wordpress-concepts-post-types-the-most-basic-things-2bn1</guid>
      <description>&lt;p&gt;Wordpress came out as blogging platform at the early days. It means that the most basic thing that you can do with the Wordpress is to publish posts. As you may know as a developer, these posts store in the database. They have title, content, some tags, a featured image and all of this stores in the &lt;strong&gt;wp_posts&lt;/strong&gt; of the database. (However, the &lt;code&gt;wp&lt;/code&gt; prefix could be something else)&lt;br&gt;
If you look at this table in the database, some of the notable columns are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ID: &lt;/strong&gt; Which is the primary key of this table and the main thing for you to identify a post.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;post_author: &lt;/strong&gt;Is the ID of the user that created this post(or assigned to be the author of this post) &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;post_title&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;post_content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;post_name: &lt;/strong&gt;This field is different with title, it's actually the slug of the title&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;post_type: &lt;/strong&gt;This is the field that define the post type and create a separate menu for each post type in the amdin. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The posts are the standard post type in Wordpress. Pages and Attachments for example, are custom post types too. You can read more about Wordpress default custom post types at &lt;a href="https://wordpress.org/support/article/post-types/"&gt;this link&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;When and How? &lt;/h4&gt;

&lt;p&gt;CPT is an easy to understand concept. The more important thing is how to use it and when? Maybe it's better to tell you some cases that you can use CPT: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want to create some content with the same functionality as posts, but not posts: This can be portfolio, movie, receipt, testimonial, etc. 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CoU3bb8x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/n9hej02b5gthvnpn8efa.png"&gt;
&lt;/li&gt; 
&lt;li&gt;Your content is not very similar to posts, but it's not that big or individual to create another table for it.&lt;/li&gt;
&lt;/ul&gt; 

&lt;p&gt;Well, to give you an idea to how to create a CPT, first of all, you must know when you should run your code, this is known as action filters. So as you can see in the examples of the &lt;a href="https://developer.wordpress.org/reference/functions/register_post_type/"&gt;WordPress developer documentation&lt;/a&gt;, you can run this code in the &lt;code&gt;init&lt;/code&gt; action.&lt;br&gt;
The full list of parameters are there and if you're developing a theme, you can put the code inside the functions file.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Wordpress concepts: Action and Filter hooks, power and foundation of Wordpress</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Fri, 07 Jun 2019 14:05:31 +0000</pubDate>
      <link>https://dev.to/amirition/wordpress-concepts-action-and-filter-hooks-power-and-foundation-of-wordpress-m90</link>
      <guid>https://dev.to/amirition/wordpress-concepts-action-and-filter-hooks-power-and-foundation-of-wordpress-m90</guid>
      <description>&lt;p&gt;Let me be frank, you can't be a wordpress developer without knowing Wordpress hooks. Now what are wordpress action and filters? There's a lot of good and detailed articles out there about Wordpress action hooks and filter hooks and I'm not gonna repeat what they said before. &lt;/p&gt;

&lt;h4&gt;Some cases to use hooks &lt;/h4&gt; 

&lt;p&gt;Since I'm not gonna write codes at this moment, so I think the best way to clear this concept for you is showing some examples. &lt;br&gt;
&lt;strong&gt;Wordpress Filter Hooks &lt;/strong&gt;&lt;br&gt;
Let's assume that you want to add some text below every post content. Basically you are changing a content, this is what a filter hook means; You can change a content. But how? &lt;br&gt;
Wordpress developer references or old Wordpress codex are great resources, they have all the hooks you need with detailed information and some examples. You just have to search for the right hook. &lt;br&gt;
Back to our example, You just need to search for something like:&lt;em&gt;Wordpress post content filter&lt;/em&gt; &lt;br&gt;
These searches will probably lead you to Wordpress official docs and there you can find some good examples to use it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PXc3LiIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2xh1j90d08hm6j0q9h9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PXc3LiIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2xh1j90d08hm6j0q9h9x.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was the filters, you can use it to change some specific data that the filter defined for. Now let's assume that you are developing a plugin and you want to let people to change some data in this plugin. This is something possible and very standard too, you can define some filters for the data you want and another one or even yourself will be able to hook into that filter and change the data. You can find more about this at &lt;a href="https://developer.wordpress.org/plugins/hooks/custom-hooks/"&gt;Wordpress developer site&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wordpress Action Hooks &lt;/strong&gt; &lt;br&gt;
You want to go straight to the examples or define it with some gibberish words? OK! &lt;br&gt;
You want to be notified &lt;strong&gt;whenever&lt;/strong&gt; a new post publishes on your site. So you want to execute a code when a certain thing happens, right? But how Wordpress knows that when to run your code? &lt;br&gt;
You use action hooks at this cases. Just like the filter hooks example, you should know what action you want to use. Search Wordpress developer site with keywords like this: &lt;em&gt;after post publish action&lt;/em&gt;&lt;br&gt;
Then you got some examples and codes that is very clear and you can understand it. &lt;br&gt;
You can have your own actions too. This way you can open an easy way for the people and of course future you to easily add code in certain places of your code. You can find more about this at &lt;a href="https://developer.wordpress.org/plugins/hooks/custom-hooks/"&gt;Wordpress developer site&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;So, do you think the hooks are the main power of Wordpress? I'll be glad to hear or ideas. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Previous Article:&lt;/strong&gt; &lt;a href="https://dev.to/amirition/wordpress-concepts-series-be-a-good-wordpress-developer-1m3n"&gt;Wordpress concepts series: be a good wordpress developer &lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Next Article&lt;/strong&gt;: Who knows? &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Wordpress concepts series: be a good wordpress developer</title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Sat, 01 Jun 2019 07:05:08 +0000</pubDate>
      <link>https://dev.to/amirition/wordpress-concepts-series-be-a-good-wordpress-developer-1m3n</link>
      <guid>https://dev.to/amirition/wordpress-concepts-series-be-a-good-wordpress-developer-1m3n</guid>
      <description>&lt;p&gt;I'm now developing wordpress themes and plugin for over 3 years and noticed one important thing: Knowing wordpress concepts is as important as knowing php. &lt;br&gt;
When you're using a cms or a framework, you expect it to have some prepared elements for your site. Sidebars, menus, posts, gallery and other things. In wordpress, many of these things are come in ready and those are the things that we call wordpress concepts. &lt;/p&gt;

&lt;h4&gt;What this series is about?&lt;/h4&gt;

&lt;p&gt;I want to write about some core concepts and the things you should know beside the pure PHP to be a good developer. This can help you in coming with an efficient solution when you want to add a feature to your wordpress website or find a problem. &lt;/p&gt;

&lt;h4&gt;For Beginners &lt;/h4&gt;

&lt;p&gt;This series is totally for the people who are in their way to be a wordpress developer and not for the professionals.&lt;/p&gt;

&lt;p&gt;I will try to write every 2 or 3 days and share my best knowledge of wordpress, hope somebody can use it. I will update this post with the links of the articles I publish in this series. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Part 1: &lt;/strong&gt;&lt;a href="https://dev.to/amirition/wordpress-concepts-action-and-filter-hooks-power-and-foundation-of-wordpress-m90"&gt;Action and filter hooks, power and foundation of wordpress &lt;/a&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How about your beast mode?  </title>
      <dc:creator>Amirition</dc:creator>
      <pubDate>Wed, 29 May 2019 14:20:01 +0000</pubDate>
      <link>https://dev.to/amirition/how-about-your-beast-mode-hm9</link>
      <guid>https://dev.to/amirition/how-about-your-beast-mode-hm9</guid>
      <description>&lt;p&gt;We all had times that we needed to do some extra working, stay awake at whole night and not return anybody's call and doing nothing but our work. &lt;br&gt;
I was thinking about the phrase 'beast mode' for a while and how it can be? One thing for sure is that it's different for anybody. My beast mode might include 4 hours work a day and someone else's might 8. &lt;br&gt;
Another thing is I don't think the beast mode is all about the hard work, it needs some brain and intelligence too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LsMJo-Vj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4ck4z0zaah1748w25ux1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LsMJo-Vj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4ck4z0zaah1748w25ux1.jpg" alt="Beast mode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  My beast mode
&lt;/h4&gt;

&lt;p&gt;I want you to think about your beast mode too, every single one of us has inner capabilities that he never (completely) used. It can take days, months or years for everyone to find out about what he can do to make his work efficient. I wanna list some of the things that are part of my beast mode: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not getting distracted by social media &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;a href="https://www.juststand.org/blog/prevent-eye-strain-with-the-20-20-20-rule/"&gt;20 20 20 rule&lt;/a&gt; to prevent eyestrain and have more energy &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If I'm working for the next hour, I just think about that work and nothing else and if I'm going out and having fun, just enjoy it and don't think about the work. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change my place every often (like every hour). Trust me, this one really works. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set a short goal for every time session that I work. Like if I'm gonna code for 30 minutes and rest for 2 minutes, I finish a function(ality) in that 30 minutes(or do my best to).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At least code for 4 hours a day. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the right drink at the right time(coffee, tea, juice, beer, etc)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is my list so far, every time I hit a new one, I try to test it and then add it here! &lt;/p&gt;

&lt;p&gt;Do you think the word 'beast' has some negative meanings? I mean it's not that good to compare our self to a beast to a beast and try to act like it and go on its mode, but admit it, the phrase is kinda cool though. &lt;/p&gt;

&lt;p&gt;What are your beast mode features? &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
      <category>productivity</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
