Inserting a shortcode into a genesis menu?

The problem is the fact that you are trying to echo something into a string, echo should only be used to output something, so simply change the following line: $items .= ‘<li class=”myclass”>’ . echo do_shortcode(‘[shopping_cart]’) . ‘</li>’; To this: $items .= ‘<li class=”myclass”>’ . do_shortcode(‘[shopping_cart]’) . ‘</li>’; Edit: On another note, this is merely … Read more

NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]

There aren’t really any good filters/hooks that are going to allow you to place the custom drop down control where you’d like. What you should do instead is create a new template from an existing one, then add your widget code in. I’m going to edit “gallery.php”, but you must edit album.php or whichever gallery … Read more

How to write short code with if else to get page_id?

I use this maybe helpfull <?php $title = get_the_title($post); $parent_title = get_the_title($post->post_parent); echo $title; echo $parent_title; ?> <?php global $post; //wordpress post global object if($post->post_type == ‘page’){ $content .= ‘<br /> This item is a page and the ID is: ‘.$post->ID; } elseif($post->post_type == ‘post’) { $content .= ‘<br /> This item is a post … Read more

Using browser detection and the body_class() function to modify css

Can’t tell you exactly why but that function didnt work for me either.. Finally i have found this script i have modified a little bit here: get_browser() Here it is (in your functions.php): function whatBrowser() { //browsers define(“UNKNOWN”, 0); define(“TRIDENT”, 1); define(“GECKO”, 2); define(“PRESTO”, 3); define(“WEBKIT”, 4); define(“VALIDATOR”, 5); define(“ROBOTS”, 6); if(!isset($_SESSION[“info”][‘browser’])) { $_SESSION[“info”][‘browser’][‘engine’] = … Read more

Q&A lite plugin comments

We had a similar question which received a nice amount of answers and the main issue with the plugin you linked was that it had no comments for the questions and answers and if you look at the comments you will see that both types (questions and answers) support comments you only need to display … Read more