To get list of bottom most or deepest or last child for specified parent category

You can use wp_list_categories to achieve that: <ul> <?php wp_list_categories( array( ‘child_of’ => <PARENT_ID>, // show only children of PARENT_ID ‘childless’ => true, // show only categories without children ‘hide_empty’ => true, // should empty categories be hidden ) ); ?> </ul> You can find full list of available params here: https://developer.wordpress.org/reference/classes/wp_term_query/__construct/#parameters

How to divide and display categories into two columns

You don’t need any code changes to your PHP or html! Assuming the following code was used: <ul class=”mypagelist”> <?php wp_list_pages(‘sort_column=menu_order&title_li=’); ?> </ul> Resulting in: <ul class=”mypagelist”> <li>Page 1</li> <li>Page 2</li> <li>Page 3</li> <li>Page 4 <ul> <li>Subpage 1</li> </ul> </li> <li>Page 5</li> </ul> Use CSS along the following lines: .mypagelist { width:600px; /* or any … Read more

custom walker wp menu last element

If you can live without re-creating the menu walker, you can add classes to menu items manually. On the WordPress menu editing screen, click on “Screen Options” and enable “CSS Classes.” Then you’ll be able to add whatever class you want to whichever list item. Creating a custom Walker for something like this will be … Read more

WooCommerce Grid / List view

Undo any changes you’ve have made to the file, then add this at the top: if ( jQuery.cookie( “gridcookie” ) != “grid” ) { jQuery.cookie( “gridcookie”, “list”, { path: “https://wordpress.stackexchange.com/” } ); } Update: Sounds like a FOUC. Let’s take a different approach – remove the code you added above & try adding the following … Read more

List all categories in options

To get a list of selectable categories use wp_dropdown_categories(). Example: wp_dropdown_categories( array ( ‘orderby’ => ‘name’, // ID of the already selected category: ‘selected’ => 4, // If no category is selected: ‘show_option_none’ => ‘Choose one’ ) ); HTML output: <select name=”cat” id=’cat’ class=”postform” > <option value=”-1″>Choose one</option> <option class=”level-0″ value=”4″ selected=”selected”>Animals</option> <option class=”level-0″ value=”6″>Hyperbolica</option> … Read more

Similar posts formatting

I’ve responded to your thread on the WP forums, see here.. http://wordpress.org/support/topic/simple-question-about-similar-posts-plugin You can do what you want from the plugin’s settings page.. EDIT: Following the CSS suggestion, if you wanted to try this method. Leave the fields as they were Update the <ul> field to now read <ul id=”my_special_id”> Update your theme’s style.css file … Read more

Editing a Post, 99% CPU?

You may be dealing with the dreaded mod_security when your posting or updating . see if it’s enabled on the server first, if your using antimalware software it may be trying to scan on save . ok that’s the easy try . the next is to turn off your plugins . wsiwig editors., seo plugins … Read more