I am welcoming back today, Yaron Brooke, who is chairman of the Einrand Institute and host of the Yaron Brooke show. This is number four in a series of discussions produced in partnership with the Einrand Institute. We've talked about Einrand and Objectivism. We have discussed capitalism. We talked, we tried to talk about welfare, but we ended up talking about a lot of other things as well that I think were very interesting. Let's maybe now start to tie in some of the principles you've been talking about and I've been talking about into politics in 2019, maybe starting with what's most immediate around us. What would be the Einrand Objectivist interpretation or critique of something like the Trump doctrine philosophy to the extent it exists and administration? Well, I would say the main critique of Donald Trump would be that he doesn't have one. That is, he doesn't have a doctrine of philosophy. Donald Trump is a narcissist and a pragmatist. He is completely focused on what he thinks will work tomorrow for him in some emotional sense. I'm not even sure how he perceives for him. There is no strategy, there is no policy, there is no agenda long-term and this certainly isn't an agenda that's consistent with Objectivism. There's no real sense in which this administration is pro-free markets. Yes, there are a few areas where there's some deregulation going on, but compare that to raising tariffs or to trying to do what is often called managed trade or even industrial policy where Donald Trump will call up the CEO of a company and say, no, no, you can't close that plant or you can't move that plant to Mexico, which is a complete negation of my view of free markets where the president doesn't get involved in business decisions. And I don't even consider that policy. Like I said, when that happened, that is not even if you like what he did, that's not really a policy that could be extrapolated to the entire country. That's just him calling someone and basically saying, take some money to change your mind. It's him wanting to be the CEO of the country. And I don't believe the country needs a CEO. We need a president who is dedicated to protecting us and to freeing us up because I think we're very unfree as we discussed in previous episodes. And I'd like to see a president loosening the restraints, freeing us up now. So I liked the corporate tax cut. I think that's the one thing that he did, which was good. I liked some of the deregulation, although I think it's too little and too insignificant. But the corporate tax rate was good. But if at the same time you spend like a drunk as salient, there's no tomorrow and you've got to running trillion dollar deficits, I mean, it doesn't matter how much you cut taxes. I believe government shrinking is a stimulant to the economy. It actually increases economic activity. It's not cutting taxes. It's less government spending, which stimulates the economy. So again, this is counter to many of the neo-Kinzians out there and many of the corporate ones. But I believe that the way to get the economy to grow at 45% is to get the government to shrink dramatically. First shrink spending, then shrink taxes. But corporate tax cuts, okay, they were insanely high. And indeed, I wish they would be simplified. I don't like the fact that he left all the exclusions and deductions and loopholes and all that stuff. I, you know, I want taxes on a postcard for individuals and for corporations, flat and simple and as close to zero as humanly possible. So let's explore that a little bit because there's a lot there. So of course, I completely reject the idea that you can cut your way to prosperity, but let's not focus on that because we're trying to interpret the Trump doctrine to the extent that it exists. You talked about keeping us safe. I think that this is an interesting question mark because over the last 20 years or maybe even longer in the United States political dichotomy, the right has talked a lot about how the left are, they feminize the left. They won't keep us safe. They won't use the military.  I'm curious where your framework would interpret that because what I see is that, okay, maybe the left will grow the military slightly slower than the right will, but that basically everybody who's had a serious shot at being president over the last many decades is going to listen to what the generals say and are going to have a very similar policy on national defense. The difference may be how many proactive wars of choice do they get involved in? I think that's probably right for most people on the left. I'm not sure, you know, I haven't really dug into Bernie Sanders, uh, foreign policy and I'd be suspicious of it, but it's hard for me to say. But certainly there was very little difference in foreign policy between Obama and Bush, although there was a difference in emphasis. Bush believed that America should lead. Obama believed that you needed to form consensus and America should follow. You saw that in Libya, I disagree with all of them. I mean, again, like in every area, I, you know, I believe the entire spectrum is wrong. I think none of none of the parties actually engaged in what is truly an American self-interest and I have been very critical of American generals and American military in terms of the way they fight wars and in terms of their doctrines. And I do not believe America needs to have troops in 120 different countries. I don't believe that that makes us safe. I don't believe that. But I do believe in fighting wars when you have to the differences. I believe in fighting wars where you crush the enemy, you really devastate them and then you come home. I don't believe in wars that build democracies. I don't believe in sticking around. I don't believe in rebuilding after the war. So, you know, again, an objective is font policy is a very different font policy than the consensus left and right. But it does sound, Iran, like under that standard, I mean, are there any military engagements from the last 40 years that would be OK under that umbrella where, because again, if the focus is on no coercion and non-aggression and all of these things, I'm having a hard time thinking of recent military engagements that were truly necessary under that rubric. So I would have been, and I ran, was against Korea, was against Vietnam, very much against Vietnam. And I would be against pretty much all the other wars with the exception of they had to be a response post 9-11. And indeed, I believe, and we at the Anduin Institute advocate for response well before 9-11 because we thought that the violence coming out of Islamism or jihadism or whatever you want to call it, had started well before 9-11 and had to be dealt with. And it was the appeasement of Jimmy Carter, Ronald Reagan, and every other president afterwards that basically made 9-11 possible. But they had to be a response. I think the response that existed was the wrong response. Well, it was the wrong country, right? It was the wrong country. It was the wrong country. Iraq was irrelevant. The only two countries in my view that are relevant for an ongoing war, which I think exists today. I think the jihadists are still alive and well. ISIS, you know, maybe has been crushed for now, but we'll resurrect in a different form somewhere else. The only two countries that matter in this fight are two.  And the second is our best friend, which is Saudi Arabia. I think those are the two countries that matter. Those are the two countries we should have in a sense declared war on after 9-11. And we should have dealt with pretty thoroughly at the time. I think because we didn't, these issues faster and will faster and will faster for a very long time because we haven't dealt with the people who fund and ideologically support and encourage these ideas and these actions on behalf of all these other groups that that actually do the violence. Is there a country right now that you would say is the closest to in its form of government and in its application of government, uh, closer than the United States to Randy and Objectivist philosophy? I mean, it's, it's a hard question. I mean, bottom line is no because, because I think every country in the world right now is so far away from my conception of government. There's certainly countries today in the world that are moderately, moderately freer than the United States, uh, not much, but moderately so, um, you know, whether it's and here I hear the problem is you've got social freedoms and economic freedoms and they sometimes clash. Yeah. So Singapore might be a little economically freer, but it's less free on social issues. I don't like it. Right. Hong Kong. We know what's happening in Hong Kong. So I certainly don't want to raise Hong Kong, but certainly Hong Kong before the Chinese took it over, I think what it was closer than the United States. But again, not consistent. New Zealand today in, in certain aspects, but so inconsistently and, and so often for the wrong reasons that no, you know, there's no country in the world today. And, and look, it has to be the United States in this sense. And, and I think the constitution is flawed. I know, I know that's horrible to say. And people said, you know, that's great to say. And certainly people on the right will come after me for saying the constitution is flawed. My favorite document, really my favorite political document in all of human history is the Declaration of Independence because it lays out the foundation and the structure and the purpose of government. And the purpose of government is to protect individual rights, and that's it. And it's that they say that is the purpose for which governments are instituted. And only America has that moral foundation. Only America has that foundation that in the, even at the beginning, it didn't fully, obviously, execute on because of slavery and other things, primarily slavery, which is a big deal. It didn't execute on, but it has, it has that seed of we understand that there's such a thing as rights and government is there to protect them. No other country has that. You know, Japan has it because MacArthur put it in the constitution, even though they didn't want it. But I don't know that they understand it. American culture has that. So I think I've always thought that it's America that's going to move in that direction of any country ever does. I've I've I've reconsidered that position because America's got so far away from my conception of what a good country should be. And in the presidency of Donald Trump has made me far more pessimistic about America than I ever thought I would be that that maybe it'll happen somewhere else. But there's no indication that that somewhere else is imminent. So there's any country moving in that direction today. So let's explore why that is. I mean, one of the arguments that anti socialists will often make is listen, everywhere it's been even sort of tried has been a disaster. And there's a reason why you don't see any great socialist successes today. OK, let's apply a sort of similar idea to Randy and objectivism and the conception of government that you have. What are the forces that have prevented it from taking hold? And is it possible that every time some element of government starts going in that direction, it doesn't go super well? And that's why we've not seen it. No, it's exact opposite. Ah, every time every I mean, and this is the difference between the socialist argument about it's never been tried perfectly. And our argument is different. Socialism to the extent that its practice always fails. And we can talk about examples where you think it hasn't. And I'm fine with that, right? Capitalism to the extent its practice has always succeeded always. And we could go through example after example. It always succeeds only by the standards you apply for success, which I and many others would take a big issue with. So let's start. Let's just apply success as something simple. Economic growth, wealth creation. Now, that's not the only standard. It's not the only stand for me, right? But let's just take one, one standard, that being it everywhere it's tried, it produces economic growth way above any other system and it creates wealth. And I will even add to that the poor are better off everywhere. It's tried every place. It's tried every continent. It's tried every time it's tried. Now, the problem with capitalism is not that it doesn't succeed. The problem with capitalism is it's not that it doesn't create wealth. It does. Hong Kong being a fantastic example of the United States in the 19th century. The whole industrial revolution being a fantastic example. The problem with capitalism is that we don't have a moral foundation for it. It goes back to our discussion, you know, from a few shows back. The fact is that people don't believe that it's OK to be self-interested. And capitalism is a system of self-interest. Look, capitalism is absolutely unequivocally about individuals pursuing their self-interest as consumers. We all want to buy the stuff that makes our life better. And as producers, we all want to produce stuff that will make us rich or that we love producing, we enjoy producing. It's not about social well-being. It's not about the common good. It's not about any of those things. It's about people pursuing self-interest. Unless you have a moral foundation for self-interest, which other than Ayn Rand and Aristotle, nobody has ever presented one. It falls flat. So even the founding fathers, even knowing the founding in the declaration, they say, you have an inalienable right to pursue happiness. They still, though, believe morally, if you look at the Jeffersonian Bible, if you look at what they write about morality, they still are bought into Christian morality. They still believe that the purpose of life is self-sacrifice and the purpose of life is still, to some extent, the idea of sacrifice and social well-being. So even Adam Smith, great wealth of nations, writes, you know, the baker doesn't bake the bread for you. He bakes the bread for himself. So self-interest is what drives the capitalist economy. But then he says, but self-interest is not a good thing. We don't like self-interest. It's kind of yucky, right? It's not a virtue. It turns out, though, he says that if you add up all these vices, it is an invisible hand that turns it into a virtue. Nobody buys that. Nobody buys that if everybody commits vices, there's a virtue at the end of the rainbow. What I try to convince people, certainly what Ayn Rand tried to convince people is, no, the very pursuit of self-interest, done rationally, done long-term, is virtue. And that's essentially what capitalism is about. So I think capitalism is rejected because of guilt, because of morality, because of... But what about those needy over there? How do we help them? And we don't take the long-term perspective. We don't let them rise up by themselves through the market system. I think that's the problem, not any failure within capitalism to actually produce the goods. Well, so it is a very... That is a parallel explanation to what the... And I'm not a socialist. What the socialists would argue, you just disagree that they're actually telling it as it is. They would disagree that you're telling it as it is, right? I mean, it is a very similar line of reason, though. By any standard, by any standard, they can pick the standard they want. They have failed every single time they've tried it. And the more consistently socialist it's been, the greater the failure. In capitalism, the exact opposite has occurred. I can pick 20 different standards, life expectancy. Any standard of human well-being. The more you try capitalism, the more it's been successful. And we can objectively go look. We can look for life expectancy in Hong Kong before capitalism, after capitalism. We can look at life expectancy in the Soviet Union before communism, after communism. OK, but the problem with that is, the problem with that is there were, even if we grant, as we have to, because it's the truth, even if we grant that you saw the life expectancy increases coincide with the introduction of this pseudo capitalist system, it is now reversing that there was an initial... There was low-hanging fruit to be gained. Angus Deaton, I know I've mentioned him before, writes about this as well. We're now seeing life expectancy for many groups in the US actually start to go back down. One group and only one group, and the causes are pretty well known, and the causes that are completely caused by the mixed economy, by the statist element. That is the two things that are killing middle-aged white men. And that is where the life expectancy is going down. And I've read Deaton's paper on this, right? And the causes are the opioid epidemic. And you could argue about what caused the opioid epidemic, but I would argue to a large extent, it's the FDA and socialized healthcare. They're part of socialized healthcare. We haven't noticed that, I disagree with, but okay. Medicaid and the guidelines that doctors have as a consequence. And second, it's suicide rates. And I think there's no question that in the United States, there's a massive number of people who feel disenfranchised, that feel alienated from the culture and from the economic reality of the country. They've been promised certain things that have not come reality. And we can talk about why that is and there's a lot to talk about there. I think it's an interesting topic. But it's why Donald Trump got elected. It's why I think Bernie Sanders does so well. It's the really people who feel disenfranchised and they wanna smash things. They want somebody to think new. And many of those people, unfortunately, the same people taking opioids and the same people committing suicide. And that's the driver. And then add to that a very unhealthy lifestyle that Americans engage in. But if you abstract from that. Yeah, but you're on. I think that it's a little bit unfair to mention opioid and suicide and then throw in and some people live an unhealthy lifestyle when actually that is one of the primary causes of a ton of the preventable conditions. And it is arguably directly related to lack of regulation, the so-called capitalist system that you say needs to be put in full force. We can't minimize that. It's exact opposite. It's completely the consequence of statism. It's a consequence of government-run schools. It is the consequence of a food pyramid that has given people bad advice for 40 years. We've talked about that, yeah. Talked about that. It is a consequence of coddling people. It's a consequence of letting people believe that if they were born in Ohio, they can always live in Ohio and there'll always be a job in Ohio and manufacturing is coming back to America as if it ever left. It didn't. It just was replaced by machinery and computers and robots. And it's giving them false hope. And instead of getting in a car and driving to where the jobs are and there are plenty of jobs in America today, they sit there waiting because they were promised.  I think that cultural problem is primarily caused by too much government regulation, too many government promises, too much government involvement and a loss of what I consider the American spirit, which is bootstrapping yourself, even when you're poor, figuring out a solution, going to where the jobs are. It's hard. I'm not saying it's not hard. It's very hard. But that mentality, that attitude of kind of really going and getting that I think has been destroyed in America by really since the New Deal, by offering people, this goes back to welfare state, by offering people goodies to stay home and not be ambitious as ambitious as they otherwise could be. Yeah, I mean, as I pointed out, the goodies are very, very, anyone who would be satisfied to say these goodies are going to be my livelihood is on a very far end of the spectrum. But because you're mentioning the goodies, this maybe is a good opportunity to raise Scandinavia. So you have asserted during our talk here that the closer a country goes to actual free market capitalism as you would decide it, the more freedom people have, the more prosperity there is. I think we would probably agree, although you'll have plenty of an opportunity to disagree, that in Denmark, Norway, Sweden, and Finland in general, there is a tighter business regulatory environment as we would see it. And yet, and I'm preparing for the counter talking point on that. And yet, and there is a stronger social safety net and there are taxes that are robust and can cover the programs they've determined they wanna have. And yet those countries still score very well in terms of the business environment. Those countries score very well in terms of happiness. They score very well in terms of standard of living. So they seem to have reigned in the degree to which they are total free market capitalists, but yet they are doing very well. So I would encourage you to look into the data. Sure. Because I don't think that's true of Scandinavia. Most of what you said is true. I'm not gonna question it, but one ask. Most of it's pretty good. Most of it's pretty good, yes. Yes. We'll get to that. Okay. And one respect I think is false and it's an important respect because I think it makes all the difference. On government regulation of business, Scandinavia regulates far less than the United States. Depends on the country. Certainly Denmark and certainly Sweden. Norway is a special case because of oil and I'd rather just put it aside because it is a special case, but Norway and Sweden, sorry, Denmark and Sweden, which I know less about Finland, those two countries, have a much more robust free market in a sense, if you will, than the United States has. It's easier even in places that have high union membership. It's even easier to fire an employee, much easier to fire an employee in Sweden than it is in the United States. Certainly that it is in California. It's easier to start a business. It's quicker, faster, easier, smoother to start a business in Scandinavia than it is in the United States. The main way in which the United States and Sweden and Denmark differ is that Sweden and Denmark have higher taxes and they redistribute much more wealth. There is much more of a welfare redistribution of wealth. I think here it's important, because I made the point on socialism, to do a little bit of history. So indulge me for a second. Sure. Before 1870, Sweden, and I'm gonna use Sweden because it's the one I know, but I think it parallels to other countries. Sweden was the poorest country in Europe. I mean, literally it was massive poverty. A lot of Swedes left Sweden and that's why we have a lot of Swedes in the United States, which I'll get to later. Between 1870 and about 1950, maybe 1960, Sweden had the most capitalist economy in Europe, arguably, maybe even in the world. It had more capitalism, more freedom, less regulation, less redistribution of wealth, no real welfare state, or very little welfare state. Certainly in the early days, increased a little bit towards the end. Then any other country in Europe, and it was the richest country in Europe, had many, many large corporations. It was an incredible success story. In 1960, around 1960, somewhere in the 50s, they switched to socialism. And they took it more seriously in the 60s and 70s than they do today. They regulated, they nationalized. They took over the means of production, which is what socialism advocates for. They nationalized the means of production. And they basically turned Sweden into a relative by European standard poorer country. It lost its industrial lead. It certainly, it was not anywhere near the richest country in Europe. And by 1979, I liked the joke, but it's not a joke, it's a reality, that the biggest business, the most income-producing business in all of Sweden, was the rock group ABBA. And the second biggest business was Johann Borg, who then left to Monaco and took away all his tax money from Sweden. Sweden was a mess, was a disaster. And indeed, in 1994, Sweden was on the verge of bankruptcy. It was the Greece of Europe. And then since 1994 to today, whether the left or the right is being in power, they have reduced regulations. They have, for example, established school vouchers. They have increased business freedom. They have even decreased the welfare state, still robust, but they've decreased the welfare state. And, you know, they've had just as many right of center governments as they have left of center governments. And indeed, in most of these countries now have right of center governments because of some of the problems socialism created there. So they came back to prominence, became rich again, if you will. And now you're being used as models by the left in the United States as they become more capitalist. Okay, but also, okay, fine. So you've laid out your framework. But I have to tell you, my reading of the history is just completely different than what you're saying. And we can't, we can't possibly both be right. But what you've just presented runs completely counter to my recent reading of the history of the Swedish economy. The Swedish, hold on, let me give you my understanding. The Social Democratic Party of Sweden, which is basically what we would consider like a social, social Democrats in the United States. It's capitalism with significant social safety net redistribution, redistribution, et cetera. It had its golden era from the late 20s, early 30s for many, many decades during which you just described that they were one of the most capitalist countries. That is not at all the history that I understand. It was strongly socially democratic. I then am, I'm aware of the decline of that contingent of sentiment in Sweden. But that's been a decline that's been, as I recall from around 2006 forward, not lining up at all with what you're talking about. And even still they've been modest declines, not what you described. So my understanding of the history is just totally different. So I would suggest looking at one number. I mean, you might disagree that this number is representative of one number. Look at the percentage of government spending as a percentage of the economy from 1870 to today. And I think you'll start seeing a shrink from 1994. I think you'll start seeing it explode in the 1960s and not in the 1920s. Okay, I don't have that in front of me. That may be. That's a good number to look at. And by the way, the same thing in 1994 is a good number to look at Canada. Canada in 1994 starts shrinking government spending as a percentage of the economy. It's reversed lately. But those were years in which a lot of countries that experimented with socialism kind of redirected their efforts. Let me say one other thing about Sweden and Denmark. Swedes and Danes who live in the United States and there were a lot of them in Minnesota and Wisconsin. A richer, buy a lot, it's not even close. Live in bigger homes, drive nicer cars and all of that. Just as happy, just as happy if not happier. Just as healthy, life expectancy is just the same as they are in Sweden. So I'm a little suspicious of happiness studies. I come from a family where admitting to be happy is suspect. I think certain cultures treat happiness differently. Well, yes, if you've ever been at a Shabbat dinner, you would know that that is a... You all complain all the time. And if you're not complaining, there's something wrong with you. So, you know, the culture has a big part of it, but there being studies about this. What are Danish immigrants? How did they do in America? Now, granted, there's a bias there because certain people immigrate. Yeah, there's a self-selection bias because someone who's coming from those countries is coming from a different economic starting point. Acknowledge, very hard to control for self-selection bias in these kind of studies.  And if you look at how rich Sweden is in Denmark, isn't... I know wealth is not the only factor, but it is a factor. Sweden and Denmark would score on a GDP per capita adjusted for cost of living somewhere in the 40s in terms of if they were states in the United States. They're far from being the richest. They're far from the mean. They're significantly below the mean. So I don't know why we should strive towards that. Yes, there's less inequality, but there are costs to having less inequality, which means less wealth, less economic growth, less economic success.  Yeah, but I think a lot of those statistics maybe are a little bit... They maybe don't inform us deeply about what we're really trying to evaluate because in the United States, a lot of the impressive numbers in terms of income are driven by relatively few people that are earning a lot, a lot of money. I mean, that's just a mathematical reality. I'm not passing judgment on it yet. You can control for that. You can look at medians. Okay, but I think that there's... The same thing when you look at medians, it's just, if it's not true that it's driven that way, that is... It's absolutely true. But let me get to my point. Even if we disagree on that, you're on. I think what's important to consider is if you... We need to somehow account for the positive societal impact of there being less inequality. The positive societal impact of people not having to worry about, I need to choose my job based on whether I can afford the health insurance premium based on how much they pay and how much I pay and knowing that you're never going to go bankrupt if you get sick. There's a lot of these things that have significant value to one's happiness. So I don't think it's good to discount the happiness stuff that don't necessarily show up in GDP per capita. So again, I think if you look at Swedes and Danes here, they're just as happy as over there, and here they face the threat of bankruptcy because of healthcare, whatever. So I think you can control for all that. But look, I think it's exactly the other way around. I think that protecting people from the downside, that giving them this robust safety net is actually destructive to their own self-esteem, to their own ability to thrive, not just to live. Yes, if your standard for living is just surviving somehow, then yeah, welfare state's great, right? But if your standard of living is to live, which is my standard of living, to live to the full extent that a human being can. And I believe, and I believe, and I know a lot of people disagree with me on this, but I believe that every human being on the planet has the capability of living. And I don't wanna discriminate based on where they come from or based on any aspect, or based on how wealthy they happen to be at a given point in their time. I want everybody to have the opportunity, psychologically, morally, and in reality, to fully live their lives to the full extent possible. And I think these societies become mediocre, they become dull, they aggregate everybody to the median, and long-term, and granted, a long-term is a long-term, as Kane said, well, dead in the long-term. But in the long-term, I don't think those models are sustainable, and I think you're seeing some angst in America, but you're also seeing some angst in Sweden. I'm not sure you'd wanna move to Sweden right now. There's a lot of political angst, there's a lot of political upheaval, there's a rise in what I think both of us would think is a really bad, kind of white-leaning nationalism in Sweden, which is really, really bad and has lots of reasons for it, including immigration, that it's not limited to immigration. There's a lot of negative consequences to these robust welfare states that I think affect individuals, but more important, but also affect cultures as a whole and the long-term viability of those cultures. And let me just say this, and I know it's unfair because we're about to close, and there's no time to argue about it, but I think that the more socialized you make America, not socialism completely, but the more socialized you make America, the less production you have here, the less innovation, the less progress, the less new ideas, the less breakthrough stuff will happen and everybody in the world will suffer from it, including the Swedes and the Danes because the fact is that most innovation happens here not by accident, not because we have better genes, not because of anything like that, but there's still marginally in certain parts of our economy, like a little bit in healthcare and much more in technology, more freedom here than anywhere else, and we are carrying on our shoulders the rest of the world. And when the United States become more socialized in healthcare and everything else, everybody in the world will be worse off. Well, my audience knows I vehemently disagree with that, but to go back a little bit, I think you're right that I want everybody to have the opportunity to truly live and not just exist, as you suggested. I believe that most people have that drive and thus welfare programs are not going to serve to dissuade very many people to continue pursuing that. I mean, listen, when I was in college, I worked at the now defunct circuit city chain and at a certain point in when they were, just before they went bankrupt, they laid off a bunch of people and I was one of those people and I was able to collect unemployment for I think it was like 39 weeks or something like that. I was in school, I knew that this was part of a path to eventually doing something else and the money merely allowed me to continue what it was that I was driven to do, which is get my education and eventually become an entrepreneur and start a radio show and a TV show and all of this stuff. There was, it's certainly possible that someone with that unemployment money might have said, this is great. I just want this for as long as possible. I think it is a tiny fraction of the population and I think most people will be driven to achieve regardless of getting a little help along the way. I think people affected by the incentives that they get. If you tax something, you get less of it. If you subsidize something, you get more of it. And yes, you're right.  But beyond that, I've already argued that I think the whole issue is immoral that is taking money from me and giving it to you for unemployment insurance is immoral. You were living off of me without asking my consent and that I think is wrong and immoral. But you chose to move here and work, right? And add to that, yeah, and work and work to have my money taken from me but somebody else. Knowing there are taxes. Just to come here to live off of welfare because I think that would have been wrong. I came here to work and to make a living for myself and create wealth. But I also think that again, we're comparing a mixed economy to a mixed economy and I know this sounds strange to your audience but I have no doubt in my mind, really no doubt that in a capitalist system, there is so many job opportunities that you don't need that unemployment insurance that took a city year would be shutting down and there'd be five other people trying to hire you because in every case again, in every case where capitalism has been tried, there are more jobs than there are people. That is why capitalist countries draw in massive amounts of immigration and status countries, nobody wants to move there because there are jobs in capitalist countries and they're more and more and more and more jobs and the more technology, the more robots, I'm here to tell you, there'll be more jobs, not fewer jobs. So I think capitalism creates an awesome amount of jobs. Then again, there's any simple economic argument for it because we let people have invest and save and make a profit and that's what creates jobs. It's not government that creates jobs, it's not welfare that creates jobs, it's not consumption that creates jobs, it's investment, production, savings that creates jobs. So the more you- So demand has a pretty big role to play as well. Demand, look, you could drop any human being in a mall, demand is easy. Demand is uninteresting economically. Demand should not be studied in economics- No, but demand doesn't mean wanting stuff. Demand in the economic sense. Yeah, but wait, so here's the point about consumption and production. In order to consume, what must you do? Put aside the welfare state, what must you do? You must work and if you don't work because you're getting welfare, somebody else had to work in order for the money to be taken from them and given to you. So behind every single act of consumption, there is production that created the money so you can consume.  So for every one act of consumption, there are many, many, many acts of production. Indeed, there is no such thing as consumption without production. We first, you know, human beings before capitalism, we grew the food that we ate. That we produced and we consumed, that's it. It's only when we started having division of labor and we started to have a capitalist economy, we started actually being having a surplus where we could actually go and consume. But the surplus is created from production. So unless we focus on the production side, economics is a bogus science and indeed today it has become, in my view, a science of charlatans. And I'm serious about this. Well, there's some bad economics being taught, but I would argue it's a lot of the neoclassical stuff, but we probably would not agree on what it is that's not good. The modern monetary theory, the Keynesian stuff, and much of the monetary stuff, much of the monetary stuff. It's just not true, it's not how the world functions. And you hear this consumption drives the economy. It doesn't, guys, to consume you have to produce and produce and produce. So what we should be focused on is maximizing production. So look, I don't believe in equality of outcome. I don't even believe in equality of opportunities because I agree with Paul Krugman that equality of opportunities is a form of equality of outcome. I believe in maximizing opportunities. And I believe in equality before the law and equality of rights, of freedom. And I believe in maximizing opportunities. And the system that has proven itself throughout history, and if it was practiced today, would blow your mind that maximizes opportunities for all of us.  And to me, the greatest injustice is to the ambitious poor, the poor in the inner cities who can't find a job because the jobs don't exist. Why? Because we've driven them out of existence through state intervention. And of course, have given him a lousy education through state intervention. Well, a very different perspective for many in our audience from Yaron Brook, who's the chairman of the Einrand Institute and host of the Yaron Brook show. I think we did find some, maybe not minor but moderate points of agreement in some way on a few things. There's maybe the way that I would sum it up. Yaron has been really great having these conversations with you. Absolutely, it was just fun. Thanks for having me on.


