Awesome Conditional Content For Divi
-
Great plugin. Thank you for making and maintaining it!
It turns a simple brochure site into a powerful platform.
I had a challenge with query variables similar to some of the threads in the support forums. I solved it by creating a function in my child theme functions.php. Here’s an example:
function is_post_type($type='post') { global $post_type,$typenow; if (isset( $_GET['post_type'] )&& $_GET['post_type'] == $type || isset( $post_type ) && $post_type == $type || isset( $typenow ) && $typenow == $type) return true; // return true if on a page of type $type return false; }
I used the above function is_post_type instead of the $_GET statement to dodge any code that was sanitizing my input.
Edit: Above function’s just an example. I had a unique situation for using post type from query variables, otherwise, there are better ways of creating a post type conditional using the built-in WordPress hooks
- The topic ‘Awesome Conditional Content For Divi’ is closed to new replies.