How to echo the value of an array element using a function via a shortcode

I do not understand this response unfortunately. I don’t know how to take this, and turn it into working code. What I meant by that response, is that you would be using a shortcode that looks like these in your posts: [print-price key=”price1″] [print-price key=”price2″] [print-price key=”foo-bar”] Where key is an attribute for the shortcode … Read more

How to get a page array and category array going at the same time?

extend this line: <?php if (is_page(array(‘page-one’, ‘page-two’, ‘page-three’,’page-four’))) $logo_image=”subLogo.jpg”; with || is_category(array(‘cat-1’, ‘cat-2’)) so you get, for example: <?php if (is_page(array(‘page-one’, ‘page-two’, ‘page-three’,’page-four’)) || is_category(array(‘cat-1’, ‘cat-2’)) ) $logo_image=”subLogo.jpg”; http://codex.wordpress.org/Function_Reference/is_category

Obtaining values from objects

The problem with your use of foreach (in both cases) is that you are erasing any previous value $Comments or $CommentDates had before the current iteration. Rather than setting the value to the variable itself, perhaps you should be appending new values onto the variable as an array: // Not sure what purpose your $cake … Read more

Inefficient Query Confusion

…or try this: // … put your $today and $future variables here… global $wpdb; $events = $wpdb->get_results( ” SELECT * FROM {$wpdb->posts} LEFT JOIN( SELECT DISTINCT post_id, (SELECT CAST(meta_value AS DATE) FROM {$wpdb->postmeta} WHERE {$wpdb->postmeta}.post_id = meta.post_id AND meta_key =’opening_time’) AS opening_time, (SELECT CAST(meta_value AS DATE) FROM {$wpdb->postmeta} WHERE {$wpdb->postmeta}.post_id = meta.post_id AND meta_key =’artist_talk_time’) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)