Limit checklist by the current user

Use the same technique as $checked: $disabled = ( $ed->ID != get_current_user_id() ) ? ‘ disabled=”disabled”‘ : ”; your code: foreach ($alleds as $ed) { $checked = (in_array($ed->ID,(array)$currenteds)) ? ‘ checked=”checked”‘ : ”; $disabled = ( $ed->ID != get_current_user_id() ) ? ‘ disabled=”disabled”‘ : ”; echo ‘<input type=”checkbox” name=”currenteds[]” value=”‘ . $ed->ID . ‘”‘ . … Read more

How do you List all Sidebars in a Metabox

You can also use a function like this: <?php /* Other stuff */ function sidebarOptions(){ $sidebars = $GLOBALS[‘wp_registered_sidebars’]; $sidebar_options = array(); foreach ( $sidebars as $sidebar ){ $sidebar_options[] = array( ‘name’ => $sidebar[‘name’], ‘value’ => $sidebar[‘id’] ); } return $sidebar_options; } /* Other stuff */ /* * Trying to print the result to check if … Read more

List categories with custom code

<ul> <?php $categories = get_categories(); foreach($categories as $category) { ?> <li><a href=”https://wordpress.stackexchange.com/questions/165159/<?php echo get_category_link($category->cat_id);?>”>$category->name</a></li> <?php } ?> </ul> Just simply change the content inside the foreach loop to output how ever your desire. If you are doing this in a number of places drop it into a function and echo the function from your functions … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)