Problem with parked domain for my mutisite

Merely pointing a domain at your site isn’t enough to make things work. What’s happening here: You have WordPress configured on the .com Traffic from the .ir domain is pointing at the same server WordPress doesn’t realize they’re the same thing and instead assumes you’re trying to set up a new blog on a multisite … Read more

Count posts on multisite with blog id

In order to use wp_count_posts() as you would on a single site, pass the blog id into the switch_to_blog() function before calling wp_count_posts(). Example: function wpse_get_post_count( $blog_id ){ switch_to_blog( $blog_id ); $post_count = wp_count_posts(); restore_current_blog(); return $post_count; } Ensure restore_current_blog() is used after every switch_to_blog() or you will risk difficulties mentioned in the notes section … Read more

wp_get_attachment_image_src on multisite

wp_get_attachment_image_src() function returns an array that’s why your code isn’t working. Try the following code. <a href=”https://wordpress.stackexchange.com/questions/295180/<?php echo esc_url( home_url(“https://wordpress.stackexchange.com/” ) ); ?>” rel=”home”> <?php if ( get_theme_mod( ‘bwpy_logo2’ ) ) : $img_data = wp_get_attachment_image_src( absint( get_theme_mod( ‘bwpy_logo2’ ) ) ); $img_url = isset( $img_data[0] ) ? $img_data[0] : ”; // Or you can try … Read more

Why shortcode always displayed after footer not in body

Ahmad, a shortcode needs to return the html, not echo it directly like a widget does. Shortcodes work because wordpress replaces the [shortcode] with the text returned by the shortcode function. So change the code to something like: $html=”<h3>Tulisan terbaru website kebudayaan…</h3>”.date(‘j F Y’); $blogs = get_last_updated(); $html .='<table class=”widefat” cellspacing=”0″>’; foreach ($blogs AS $blog) … Read more

Mass Update Broken Links

It seems from your example that the key parts of the URL structure are staying the same. 2016/5/document.pdf That means you could use a plugin like ‘Better Search Replace’ (https://en-gb.wordpress.org/plugins/better-search-replace/). Simply choose to replace: www.example.com/files/ with www.example.com/wp-content/uploads/sites/#/