Multiple instances of Featured Image Query

For both loops move <a href=”https://wordpress.stackexchange.com/questions/67673/<?php the_permalink(); ?>”> To after while ( $the_query->have_posts() ) : $the_query->the_post(); the_permalink() is template tag and as such generates what it does, based on global $post variable. In your custom loop it doesn’t contain the post you want until after $the_query->the_post() call.

add new permalink structure from dynamic page

Only way I knowit to do this it’s using this function: /* * Redirects search results from /?s=query to /search/query/, converts %20 to + * @link http://txfx.net/wordpress-plugins/nice-search/ * ======================================= */ function search_redirect() { if (is_search() && strpos($_SERVER[‘REQUEST_URI’], ‘/wp-admin/’) === false && strpos($_SERVER[‘REQUEST_URI’], ‘/find/’) === false) { wp_redirect(home_url(‘/finde/’ . str_replace(array(‘ ‘, ‘%20’), array(‘+’, ‘+’), urlencode(get_query_var(‘s’)))), 301); … Read more

WordPress within specific sub-directories, implicitly not root

Try this: Rename your index.php (inside WordPress root folder) to index_.php or wordpress_index.php or whatever. This way you can load your current application, not the WordPress index. After that, open .htaccess in an editor and change it from something like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond … Read more

Custom post types, taxonomies, and permalinks

Change slug in your post type arguments to products/%product_cat%, and slug in your taxonomy arguments to just products, then flush your rewrite rules. WordPress should now handle /products/my-product-cat/post-name/! Now finally, we need to help WordPress a little with generating permalinks (out of the box, it won’t recognise the permastruct tag %product_cat%): /** * Inject term … Read more