for wordpress web design in making blogs and stuff what are the coding languages that I should learn to be able to make my own custom themes and be able to do much more with wordpress
To get started with Wordpress is really easy, you need to know some HTML & CSS obviously, and a little bit of PHP.
The thing is that setting up a template can be done even by someone who doesn't even know much about PHP.
As an example, the famous loop that displays content on wordpress looks something like this:
Code:
<?php while(have_posts) {
the_post(); ?>
<h1> <?php the_title(); ?> </h1>
<?php } ?>
And this will display the titles of all your blog posts, it might look a little bit confusing in the beginning, but by the time you'll get to understand everything quite quickly.
Let me present you another example:
Code:
<html <?php language_attributes();?> >
This is a dynamic way to replace <html lang="en">, after the PHP is processed, Wordpress will dynamically replace language_attributes(); with the specific language that was set in the admin dashboard of wordpress.
Another example would be how Wordpress handles embedding a stylesheet:
In Functions.php
Code:
function example_styles() {
wp_enqueue_style('example-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts','example_styles');
We create a function that stores our line of code wp_enqueue_style which basically calls the style.css file, add_action tells wordpress that in order to hook some scripts like ours, he should look into the function example_styles.
Creating themes in Wordpress is really easy and quite fun, hope you get hooked into it!
