how to remove category from database

It is done through the following query: delete from `wp_terms` where `term_id` in ( SELECT `term_id` FROM `wp_term_taxonomy` WHERE `taxonomy` = ‘category’ ) and `term_id` not like 1 This query deleted all the category except the default. Hope this helps to the others.

Show only first children level of current category?

You are using get_categories() function and this function have not ‘depth‘ argument. Also php is not supporting $cat-id variable. it would be $cat_id. So try this kind of code: $cat_id = get_query_var(‘cat’); $args=array( ‘parent’ => $cat_id, ‘hide_empty’ => 0, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ );

If statement within PHP echo

According to the plugins documentation (http://zahlan.net/blog/2012/06/categories-images/), this seems pretty simple: <ul> <?php $categories = get_categories( $args ); foreach ( $categories as $category ) { $img_src = z_taxonomy_image_url($category->term_id); if ( $img_src ) { echo ‘<li><img src=”‘ . $img_src . ‘” alt=”” /><a href=”‘ . get_category_link($category->term_id) . ‘” rel=”bookmark”>’ . $category->name . ‘ – ‘ . $category->description … Read more

403 forbidden on one page only

Does the folder ‘biljke’ exist on the server by any chance?? i.e. do you have wp-admin, wp-content, wp-includes AND biljke as folders in your WordPress root? [Reposted as an answer so it can be accepted, probably should have done that in the first place without trying to comment!]

View the latest created categories

the id of the categories is autoincrement so you can sort by id to find the last one : $args = array( “type” => “post”, “orderby” => “id”, “order” => “DESC”, “number” => “5”, “taxonomy” => “category”, “hide_empty” => FALSE, // TRUE or FALSE depending what you want ); $categories = get_categories($args);

Change the_content() in Theme Thirteen

You probably have a read more tag in your posts, so you will need to remove them. We can use the the_content filter to achieve that. We need to search and replace the <!–more–> tag with nothing. You can try the following: (NOTE: The following code is untested) add_filter( ‘the_content’, function ( $content ) { … Read more

How to show Sub Categories on Categories page?

You can use get_categories & wp_list_categories with specific parameters (to use directly in you category.php template): // List sub cats $params = array( ‘parent’ => get_queried_object_id(), //id of current category displayed ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ => false // do not hide sub cats without posts ); if ( count( get_categories( $params ) … Read more

Get woocommerce catogry

It’s not working because you didn’t pass the Woocoomerce’s Product category taxonomy. By default get_categories() function will returns all terms data of default category taxonomy, if you did’t mention specific taxonomy slug inside the arguments list. So, To retrieve the terms data of any specific taxonomy, We must have to pass the slug of that … Read more