Performance impact of rewriting WordPress URLs

From performance point of view what takes time is matching URL against generated (and stored persistently so it’s not rebuilt continuously) list of regular expressions. Since URLs are (most of the time) insignificantly short in text volume the amount of those regular expression rules has most impact on performance. Unless you generate unreasonably many rules. … Read more

Correct folder permissions?

For starters, the WordPress Codex has a wealth of information on this very topic. For the sake of brevity that should take care of most of it; however, there are some relievant points that should be made: If you do not wish WordPress (essentially PHP) to have access to the file system with the exception … Read more

Get rid of this Strict Standards warning [closed]

This occurs because you do the explode() call inside the next() call. The reason I think is, by strict standards you shouldn’t pass a function to a function like this, because, like @AndrewBartel said, of reference, which would be missing. Doing it like shown below should work and would be correct: $nval = explode( ‘/themes/’, … Read more

How to show part of the_content?

Check out the WordPress Codex reference page for the_excerpt() as it is a built-in way of doing what you’re looking to accomplish: http://codex.wordpress.org/Function_Reference/the_excerpt EDIT: it also has an example for shortening the excerpt beyond the default length.

Show full posts in archive

You need to do the following in a child theme, do not make changes to the theme itself. EDIT I had a good look at the ‘Heuman’ theme. I think to solve your problem here is to copy the following files to your child theme, content.php and archive.php Rename your content.php to something like content-archive.php. … Read more

Apache Fallback instead of add_rewrite_rule

This fixed my issue. function my_query_vars($vars) { $my_vars = array( ‘PARAMETERS’ ); return array_merge($my_vars, $vars); } add_filter(‘query_vars’, ‘my_query_vars’); function my_rewrite_rules($rules) { global $wp_rewrite; $my_page=”PAGESLUG”; $my_rule = array( ‘URL/?’ => ‘index.php?pagename=” . $my_page . “&school_type=$matches[1]’ ); return array_merge($my_rule, $rules); } add_filter(‘page_rewrite_rules’, ‘my_rewrite_rules’);

Display PHP within HTML values

If the function returns a printed value: <a href=”https://wordpress.stackexchange.com/questions/145222/<?php bloginfo(“url’); ?>”>Link</a> If not (using the echo statement): <a href=”https://wordpress.stackexchange.com/questions/145222/<?php echo get_stylesheet_directory_uri(); ?>”>Link</a> You can also use print() as part of a more complex expression where echo cannot. By the contrary, when you want to use HTML into PHP, I recommend to close PHP and open … Read more