WordPress redirect from one directory to another but exclude wp-admin and wp-login.php
You could try this: RewriteCond %{REQUEST_URI} !^/wp-admin RewriteCond %{REQUEST_URI} !^/wp-login\.php(.*)$ RewriteRule ^blog/(.*)$ /news/$1 [R=301,NC,L]
You could try this: RewriteCond %{REQUEST_URI} !^/wp-admin RewriteCond %{REQUEST_URI} !^/wp-login\.php(.*)$ RewriteRule ^blog/(.*)$ /news/$1 [R=301,NC,L]
You can use the is_page() function or is_single() function to echo content to front end pages function add_content_to_page { if ( is_page() ) { echo ‘<p>content</p>’; } } or combine the two : function add_content_to_page { if ( is_page() || is_single() ) { echo ‘<p>content</p>’; } } Similarly you can do is_page(41) to target a … Read more
Can you please try below code? $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; $woo_home_query = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => $top_selling_products_nr, ‘meta_key’ => ‘total_sales’, ‘paged’ => $paged, ‘orderby’ => ‘meta_value_num’ ); <?php if ( $woo_home_query->have_posts() ) : ?> <div class=”products container grid-wrapper clear”> <div class=”row”> <?php while ( … Read more
I got a few minutes and made the custom code for you. Copy and paste this in your themes functions.php remove_shortcode(‘gallery’, ‘gallery_shortcode’); add_shortcode(‘gallery’, ‘gallery_shortcode_custom’); function gallery_shortcode_custom( $attr ) { $post = get_post(); static $instance = 0; $instance++; if ( ! empty( $attr[‘ids’] ) ) { // ‘ids’ is explicitly ordered, unless you specify otherwise. if … Read more
Late answer but, one possible scenario this could be happening is if you register two custom post types with the same permalink slug. You can debug this by doing a var_dump of the global variable $wp_query. global $wp_query; var_dump($wp_query); Check to see if the post_type in the query matches the post type of the page … Read more
If I follow your description right you want posts which have any $typeIDs, but all of $unionIDs ? Aside from wrong meta_query choice, you miss operator argument which specifies which kind of match you want. I think your query should be something like this: ‘tax_query’ => array( ‘relation’ => ‘AND’, // you want both conditions … Read more
Try to set the WP_DEBUG constant to true in wp-config.php file to get any errors shown in your browser. Also, you may want to check the network has been setup correctly – double check you have followed the steps here – http://codex.wordpress.org/Create_A_Network
Only so much security can be added at the php layer. To gain even more security, modify the .htaccess file, disabling directory browsing, disabling XML-RPC, and deny access to WP-specific files. <files .htaccess> Order allow,deny Deny from all </files> <files readme.html> Order allow,deny Deny from all </files> <files readme.txt> Order allow,deny Deny from all </files> … Read more
Yes you can, but the “gotcha” to look for are the default htaccess rewrite rules that wordpress uses. With them the “front” wordpress is going to try to parse all url which are not mapped to actual files and therefor will mask the urls of the second site. You will have to manually edit the … Read more
$terms = get_terms( ‘my_taxonomy’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { $all_term_meta=get_term_meta($term->term_id); } }