do something with the $passed_post_name variable ![]() Once the url before the query string loads (in this case just the home page of the domain) I can check for that variable using the global PHP $_GET variable array and, if it exists, do something with it. In this string I am passing the variable post_name and giving it a value of my-cool-article. See how I am specifying that post_name is equal to my-cool-article after the question mark sign? This is a query string. Query strings are not something you see a lot of lately (as pretty s are the norm) but they are what existed before s were made popular. The first thing you need to understand is query strings. If you are new to PHP I recommend reading my Child Theme series, especially the article on Making child themes part of your development best practice. For this article, we’ll use a child theme, because it’s the easiest way. Also, for the purposes of this article, you are going to need to know how to include PHP into your WordPress site (either via a Divi child theme or a plugin). For the purposes of this article I am not going to delve too deeply into those topics, so I do suggest reading the relevant documentation on. This is because it is going to require delving into the world of PHP and WordPress action hooks. ![]() It being the most popular article, the most popular question I get about it is “How do I link to and open an accordion or tab, from an external page?” Well, today I share that solution.īefore we begin – This article is going to be a little more advanced than my usual Divi posts. It’s so popular that when the demo page broke recently I even had a few people comment to ask if the process still worked with newer versions of Divi (it does, by the way). The most popular article on my blog so far (by way of comments on it) is the one on Using anchor links to open accordions and tabs in Divi.
0 Comments
Leave a Reply. |