Display posts of child category in template

I have searched, and searched, and tried, and finally found…….. <?php global $wpdb; $categories = $wpdb->get_results(“SELECT $wpdb->terms.term_id AS id, name, description from $wpdb->terms INNER JOIN $wpdb->term_taxonomy ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id WHERE parent=”$cat” ORDER BY name ASC”); foreach($categories as $category) : ?> <h2><?php echo $category->name; ?></h2> <ul> <li><a href=”https://wordpress.stackexchange.com/questions/147767/<?php echo get_category_link($category->id);?>”><b><?php echo $category->description; ?></b></a> Posts on … Read more

more tag in the $post->content when get_pages were used

You can use the WordPress function get_extended to fetch the different parts of a string (the part before and the part after the <!–more–> tag). get_extended returns an array with three keys, of which the keys main and extended are important: $arr[‘main’] contains the part before the more tag, and $arr[‘extended’] the part after the … Read more

WordPress theme & site not loading after moving files

If you cannot login, use FTP or the file manager to edit wp-config.php and define WP_HOME and WP_SITEURL,. define( ‘WP_SITEURL’, ‘http://www.security-shell.com ‘); define( ‘WP_HOME’, ‘http://www.security-shell.com ‘ ); When you moved files to that subfolder, you probably copied and edited the main index.php file. Make sure that that process gets reversed. That should get things working … Read more