So I'm here today to talk about theming WordPress. Just to give you a little intro onto who I am, I am Beth Tucker Long, I'm from the US. I'm a PHP developer, I run a consulting firm, so I do a lot of various types of projects, including a lot of WordPress, Drupal and so on. So WordPress theming is a big part of what I do. I'm also a stay-at-home mom, so I work from home while I stay at home with my kids. I'm a user group leader, I run Madison PHP. And I also participate in mentoring and apprenticeship programs. And if you have ever thought about being a mentor or being mentored, come and talk to me afterwards. I'd like to get you hooked up with PHP Mentoring or another mentoring program depending on what you want to be mentored on. But mentoring is really an amazing thing. I've learned so much from being mentored, but almost even more so from being a mentor to other people. It's an amazing way to help someone else but also grow yourself at the same time. So I'm fine with questions at any time. These lights are really bright, so I can just barely see you all. So if you do have a question, feel free to raise your hand and wave it around a little bit so I can see you. But feel free to ask me questions at any time. So getting started, why am I up here? Well, let's start with a very typical story that happens pretty often in my daily life. So once upon a time, we decided to switch to WordPress or your business decided to switch to WordPress. Marketing picked out a theme. Everybody loved it. It was working great. It's perfect. It has all the features we will ever want, right? Oh, except then, all of a sudden we've decided we have a new campaign coming out and it's centering around the color purple. So now just for a couple of days, we wanna change these titles to be purple. Okay, fine. So we make a little tweak to the theme. Now the titles are gonna be purple. Well, we really liked the purple. So we're gonna keep the purple and now we wanna move this up. We wanna move some things around. We've changed the menu. We've tweaked the colors. Oh, now it's perfect again and we love it. Oh, but look, a security patch has come out for the theme that we were using.  We wanna apply the patch. We apply the patch and all of our beautiful changes, well, beautiful being subjective there because those were just quick changes I made for this example, but all of our beautiful changes are gone. Now, what's happened is, because we were making changes directly to the base theme, when we applied the patch, those changes were overwritten. Making changes directly to your theme is not an upgrade safe way to do it, but there is an upgrade safe way to do it and that's by creating child themes. There are other benefits to child themes as well. If you're using a child theme instead of creating your own from scratch, you don't have to code it all yourself. There is a lot of little fiddly stuff that goes into a complete WordPress theme and why write it all yourself if someone else has already done it and you just have to tweak it?  It also means that someone else is actively working on new features for your theme alongside you, so there are more new features coming in that you don't have to build. It's also another set of eyes on security. As much as we all like to think we're really good about monitoring the security and testing our things, we get busy, we have other work to do and having someone who is actively working on the theme or a team of people for open source themes who are testing the security and applying security patches for you is really a helpful thing. So it gives you a little bit more security as well. It can also be really helpful with meeting accessibility and mobile guidelines. Again, there's a lot of accessibility guidelines out there and there are a lot of accessibility experts who do a great job of making sure that themes can match that. So let the experts do their thing and then you can take advantage of their expertise. So there's a lot of different things you can do with a child theme. You can modify the page templates to change the layout. So you need one page that looks different from the rest. You can create that custom page template to look exactly how you want. You can create new widget boxes, new menus. You can create different sidebars if you want or remove all the sidebars. You can do different things. You can even change the upload size for the images. So WordPress gives you the three default sizes for inserting images when the users come in. If you want to have different sizes, you can program those in so that the rest of your team who may not be as tech savvy at adjusting images before they upload them can now have the defaults built into WordPress. So how do we get started with a child theme? The very first thing you want to do is you want to make sure the theme you're using is not already a child theme. When you're going through the theme directory on WordPress here, you can see over the download. This is on wordpress.org in their theme search. You'll say it says this is a child theme of one line light. So if you're already using a child theme, we can still create another child theme of that, but we'll get to that a little bit later towards the end of the talk. So initially, you probably want to start out with a theme that is not a child theme itself. Makes things a little bit simpler. You also want to make sure you're starting with a clean copy and the latest version. A lot of times, people want to start a child theme, but they've already started tweaking the base theme. And that gets really messy the first time you have to upgrade the base theme after you've created your child theme. So you want to make sure you start with a clean slate.  You can name it whatever you'd like. I'm fond of calling it whatever the original theme is dash child just because it makes it really easy to tell which theme it's a child of. But really, you can name it anything you'd like. So inside your themes directory, create a directory. And now we're going to add a style sheet. Now, an important thing to note with the style sheet. The style sheet for the child theme is going to be loaded after the style sheet for the parent theme. So your styles will be loaded last, which is nice. Your styles will then overwrite any of the parent styles as long as you use the same name. And so it's a way that you can modify those parent styles. Now some themes use inline styles directly in the code or in the templates. And your style sheet will not overwrite those because obviously the inline styles are going to take precedence. So those we can get to when we talk about how to update the page templates. But anything in the style sheet you'll be able to overwrite with your style sheet. There's a set of headers that you need at the top of the style sheet to help identify this as a child theme for WordPress. So you give it a name. Again, the name can be anything you want. And this is going to be the name that shows up at the very top when you go into appearance and you're choosing your theme. This is the name that's going to show up there. So unless you're making your theme public, you don't really have to worry about it too much. The theme URI, again, it's not really that important what you put in here unless you're going to be marketing your child theme. So you can generally just put in the theme where you're installing it or leave it as example.com. The description, again, is more if you're advertising it on wordpress.org. That's the little description paragraph that shows up. You can put that here. The author information is whatever you'd like it to be as well. So these things are not overly important what you put in there if you're just using this privately. But if you do ever intend to put it live, that's when those things become more important and when they become public. Otherwise, nobody will see these. It is important though that your header block be unique compared to other themes out there. So you want to try to make sure you've customized it a little bit so it's not too much the same as others. Now the template line here is where it starts becoming important what you put in. The template is going to be the parent themes directory name. Now most parent themes use their directory name as their slug for everything. But you can also double check if you look in the style sheet for the parent theme, you can see what their template is called as well. But generally it's gonna be the directory name. Version and licensing again are not too important. One handy thing though with the version is that it can help with caching issues. So if you need to bust the cache and make sure your new styles get out right away, you can increment the version number. If you don't include a version number, it will default to the current version of your install of WordPress. And so then your style sheet version will match the version number of your WordPress install and so it will increment every time you upgrade WordPress. But like I said, if you use your own numbering system, you can force it to refresh the cache which is really handy. The tags here, these tags are actually from a pre-approved list of tags from WordPress. I've included the link here. So you can't just type whatever you want in for the tags, you should choose off the customized list. It doesn't cause an error currently if you type in something that's not on the approved list, but always a good idea to follow the rules just in case the next version complains. And lastly, the text domain. This is another thing where you can sort of make up whatever you'd like. It's a good idea to make it as unique as possible, but unless you're using internationalization or multiple languages on your site, this text domain doesn't really come into play. The second file we need to add to our child theme is going to be a functions file. So it's gonna be called functions.php. Now the functions file is loaded in a different order than the style sheet. So the function file is going to be loaded first, and so it's loaded in addition to the parent themes functions file. What this means is that if you wanna overwrite one of the parent themes functions, you can't do it by just putting in a function with the same name because the parent theme will be loaded after and it will overwrite your function. So what you wanna do is make sure you give the themes in your functions file customized names to prevent them from being overwritten by the parent theme. I will say as a side note, there is a way for your parent function to check if your function exists first and then not overwrite it if you've already created it, which is a really nice thing for theme developers to do, but most don't do that yet. So you can check your parent theme and if it has an if function exists, call then it will not overwrite your function. But like I said, you can't count on that and you never know if the next upgrade is going to include that. So I think it's a safer idea to just make sure you have a unique name. So in our functions file here, you can see we're enqueuing the styles. Now you may see things online that say to use at import in your style sheet to pull in your child theme, but that's no longer recommended and it's no longer recommended because what happens is browsers with the functions here when we enqueue them will load multiple resources simultaneously. However, if you're using an at import statement in your style sheet, it has to load, parse and execute your style sheet, then it will load, parse and execute the import line. So you can actually almost effectively double the amount of time it takes to load your style sheets in your resources. So this is much faster. At import currently still works. No guarantee that that will work going forward, although WordPress is pretty picky about backwards compatibility always working. So in theory, it will work for a very long time, but this is a better way to do it. So I'd recommend doing it this way. Just know that you'll see a lot of tutorials online that still tell you to do it with the at import line. So now you know what that's for. So what we're gonna do here is we're gonna enqueue the styles. So you can see we have the WP and Q style.  So I've given my function, I just called it my theme and Q styles. You can call your function whatever you'd like. Again, it's a good idea to have a unique name so you don't run into any conflicts. Generally the best practice is to call it your child theme name, underscore and Q underscore styles just for consistency. It makes it really obvious to everyone else what that function is doing. But again, you can call it whatever you'd like. Here's where you define the parent style. Again, this is what's going to match what's in your parent themes in Q styles call. And it's most often going to be the same as the directory name for the parent theme. But you may wanna double check their function call just to make sure, because not all of them match. Here's where we're actually gonna pull in the parent theme style. And now we're gonna pull in our child theme style. So you can see we just called it child style. Again, you can call it whatever you'd like.  And then here's where we're going to list the parent style as a dependency. It's a good idea to always list your dependencies though these last three items are optional. So you don't have to list the parent theme as a dependency. This again gives you a version number if you'd like to version your theme to make sure if you need to get the cache to refresh or anything. And again, this will default to your WordPress version number if you don't assign it. And then you can also assign media like print, screen, et cetera. It defaults to all or you can specify it. And really, that's about it. Well, kind of. We at least have a child theme at this point. So at this point, if you went back into your WordPress admin panel, you'd see for instance, if you had tribal was your base theme, here's our tribal child theme that we just created. You'll notice that it doesn't have a preview image yet. That's pretty easy to add. At least once you've got your child theme up, just take a screenshot of it and then add it to your root child theme directory and call it screenshot.png and it will automatically populate that for you. So once you've activated it, you should be able to go through and everything should here at this point look the same because we haven't made any changes to the styles or the functions or the templates yet. So any of the style changes we wanna make now we can put in our style, our child theme style sheet. Functionality changes again are gonna go in the functions. And if we wanna change any of the templates, we can do that as well. What we do is you can create a new template by just creating a name of some kind. If you wanna replace one of the parent templates, say you wanna overwrite the header file or the footer. So what you would do then is you copy the file from the parent theme into your child themes root directory or match the directory structure of your parent theme and it will override the parent file. In the template file, if you're gonna create a new one, pretty much all you need to do is give it a template name in a comment at the top, following the WordPress commenting format. And one thing to note, when you're making your template files or in your function calls and things like that, there are two different ways to get the path to the files on the server. There's get style sheet directory and get template directory. And these oftentimes get confused because they're very similar with a key difference.  Get template directory is gonna be the root directory of your parent theme. So it's important to make note of that. So if you're having some issues with something not changing when you think it should change, it may actually be calling the parent file instead of your child file if you're using get template instead of get style sheet. Now, if you need to add JavaScript to your child theme, which is a very common thing to need to do, there's a couple of different things you should do. First of all, it's a good idea to always place it in a separate file. That's considered best practice. It's not necessary. It's not enforced at this point, but it is considered a best practice to keep it in a separate file. And then you'll just need to go through and enqueue that file. So again, here we're just enqueuing just like we did with the other files. This time we're using enqueue script instead of enqueue style. And we put in, this time we're adding a script from the parent theme, so we're using the template directory. And then we can give it a version number. Now the true or false at the bottom, the last parameter there. If it's set to true, it will load the JavaScript line in the footer instead of in the header. If it's set to false, which is the default, it will load in the header. So depending on where you want it to load with the DOM, you can have it load in the header or the footer of the page. Especially when including JavaScript libraries, check to see if it's already included first. WordPress includes a ton of JavaScript libraries already, so chances are it already includes one. It may not be the version you want, but it may already be included. And this is a link to the complete list of what's included. Now a common thing to need to do is to get rid of one version of a JavaScript library and load a different version. Say you need a newer version than what WordPress has by default. It's always a little dicey on registering a library and choosing your own version of it because WordPress may complain, but depending on how much testing you've done, what you can do is you can use deregister and DQ to get rid of an older library, and then you can register and enqueue your own version of the library instead. So you can actually get all of WordPress to use a different JavaScript library if you'd like. For the admin panel, you mean? Yeah, you can re-theme the admin panel as well with the libraries. I believe it does it just in your theme, and you'd have to also do it in your admin panel. Like, you'd have to do a function to do it in the admin panel, but I'm not positive on that. I've never tried to change it in the admin panel, so. Yeah. Okay, so when you're starting with your parent theme, a couple of things to do, you want to, let's say they've come out with a new security patch. So we have our child theme, everything's working great, but we need to upgrade the parent. What you want to make sure you do is back up the parent theme and the child theme. Every once in a while, parent themes will upgrade something, and it's going to break something in your child theme. So you want to make sure you have that backup of the parent themes so you can roll back really quickly if you need to. Not all theme developers keep older copies of their themes, so that's why it's a good idea for you to have a copy of it just in case. It's a good idea always to compare the upgrade notes to see what they've changed. Sometimes they change how you call things, sometimes they've changed certain functions that maybe you've customized a step further, and so making sure you know what they changed can help you make sure your child theme is ready for the upgrade as well. And the last step I always run is I run a diff on the old theme versus the new version of the parent theme because their release notes don't always tell you everything they've changed, and sometimes innocuous changes that they've made may make a big deal to your code base. So I always run a diff on those files, any files that I've customized, so any of the template files or the style sheet and things like that just to make sure I catch everything that they've changed. A couple of other tips. When you are creating your child theme, document everything really well. Give everything consistent but unique names. Again, do not use at import, and I do have a link to a blog here where Konstantin did some time tests on things so you can see that it is faster to use the in queue. And I like to start with a starter theme. If you don't have a theme already in place, let's say you wanna create one from scratch. There are starter themes which are not designed to be used as a theme on their own but provide a really good solid foundation for you to build your child theme on. So they do a lot of the heavy lifting on the WordPress side of things for you, and then you can customize things from there. Foundation Press is a really good one. It's very, very mobile first. It's built on the Zerb Foundation 6, I believe right now framework. And so if you need a mobile friendly website, they've built this mobile first, and so your child theme is already almost done as far as mobile readiness, which is really handy. Divi is really helpful as well. Divi comes with a really awesome GUI customization panel. So if you have, say, another team at work who needs to make changes to the colors and the styles of your theme and you don't wanna have them contact you every time they wanna make a style change, you can base your child theme off Divi which has a GUI admin panel where they can change the colors for the various header items for the links and those kinds of things. And also gives them a place to add in their own custom styles where they don't actually have to interact with the style sheets on the back end. So you can give your users a little bit more accessibility for making their own changes without contacting you but still keeping your code sort of insulated from them. There are also ways to automate child themes.  So there's a couple of plugins here. Child defy me, child theme creator and child theme configurator. The last one is a paid plugin. The other two are free. And these two are very helpful plugins but there are three versions behind now so they're considered fully outdated and no longer supported. However, they both still currently work so maybe they'll be updated soon. But the one click child theme will basically create a base child theme off your current theme and then you can just tweak it. So it does a lot of the like in queuing and the base stuff for you so you can really save a lot of time with that. The child theme check goes through and checks what you've changed compared to the parent theme. So it gives you a quick rundown of all your customizations that are different from the existing parent theme and that can be really helpful when you're getting ready for an upgrade. It sort of automates those diffs for you.  However, not in a traditional child theme way. So WordPress out of the box, they call them grandchild themes because it's the child of your child and grandchild themes are not supported out of the box by WordPress. So in theory, you can create a child theme and list your other child theme as the parent and maybe about 40% of the time that'll work. But you never know when it's gonna stop working and you never know at what point in your site it's gonna stop working. So you really need to do some heavy extensive testing if you're gonna do that. But luckily there is another way to do that and we can do that by using a plugin instead of a theme to create our grandchild. So what you do is find a unique name for your plugin. It's really important with plugins more so than themes even to make sure that your plugin names are all very unique. So go ahead into your WP content folder into your plugins folder and we're gonna create a folder for our plugin. We're gonna create a PHP file which is basically gonna be our functions but doesn't have to be called functions. In fact it's most commonly called the name of your file or the name of your plugin.php. And then in that PHP file we're going to put in this header block. So this header block is gonna look very similar to the one we put into the style sheet. You'll notice that we're giving our plugin a name, we can give it the URI and the description again. Once again these are not real important unless you're planning marketing your plugin on like the WordPress plugin site. If it's just gonna be a private plugin to do your theme then it's not super important what you put in there. Version number again helps with caching, the author information, the license and so on. The text domain again is gonna help with internationalization that's gonna be helping with multiple languages. And the domain path here is where you're gonna specify where your plugin, like the name of the folder for your plugin. After that we're going to, because we're doing a theme here, we're gonna enqueue our styles. So again we're gonna make a function, we can call it whatever we want. I tend to stick with the theme name underscore add styles as my function name. And you can see we're registering the style and then enqueuing it and then we've got the action to actually activate that. You can do templates as well this way so you can overwrite the templates via the plugin. What you'll do is you'll create a templates directory in your plugin. You can sort of leave them all in the root directory but it can be kind of messy with the automatic loading of them. So I strongly encourage you to create a separate templates directory when you're dealing with plugins versus themes. Copy over the templates you wanna change into there. And then you'll need to add a function in your PHP file to include those templates. So here we're gonna double check if the file exists in our templates directory, then we're gonna use that instead of the one in the parent theme or the child theme. So we will do our grandchild theme over the top of that. Okay, so to give you an idea, I'm gonna pop out of this for a second and we'll see how this works. There we go. Okay, so here is a sample child plugin and a sample child theme. So we'll start with the child theme and let me see if I can make this bigger. There we go. Is that readable? Okay, so here you can see I have a super simple child theme and I've based it off the 2016 base theme in WordPress. And all I've done is I've assigned a color to the background and then a color to the background of the main content area. So here I am making the background or the body background blue and the content background green. It's a very exciting child theme. I have my screenshot.png here so it will display a preview of it. And then in my function, since I'm not doing anything too exciting in this child theme that I've created, oops, it didn't keep the larger font. You can see here that I'm in queuing my styles and assigning the version and then I am activating it. So not super exciting, but it is a child theme and let me... Okay, so here is the 2016 theme and you can see now if we come into the dashboard, we're gonna go under Appearance to Themes. Here you can see my demo child theme and you can see the green and the blue preview because we added that screenshot. So I click Activate, back over here. And now our child theme is active. So I know it's lovely, isn't it? I'd like to point out I'm a programmer, not a designer. Yeah, but if anyone would like to hire me for design, you too could have this lovely child theme. Okay, so, but now let's say we wanna modify this child theme. Say this is a professional child theme. Use your imagination, right? So we've created a plugin here. So you can see I have my Beth Child plugin, also very cleverly named. So you can see I have, make this a little bit bigger here, I have my header block here at the top and then I've created the templates directory and I've activated that. So if we overwrite any of the templates, that will work. And then I've enqueued my styles here and then in my style here, I have very cleverly just swapped the colors so it will switch from blue to green. So now if we go back here, oops, go back here. So now we're gonna go under Plugins and so here you can see my Beth's cool grandchild theme plugin that I made. And I just click Activate and now if we come back over to the site, you'll see now we have a green background with blue content on it, very exciting. So you can see it is possible and actually relatively easy to make a grandchild theme. You just can't do it in the standard way of a normal child theme. Now let me see if I can switch back to this. More plugins, you mean? You can, the hierarchy starts getting messier the deeper and deeper you go. So you have to be more and more and more careful with how you do things and how you reference things. But it is possible.  Please don't, yeah. So, okay, so for example, WooCommerce is a very, very popular e-commerce platform and I have a lot of clients that use WooCommerce and a lot of them have purchased a theme for WooCommerce. Now themes for WooCommerce are child themes based off WooCommerce's storefront theme. Then they want to modify that but we don't wanna lose our upgradeability especially on an e-commerce site. We really, really wanna make sure that we can upgrade with whatever security patch they come out with instantly. So that's one time, like I used grandchild themes all the time because of that, so. It's what? Well, any sort of, there's a lot of base themes that people have built child themes off of and then clients like that child theme and then they wanna make changes to it. So it happens a lot more. It's not just WooCommerce, that was just the first example that popped in because I do that one a lot, so yeah. Yeah, any other questions? Let me see if I can switch back here. Yay, okay. So, as you can see, grandchild plugins are a little bit of a wonky way to do it but can be really helpful if you do need to modify that child theme. So I have a bunch of resources here. There are a lot of tutorials out there on how to upgrade child, or how to create child themes and grandchild themes. I would recommend making sure to use the tutorials that are linked to from the WordPress Codex because there's a lot of bad information out there about how to do it poorly. And so I would stick with the tutorials you can find linked to from the Codex. The Codex does have quite an extensive list of resources and things, not just WordPress and automatic resources but links to blogs and screencasts. So there's video ways, there's lots of different ways to learn it but stick with those resources. And how are we doing on time? Because now I left my presentation. 25 minutes? Okay, sounds good. All right. So my demo went a lot smoother than I thought it would. So I have a little extra time. Does anyone have any questions? Yeah, you could. Sure, you could but because the child theme plugin method is it's not as elegant and it's not as automatic so you have to do a lot of extra work to get it to work. So it's a lot easier to make a child theme if you just need a child theme. Also when you're dealing with plugins versus the standard child themes you lose a lot of the built-in GUI automation. So for instance being able to go in and customize under appearance all those options and customize for the themes. You don't get those with the plugins.  But otherwise if you stick with a child theme you get the advantage of any of that GUI stuff that the parent theme has built in. If we have a what? If we have a WooCommerce. Yup, for the templates you mean? Yeah, so in the grandchild theme here actually I have it up right now. So you'll create a function to check your templates folder before it checks the other one. And so that's what this function is doing here. It's checking if the file exists then use our file instead of WooCommerce's or the WooCommerce child theme. And so in this manner you can create that templates directory and then anything you copy over just like with a child theme will overwrite that template. It's important to note though that again the functions that you put in here are not gonna overwrite the WooCommerce functions. So what you'll have to do is you'll have to create a custom function with a custom name and then in the template call your function instead of WooCommerce's if you're modifying the functions. But the template files you can do this way. Any other questions? Well then I guess we can be first in line for lunch. Oh yeah, I'm sorry, yes. That's fine. On Gutenberg? Is that a theme? Oh Jenny's raising her hand, yay. Thanks Jenny. I have not used Gutenberg so. Okay, so this is gonna be the fastest talk on Gutenberg. Sorry Beth. So Gutenberg for everyone who's doing WordPress or even using WordPress is a new editor that's coming into WordPress. So if you go to the admin panel of WordPress and then go to an edit post or an edit page there is going to be a new interface and that is what the project name is called Gutenberg. And so if you're in the WordPress community at the moment you will hear people talking about Gutenberg and the Gutenberg editor. So the one that we currently have in core is called the classical editor, classic editor. And what will happen in WordPress 5 which will happen at some point is that Gutenberg will become core.  Now there is a massive, massive argument going into whether the way when they ship it especially at WordPress 5 will depend on whether it will actually have Gutenberg on by default and just switch everything over or if it will detect whether it's an old site and therefore only new installations would have Gutenberg on by default. There is a plug in called Gutenberg free which basically deactivates Gutenberg and you can if you are looking at WordPress at the moment and you're thinking about newer projects then there's the Gutenberg project as a feature plugin in the plugin repo and you can use that to test it out. There's also a website called Frontenberg because we like our puns in the WordPress community. It's on my friend's site, frontenberg.tomjn.net which actually allows you to test out Gutenberg in the front end. It's purely to do a demo. It's not something that we recommend but there are speculations that basically we're going through a whole entire rewrite of the whole WordPress admin interface to not only surpass stuff like Wix, Squarespace and lots of other one, Medium and it's just gonna be like a new thing and that's where the whole React conversation came into play with WordPress and all this crazy stuff but yeah. That is a thing I personally suspect. There was a, someone threw around that Gutenberg was coming to court on April the 1st and I pointed out that's April's full day and it will never flow. I suspect the end of the year is more likely and there's like massive discussions. In fact, I'm part of a project in two weeks where we're gonna be talking about Gutenberg and there's gonna be like online Gutenberg discussions about how it's gonna affect like the whole entire WordPress ecosystem because it affects page builders, like themes, all the whole nine nights. Although saying that, themes is the least problematic point because like this is all in the admin section and that front end actually doesn't really make a difference. It's still taking out data from the same way but we're still super, super, super, super, super proud of our backwards compact standpoint so that is being fought tooth and nail at the moment so don't panic too much is what it is. There you go. So the classic editor will stay in for at least the foreseeable future as well. So you'll have an option to choose? Yeah, you'll have the option to choose and the idea is obviously, there's so many WordPress sites out there that have the old version of WordPress and our clients are just not going to pay us to like update to Gutenberg so that's where the pain point is so the idea is that hopefully, personally I would hope that we'd be able to detect if you already got these like custom meta boxes and you can confer over, then you can just like turn on the classical editor enabler or ideally what we want as developers is actually do at the config level so in WP config but that's all being debated at the moment so the debate's really hot at the moment if you're in the WordPress ecosystem. As PHP developers, if you don't need to care about it just let them argue because there's plenty of agencies arguing on your behalf. I tend to try to let other people just argue about it and let me know when you make a decision. Yeah, yeah, I will let you all know once it's a thing but one of the reasons why I haven't started giving talks on Gutenberg in the PHP community yet is because it's just far too much hassle and it's not settled down so once it starts settling down then that's where you'll start seeing Gutenberg being really pushed forward because everyone will need to know about it but there's lots of stuff like meta boxes have been putted over and Mullenwags has said that it needs to be feature complete so it has to do everything the classical editors now before we can even consider shipping it and usually we wouldn't ship it straight away because the whole of the community team needs to then tell everyone, hey, we are going to ship this so there needs to be a grace period as well otherwise we'll just make lots of people angry. Is there a way to avoid that? No. But it's new. It's new, it's shiny, it's super cool. And the other thing is like with the Gutenberg please don't be afraid of it because with WordPress the last time we upgraded the admin panel was like before I started on WordPress and that was a long time ago. So when we changed something it's a change for a very long time so that's why there's lots of considerations. Even the accessibility team haven't got their hands on it yet because they keep on alliterating what's going into Gutenberg so they're like the accessibility team are like it's pointless of us trying to make it accessible until it's settled and we know what we're trying to make accessible. Sure. Cool. There you go. It's an important topic. It's definitely something you do. I'm excited to know. Yeah. Awesome. You're welcome. All right, any other questions? All right. Again, the resources you can look at those later. I do have my slides posted. If you do think of a question later or you'd like to talk to me about mentoring or apprenticeships or user groups or anything you can find me on Twitter, E3BethT. This is a link to my user group and joined in talk feedback. This is the link to the feedback or if you just go to the join.in homepage PHP UK conferences right at the top. My slides link is on the joined in website so you can pop there to get the slides, the link to the slides, which are posted currently so you can download them right now. And also you could leave some feedback while you're there. If you'd prefer not to leave your feedback on joined in that's totally fine. This is my email address. You can email me questions or feedback, whatever you'd like. And thank you so much everyone for coming.


