Adding a Section for Visitors

This forum is to get answers to (technical) problems, whereas you are asking for opinions. The “challenge” you’re having can be solved in different ways. For starters the comment form could be used and it should be possible to add additional fields. See add_comment_meta() (https://codex.wordpress.org/Function_Reference/add_comment_meta) Another way could be to add use a form to … Read more

Disable “similar permalink” redirect [duplicate]

To completely disable this feature, use this code, which I got from here. remove_action( ‘template_redirect’, ‘redirect_canonical’ ); To only disable it for URL addresses that contain the string ‘event’, use this code: add_filter( ‘redirect_canonical’, ‘disable_redirect_canonical_for_event’, 2, 10 ); function disable_redirect_canonical_for_event( $redirect_url, $requested_url ) { if ( strpos( $requested_url, ‘event’ ) !== false ) { return … Read more

In a multisite, how can I get posts from one site and display their permalinks in another site?

Let’s take a look at get_blog_permalink: get_blog_permalink( $blog_id, $post_id ) { switch_to_blog( $blog_id ); $link = get_permalink( $post_id ); restore_current_blog(); return $link; } As you can see, there’s no magic… But there are some problems, since switch_to_blog isn’t very efficient… It means that it would be way better if you’d done it this way: $tp_blog_id … Read more

Multisite Dashboard not working

Just you need to put this code in .htaccess file # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] … Read more