My new advanced WordPress course: https://www.udemy.com/become-a-wordpress-developer-php-javascript/?couponCode=YOUTUBEDEAL
My new beginner WordPress course: https://www.udemy.com/wordpress-for-beginners-create-a-website-blog-step-by-step/?couponCode=YOUTUBEDEAL
In this lesson we learn how to use page templates and conditional logic to apply different layouts to different WP pages.
To view a complete list of the WordPress lessons in sequential order visit:
http://learnwebcode.com/learn-wordpress/
Link to download .zip of theme files as shown in this video (note: this is not a “complete” WordPress theme yet and this download is only intended for educational purposes to dissect and review):
http://learnwebcode.com/wordpress-page-templates-tutorial/
Sign up for my newsletter to receive periodic webDev tips, tricks, resources and coupons. Join the list at http://learnwebcode.com/
Follow me on Twitter for updates and cat pics:
https://twitter.com/learnwebcode
source
Great tutorial, fantastic channel, keep up the good work.
<?php if (is_page ('portfolio')):
echo "Thank you for viewing our work"; endif;?>
I seldom comment on youtube but i feel that that Disclaimer box's content is static that must come from Gutenberg inputs
I have basically 6 pages including homepage, all have save navigation menu, but their text colour is also same on every page which is what i need to change, as i need to change every other nav menu text color white if its not homepage. I have used condition is_front_page(), but seems css is not applying to all pages except homepage(index.php).
🗽
i've been searching for months something like this… someone who teaches like you!
THANKS
what is the syntax font you are using for coding in your code editor? the letters look beautiful…
Thanks a lot!
Awesome teaching style thank you so much for sharing your tutorial.
I cant use artical tag no matter what, whenever I use it doesn't work. Anyone help please.
Good teacher
very helpful tutorial,thank you sir
how do I set my custom index.php file as home page?
– And now I've got a load of CSS tags to read up on, .. (wonderful tutorials.)
Highly recommended.
from the future .. a lots of think to you
Hey its not working as you showed. I added the templatename.php to the theme folder. When I go to edit the page. I do not see the same in the page attribute. The dropdown is missing. I tried few other videos but I found this is bug is the pervious version of WP.
I am using the WP 5.1.1.
Can you help please?
when I edit page I don;t see option to select template name option.
Instant Wordpess Theme To Match Your Existing Website Design! (view mobile)
World's First Automatic And Online HTML To WordPress Converter. Theme Matcher Uses A Regular Site To Instantly And Effortlessly Create A Matchcing WordPress Theme. This Is The Only Product Of It's Kind @t
I have one big problem and I don't know how to repair it. When I have created some posts by wordpress dashboard I have them in posts list but they don't appear on my web page. Additionally i can't change their appearance by CSS file because I don't even know did those posts exist. Maybe somebody have solution for my problem I would be gratefull.
Template option is missing though i write the code correctly /* template Name : Special Layout */. Does anybody know the fix?
i have real estate website and when i add new properties in page attributes i get parent and in the drop down list of page parent i get a list of recently posted properties instead of menus or pages, how i can edit this parent drop down list
Thank You!…. Great tutorial
Clearfix explanation – if you're like me then you're probably wondering what this block of code is all about and why it will break your layout if you neglect it:
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
To the best of my understanding, this block of code is sort of a little hack to get the CSS layout to behave the way that you think it should. In page-portfolio.php, the first line inserts an empty table before and after the container and the second line prohibits any element from being floated to the left or right of the invisible table. This effectively just keeps the elements that are being inserted by get_footer() from spilling over into your page content. Tables are generally sturdier elements than normal divs for positioning in html/css so surrounding elements are less likely to intrude in their space. As for the last line, I'm not exactly sure how it's functioning in this context, but an asterisk (*) preceding a property is just a CSS hack that will force some older browsers (namely older versions of IE) to ignore a property that they don't support.
I would normally opt to just lay everything out in a table or use the 'display: table' property for my container div to avoid having to add hidden corrections, but perhaps the reason he chose to do it this way in this video is that the markup seems the most quick and intuitive to an html/css beginner and this is a tutorial on WordPress theme development, not the positioning rules of CSS.
If you have anything to add please let me know! I'm still learning too 🙂 Thanks for the videos! I'm a fairly experienced programmer but totally new to WordPress, and they've been immensely helpful.
how to call page id
i cann't understand
Hello. I am unable to output post title and content using the "the_title();" and "the_content();" function. I have created a newf file named page-blog.php which corresponds to the page blog. You kind support in this regard will help me out a lot. Thanks.
You are like Angle to me <3
thank you brother
When I add the page template (page-11.php in my case) the footer goes full-width. Do you know why this is happening? Do I need to create a page template specifically for the footer as well? The video is going great by the way. I just had this quick question. Thanks!
Dear Sir, thank you a lot for all of your massive work and efforts, hope to find PHP learning course sooner, I've tried to participate to your course of "Become a wordpress developer" but I have issues not to complete the payment method because I'm from Syria 🙁 , any suggestion will be highly appreciated. However, I'm subscribed and follow all of your lessons, God bless you.
I'm crying 😥. Wasted a lot of time to understand it. Today, it's totally crystal clear to me. Thanks a million. 👍
in 6:23 how come that footer stayed in same position, i did just like u did and i had to use clear both for footer so it stays in same place.
I love your vids
My box borders and background don't apear anione knows why? copied averithing and don't see any errors
viewed so many tutorials but yours are awesome. Not intimidating, easy and well explained. Thank you.
you are awesome
i can't find default template
Hey Man, you're SICK….that aside…..How do I create different templates for different pages on my wordpress website so that I can use ELEMENTOR to import these templates.Or am I thinking of this in a wrong manner.?
Thanks in advance!
Very informative … Thanks a million …
Thank you so much
Loving your tutorials, great videos and brilliantly explained!!
I have a question on the "disclaimer" text at 10:36 …Supposing a client wanted to change the text in a box like this from time to time, obviously you wouldn't want them messing around with PHP files, so is it possible to include this text as HTML in another page, and include that page inside the box, i.e. like a kind of iframe?
i basically overwrited all my files with yours that were included in a zip file regarding the previous lesson.
But the "small" changes made offscreen arent showing up, its just displaying the website as it was how i written it.
At first i thought somehow wordpress is not connecting my files with the website as it changed nothing when i for example increased font size of the body but when i delete all the files theres no website, so they are indeed connected.
What can be the problem that its not changing anything?
https://topweb3.com/blog-post/impreza-multi-purpose-wordpress-theme/
Impreza – This is an amazing multipurpose theme by WordPress.Peoples are feeling very comfortable with using this theme. there is very clean and editable design can be used for any type of website.
damn, your wordpress tutorials so far are so good. Thanks.
FYI: I wasn't able to change my CSS until I realized that SOMETIMES YOUR BROWSER DOESN'T CLEAR YOUR CACHE MEMORY when you refresh your page. So, although i was refreshing the page, it was still using the previously saved version of the CSS file. I cleared my history and it worked. Hope this helps someone
why does the if statement syntax look so odd. I'm very new to php but I'm used to seeing something like <?php
if ($a > $b)
echo "a is bigger than b";
?>
Hello,
I am following your video, but my wordpress version is 4.9.1 and i don't have Template on Page Attributes.
How can i do ?
Regards
OMG! You're like the best teacher someone could wish for. Great Work!
Another note to quickly find the page ID. If you go to page list and just hover over the pages you will see the URL in the bottom left. Just a quick way of gathering id's
Thank you sooooo much 🙂