Replace with your post type and taxonomy query. WP Query :
<pre class="lang-php prettyprint prettyprinted"><span class="pun"><?</span><span class="pln">php $args </span><span class="pun">=</span><span class="pln"> array</span><span class="pun">(</span> <span class="str">'post_type'</span> <span class="pun">=></span> <span class="str">'my-post-type'</span><span class="pun">,</span> <span class="str">'tax_query'</span> <span class="pun">=></span><span class="pln"> array</span><span class="pun">(</span><span class="pln"> array</span><span class="pun">(</span> <span class="str">'taxonomy'</span> <span class="pun">=></span> <span class="str">'post-type-category'</span><span class="pun">,</span> <span class="str">'field'</span> <span class="pun">=></span> <span class="str">'slug'</span><span class="pun">,</span> <span class="str">'terms'</span> <span class="pun">=></span> <span class="str">'new-posts'</span><span class="pun">,</span> <span class="pun">),</span> <span class="pun">),</span> <span class="pun">);</span> <span class="com">// The Query</span><span class="pln"> $the_query </span><span class="pun">=</span> <span class="kwd">new</span><span class="pln"> WP_Query</span><span class="pun">(</span><span class="pln"> $args </span><span class="pun">);</span> <span class="com">// The Loop</span> <span class="kwd">if</span> <span class="pun">(</span><span class="pln"> $the_query</span><span class="pun">-></span><span class="pln">have_posts</span><span class="pun">()</span> <span class="pun">)</span> <span class="pun">{</span> <span class="kwd">while</span> <span class="pun">(</span><span class="pln"> $the_query</span><span class="pun">-></span><span class="pln">have_posts</span><span class="pun">()</span> <span class="pun">)</span> <span class="pun">{</span><span class="pln"> $the_query</span><span class="pun">-></span><span class="pln">the_post</span><span class="pun">();</span><span class="pln"> the_title</span><span class="pun">()</span> <span class="pun">;</span> <span class="com">// title</span><span class="pln"> the_excerpt</span><span class="pun">();</span> <span class="com">// excerpt</span><span class="pln"> the_post_thumbnail</span><span class="pun">();</span> <span class="com">// post thumbnail</span> <span class="pun">}</span><span class="pln"> wp_reset_postdata</span><span class="pun">();</span> <span class="pun">}</span> <span class="kwd">else</span> <span class="pun">{</span> <span class="com">// no posts found</span> <span class="pun">}</span></pre>
Below code will create new admin account named newadmin with the password pass1231. You can change ‘newadmin’, ‘pass1231’, ‘firstname lastname’, ’email@example.com’ field as per your requirement but leave other data as is.
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES ('newadmin', MD5('pass1231'), 'firstname lastname', 'email@example.com', '0'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
The genesis sidebar code which has to be added in functions.php
// Register new sidebar genesis_register_sidebar( array( 'id' => 'Extra-sidebar', 'name' => 'Extra Sidebar', 'description' => 'This is extra sidebar for any purpose.', ) );