So here in southwest North Dakota we're starting to see more and more of an issue with soil acidity or low pH in the top soil, especially in long-term no-till where you're putting down large amounts of nitrogen over time. We're starting to see this in the top two inches if you've been applying surface nitrogen or a little bit deeper down if most of the nitrogen is coming on as a hydrosimonia. So a typical zero to six or a zero to twelve soil sample might not pick up a small layer of low pH, but we're really starting to see the impacts of this issue and maybe they thought they were fine, but after this producer changed up their soil sampling technique they were able to pick up a very very low pH sometimes below four, anything below a five point five you're going to start to see issues. So once the pH drops below five point five that changes the availability of things like aluminum and manganese. So aluminum causes something called aluminum toxicity and that stunts the roots of the plant and makes it drought stressed. So in a year like 2020 in southwest North Dakota we're under drought conditions, right? So you have a reduced root system as well as reduced moisture that doesn't really add up to a very healthy crop. And you have a crop that's already stressed in these low pH areas. You're seeing extremely stunted plants and more than likely not very good yields. So the best way to manage this issue is to fix the soil pH. So that would be done with application of lime at least one ton. Our research is showing about two tons of lime minimum to really change that pH surface applied lime application. It's not going to be a very quick fix. So in the meantime while you're waiting for that soil to change there are some strategies and management tools that you can use to try to get through this issue. One of the most important tools is your crop selection, alright? So things like hard red spring wheat have some tolerance especially within certain varieties. So here at the Dickinson Research Extension Center the past three years we've been doing a low pH variety trial starting out small in 2018. A few more in 2019 this year we have 16 hard red spring wheat varieties as well as four Durham varieties. So we're testing these varieties out to see which one is going to do best under these conditions. Along with that we're looking at some different amendments in the soil and we need a few more years of data to really tell you if there's anything you can put on other than just lime to try to fix this issue. There is some work out of Montana that shows putting high amounts of phosphorus with the seed can help spring wheat yield better under these conditions. But really that crop selection is what's going to help you the most. So if you can choose some type of hard red spring wheat variety that shows a certain tolerance that would be great. Landing out of Montana has a certain gene in it called the TAAL1 gene that allows for the plant to be able to handle aluminum toxicity. We know for a fact that soren is susceptible to this issue and we're out here testing to see what other varieties are susceptible or tolerant. We know that Durham is very very very susceptible to aluminum toxicity. As you can see over here we have some very yellow plants and Durham does not like low pH very much. Crops like oats, teff, corn can handle this low pH issue a lot better and you're definitely not going to want to choose any type of legume. The legume gets hit twice as hard in these low pH conditions because not only are they being impacted by the root size but acidic soil also impacts bacteria. Why do we need bacteria for legumes? Well that's how we fix our nitrogen, right? So in order to make sure that we're getting the most out of our field choose something that's going to do well under the conditions that you have. On your left here we have a known susceptible variety soren grown in a low pH environment. On your right is a known tolerant variety landing. You can see that there's a pretty great difference in the amount of above ground mass as well as some slight differences in the root mass but really these are both being impacted by that low pH environment. If you compare these to something in a more neutral environment you're going to see a difference in growth. These hard red spring wheat varieties even though they don't look that great don't look much different than your Durham variety which is also extremely stunted under these conditions. So this low pH variety trial in order to truly see how much it's impacted by this low pH issue we also have a site that was planted the same day with the same treatments on a soil where pH isn't really an issue. So we're also dealing with moisture stress out here but when you remove the added stress of low pH and the impact that has on water uptake and those kinds of things you really have a big difference in growth. So on your left here is soren our susceptible check grown at our low pH site and this is soren grown same day on your right much larger not dealing with that aluminum toxicity issue. So these look like two completely different varieties but under different conditions this variety does really well when there isn't a major stress but when you put something like low pH on this variety you're really decreasing your yield so you're not getting the most out of those dollars put into seed for that crop. Here on your left we have landing from our low pH site and on your right landing from our neutral pH site. There really isn't much difference in the height of these plants but you do notice that there is a tiller at our neutral site. The plant is overall looking a little bit healthier than this one but that tolerance really comes through when you see the healthy plant versus the plant from that acidic site. So it's really important that you're choosing a variety that can handle these low pH issues. This fall and winter I'll be presenting on data from our variety trial at this low pH site so we'll have more information to follow on which varieties you should choose if you have to deal with low pH in your field.


