WP_Query fails despite having 1 post

T a look at how to properly construct a query with WP_Query. $args = array( ‘post_type’ => ‘cameras’, ‘posts_per_page’ => 5, ); $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { echo ‘<ul>’; while ( $the_query->have_posts() ) { $the_query->the_post(); echo ‘<li>’ . get_the_title() . ‘</li>’; } echo ‘</ul>’; } else … Read more

PHP conditional script issue

You have a lot of PHP tag spam, e.g.: ?><?php This is bad, confusing, makes your code difficult to read, and a waste of your time to type. It’s the difficulty reading your code that has lead to your problem, including the lack of indentation. These are important, and any good editor will do them … Read more

Multiple do_shortcode in page template

Okay, you need this: <?php echo do_shortcode(‘[your-first-shortcode]’.'[your-second-shortcode]’); ?> Just write a dot between your shortcodes… Try: <?php echo do_shortcode( ‘[vc_row][vc_column width=”1/1″][vc_accordion][vc_accordion_tab title=”Section 1″][vc_column_text]’.'[table]’.$sometabledata.'[/table]’.'[/vc_column_text][/vc_accordion_tab][vc_accordion_tab title=”Section 2″][/vc_accordion_tab][/vc_accordion][/vc_column][/vc_row]’ ); ?>