Combine 2 arrays in a query parameter

This does not work because this is not how you merge two arrays: ‘post__not_in’ => get_upsell_ids(), [get_the_ID()] Instead you need to take those 2 arrays and combine them using array_merge, a standard PHP function: https://www.php.net/manual/en/function.array-merge.php Note that __not_in type parameters have a very high performance cost and do not scale, this query will be very … Read more

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