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 post category in foreach loop with category link

You are fighting with the post globals, like $post, and are not getting them set correctly. Create a proper Loop using WP_Query and use Core template tags where possible and the problem will go away. $authors_posts = new WP_Query( array( ‘author’ => 7, ‘posts_per_page’ => 6, ‘post__not_in’ => array( $post->ID ) ) ); $output=”<ul>”; while … Read more

Can I list a custom post type within another custom post type in the admin area?

Yes, you can. You would need to add a custom field that would store the ID of other post type. I would recommend using a select list. You could try something along these lines: add_action( ‘add_meta_boxes’, ‘wpse_143600_add_box’ ); add_action( ‘save_post’, ‘143600_save_box’ ); //create the metabox function wpse_143600_add_box() { add_meta_box( ‘related_testimonial’, __( ‘Testimonails’, ‘wpse_143600_translation’ ), ‘wpse_143600_testimonial_box’, … Read more