of the array of events and topics that will be on offer at this year's local Enterprise Week. It's on next week, next Monday to Friday. It's a collaboration between local Enterprise Office Dunny Gaul and its partners. In fact there's a total of 19 separate events happening next week. Head of Enterprise Dunny Gaul is Brenda Higgarty who joins me in the studio. Brenda, good to see you again. Good to be back. And good to be back talking about Enterprise Week and again it's a it's a packed schedule. The theme this year is what? This theme this year is Be Brave. So we're continuing on from the theme last year was Be Inspired so now it's about taking the action. So people that may be planning or thought about starting a business just to be braved maybe take that next step or those that are in business maybe just the courage and the activity to really take it to the next level bring their business to the next level engage in terms of maybe new markets new products and hear all about the different opportunities and the supports that are available through the local Enterprise Office and indeed through our other Enterprise partners. And to that end you have a whole host of events and a whole range of different speakers to in a way to educate and to give business owners ideas and tips and encouragement. Yeah very much so. So this is one of the pivotal activities across local Enterprise offices right around Ireland. So local Enterprise Office in Dunny Gaul put on a packed schedule with our partners and it's really an opportunity for businesses to network in the first place. Maybe take some time out and consider where they are in their business hear about from experts and from other people that's in business that have walked the journey maybe learn about different aspects different challenges that they faced and actions that they took to overcome those. So there's a wide range of different business areas under consideration. So looking at new markets exporting looking at pricing models looking at sustainability digitalization. So there's elements that are suitable regardless of which business what sector you're in or what size of business there's something for everybody in the schedule. It's a good opportunity for owners and indeed managers to step out of the day to day routine and go to one of these events get some info but she said to network as well and to also realize that they're not alone but the problems that they're facing maybe on a daily basis that other businesses are coming up against them as well.  So it's it's useful as opposed to a lot of business people spend a lot of time working in the business and now local Enterprise week is about working on the business you know taking the time to lift the head from the daily ground and just see where you are where the challenges but most importantly where are the opportunities and what supports do we need as a business to move the business to the next level. Sometimes it's hard to see the wood for the trees. Now it starts on Monday at the launch and you've managed to secure you know one of the best known journalists in the country. Yeah which who has Donegal roots which is even better. So Richard Corn is our emcee on Monday and that's the opening event but it's also a focus on taking your business to the next level and with three local entrepreneurs Elnor Hannah from Hannah hats Martin McGinnis from MMG Oceanico and Donna Kelly from circuit and they will be able to talk their journeys and the challenges and the opportunities so it'll be a great morning in the Radisson Hotel starting at 10 finishing up at 11 30. On Tuesday the focus is on food because there's the food coast Donegal producers showcase that's in the silver tassie. Yeah that's going to be a great event so food coast Donegal working with the local enterprise office. We are hosting a great showcase of food producers. We have over 28 Donegal food producers in the room. We also have expert speakers looking as both Mosgrave, Neve Ruans coming up from the Mosgrave group just looking at trends and demands from the consumer and what food producers can look to in the future in terms of demand from those type of suppliers. And yeah it promises to be a great event. It's open to everybody. All our events are open for booking and just go to localenterpriseoffice.ie forward slash Donegal. Then for businesses that are exporting the Wednesday is a day to focus on exports which is which is great because you know it's not all about the local markets. No and as opposed for many businesses looking outside of our own domestic market and that can include from an Irish perspective into Northern Ireland usually the first step into the export market even though we're on the island of Ireland but and then looking maybe beyond into GB and beyond and the export event is a great opportunity to look at the opportunities and the steps and challenges and the supports that are available because there is a big drive that our businesses in order to scale we have to look at new markets, new opportunities and as opposed enterprise agencies like ourselves are there to support businesses to get them into new markets and drive the growth of their business and automatically then the employment base and all of the economic impacts that will bring to the local economy. The the areas that you focus on each day they're they're relevant to all or a lot of businesses and Thursday is no exception because the focus is sustainability.  Yeah that's really a great highlight of the week is always that leadership lessons through sport and it's you know it attracts a different type you know individuals maybe that aren't interested in the normal business type activity or seminars or workshops they have a particular interest maybe in sport and learning the lessons of leadership because there are great parallels and we have our own Donegal manager Jim McGinnis is joining us Bernard Jackman who has the great parallels of the corporate world he's done a lot of research into leadership in the corporate world as well as his experience of the Irish rugby team and then Coris Stanton who is a phenomenal lady in sport and has had great success in Mayo so Sean Perry is emcee and that so that's going to be a great event and that's on the Friday. Where abouts it's in the Mount Erica hotel on the Friday and then we have so many of our partners organize and events so we have letter Kenny chamber looking at pricing we have Donegal Women in Business Network hosting a cross border women's conference to mark International Women's Day which is Friday of Enterprise Week which is the Friday we have ATU running a number of events including their DICE conference looking at AI we have UDRS running events over in G-TECH and we have Donegal County Council and Donegal Tourism having an event focusing on tourism particularly sustainability digitalization we have letter Kenny chamber so a lot of many of choice a lot of choice and not all physical because I noticed that there's an online event as well there's about three or four online events so that allows you Enterprise Ireland is hosting an online event on sustainability the letter Kenny chamber pricing event is actually online and there is a range of different online IDP and a show and development partnership are hosting an event up in Bali Liffon actually so there is right across the county from Ghidor right up to Bali Liffon from Donegal Town right up to letter Kenny so all over the county there Enterprise event in person and online so there's a wide range of choice so check out the details in this fantastic brochure that is just hold up up there to camera or online of course all the info is online online so if you go to localenterprise.ie forward slash Donegal that has our brochure and a digital form so you'll be able to flip through each of the pages of the physical brochure and identify and as opposed the challenge will be identifying what events how you will manage your schedule and definitely come to as many events as possible as you can okay well it's a chance as was as we mentioned earlier to take stock and to see you know where your business is at and how you can grow it and maybe how you can innovate the launch is on Monday at the Radisson Blue in letter Kenny but it continues through the week Enterprise week Brenda thank you very much and the best luck next week thank you Joe enter the Virgin Media Playhouse for under


And I was just discussing this with somebody else just before this. But what you have to do is you have to create a lifestyle of foods that slim you down,