Questions tagged [list]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
622 views

Filter Posts by Excluding Categories

I am logged on as admin I am on the Posts dashboard I have Posts assigned to multiple Categories and I have posts that are assigned to only one category. I want to display posts that are assigned ...
0 votes
1 answer
1k views

Wrap Meta Box with <li> and </li> for each new line

I'm trying to automate one of our posting aspects. We post a lot of lyrics and have a system of meta boxes which we use to input various pieces of information about each set of lyrics we post. One ...
0 votes
2 answers
2k views

How to get all wp_posts in wordpress fetched from database

I have downloaded a theme and installed it. Here the theme has custom fields for limited numbers. For ex. author_name, comments but, I want all the wp_posts to be displayed. And prior to that, ...
0 votes
1 answer
89 views

How can I enable checkboxes for custom post type posts on their post list - Wordpress

I have a custom post type called gr-item created by a Wordpress theme. However, checkboxes in Title column for custom post type posts on post list are disabled. How can I enable them? Any quick advice ...
3 votes
1 answer
2k views

How to get a category in a list item class

I am need to know how would I get the category to be dynamically input in a WP_Query This is the code I am using: <li class="<?php the_category(' ')?>"> but the output is breaking. ...
1 vote
0 answers
37 views

Gutenberg inline style messing up the navigation when I add a list to a page

This is sort of weird. I have a set of pages and the navigation looks the same on all but one page. After trial/error I was able to narrow it down to having a list on my page. As soon as I add a list ...
1 vote
0 answers
18 views

Keep the expansible tree (list of posts) open in the sidebar

I have created a plugin to diplay a list of posts (cpt) in a tree on the sidebar. It adds an icon [+] when posts have children. However when I click on a post the tree colapses. How can I keep the ...
0 votes
0 answers
28 views

How to add images inside an item of a list in Gutenberg

I'm about to move to WordPress (from markdown), and I noticed that the Gutenberg editor won't allow the use of images within list items. It kind of does with the "inline image" feature, but ...
49 votes
12 answers
68k views

How to show a hierarchical terms list?

I have a hierarchical taxonomy called 'geographical locations'. It contains continents on a first level, and then the countries for each one. Example : Europe - Ireland - Spain - Sweden Asia - Laos - ...
1 vote
1 answer
641 views

How do you List all Sidebars in a Metabox

I know this question has been answered many times before, including here where i came from so it'll probably be real simple. I've registered my sidebars as normal function wmw_sidebars() { // ...
1 vote
2 answers
2k views

wp_dropdown_categories and custom taxonomy + custom post type

I have created custom post type called "case study"(with slug case-study), with support of custom taxonomy which is called "theme". What i am trying to achieve? Simple dropdown, ...
1 vote
1 answer
941 views

Display the last post by each category?

How I can display the last post by each category? Point is to display the last post on the page for all categories, I need to show them in front as normal <ul><li> list. Any idea? ...
-1 votes
1 answer
602 views

List child pages alphabetically

I am using the following code to list sub pages of a particular page. How would I change ot to sort by alphabetical order? <?php $args=array( 'post_parent' => 15901, 'post_type' => 'page',...
1 vote
3 answers
403 views

Insert a group block inside a list item

It seems like the only thing you can put inside a list item is text (including links), inline images, and lists. But I would like to insert a whole group of blocks inside a list item. I was able to do ...
0 votes
0 answers
129 views

How to add avatar to authors list?

I have code that shows authors list: <?php wp_list_authors( 'exclude_admin=0&optioncount=1' ); ?> It works fine, with number of posts per author and author page link https://images2.imgbox....
2 votes
3 answers
3k views

Change default screen option value for posts per page

I want to change the default screen option value for posts per page in the wp-admin area when listing posts in pending mode. The default value is set to 20. Changing the value directly in the Screen ...
0 votes
1 answer
236 views

How can i filter wordpress users by custom feild?

I'm displaying users (authors) on a page. how can I add a filter based on user custom feilds? <?php // THE USER QUERY ARGS $args = [ 'role' ...
0 votes
0 answers
96 views

display the months of a specific category

I have a website made in wordpress, this website has a file called category-intranet.php that is responsible for showing me all the posts of the category "Intranet". what I need is that when ...
0 votes
0 answers
22 views

Best way to insert a list of links into a post outside of the_content

I would like to have a list of links to PDFs on some posts that sit outside of the main content. See wireframe: The links need to be editable via the editor / wp admin and be post-specific. It's a ...
6 votes
2 answers
3k views

How To Remove These Stuffs From Custom Post Type List Screen?

I am modifying a custom post type's post list screeen and I want to remove all of the stuffs on the tablenav head like what is marked in the following image. Is wordpress have special hook for that, ...
0 votes
1 answer
90 views

Return all Tags and Categories in Separate List

I am using the snippet below to create a shortcode to get all tags for a search in a separate list including tag count. Eg search for 'foo' and it returns all tags for all posts that match the search '...
0 votes
1 answer
163 views

Return All Tags from Search Result in Separate List

I am trying to create a list of tags on top of my search results page that returns all tags and tag count for all tags that are included in the search results. For example, I search for 'Foo' and it ...
0 votes
0 answers
83 views

How do you obtain a list of all image file names on a wordpress website for replacement?

Good Day, I hope somebody can assist me please. I have to replace/re-upload all the images on a website, as they were uploaded as massive files. I have to downsize all the images, and want to know if ...
0 votes
1 answer
60 views

how to wordpress When I click on the category link, subcategories appear

What can I do to make subcategories appear when I click on the category link $categories = get_categories(); print_r($categories); foreach($categories as $category){ if(!$category-&...
0 votes
1 answer
43 views

Get children of taxonomies

$terms = get_terms([ 'taxonomy' => array('Movies, Musics, Books, Games'), 'parent' => 0, 'depth'=> 2, 'hide_empty' => false, ]); $sorted_terms = []; ...
1 vote
1 answer
1k views

Can I wrap an unordered list inside a shortcode?

So, I created an events page for my client that holds lots of details about events. We found no particular event plugins to be helpful for their purpose, so I built a a custom template using advanced ...
1 vote
1 answer
26 views

Exclude a category from the filed under list only on some templates

this is a follow up question to this post Exclude a category from the filed under list The solution given works for me. However, I'm curious how I can get this to work conditionally? Specifically, ...
1 vote
0 answers
230 views

How to link the whole list item in Gutenberg's latest posts block?

I am using a Gutenberg's 'Latest Posts' block on my front page. Featured image display and grid layout are enabled in the block settings. By default, only the post title is linked to the actual post. ...
3 votes
1 answer
94 views

Changing a function in function.php to a shortcode - for listing categories of only a certain post type

I'm trying to create a shortcode that can display a list of categories. However, it should: First, limit the results to a specific post type (based on shortcode usage) then check to see if category ...
0 votes
1 answer
762 views

Hide specific category from wp_list_categories

I have to hide 3 categories from the list, at the moment to view the list I use this function function genres() { $args = array('hide_empty' => true, 'title_li'=> __( '' ), 'show_count'=> 0, '...
0 votes
1 answer
42 views

View the complete list of a taxonomy in the navigation menu

I have a taxonomy called "country" and I need to visualize it as a list of categories can someone help me? <li><a href="<?php echo esc_url( home_url() ); ?>/country/...
0 votes
1 answer
62 views

How to let users create lists of woocommerce products?

I've almost finished my website https://laforetcomestible.org/ It's a french database of plants to create of forest garden (free and collaborative) built with wordpress and woocommerce. I'd like to ...
0 votes
1 answer
25 views

Why <i> items could not be enclosed within <li> items in WordPress?

I was creating a guide in WordPress with the Classic Editor. In the guide, I was about to create a separate section here, https://www.payuoc.com/home-furnishing-decor/best-mattress/ I referred to ...
2 votes
1 answer
4k views

Get all sub-categories of a parent category

How could I get a list of sub-categories (empty included) of a specific parent category (not within a post) by providing the parent category ID or slug? I need 3 levels depth. Example: picture My ...
3 votes
2 answers
8k views

Display list of Sub-Categories and the posts they contain, within one main Category

I've found tons of code and plugins to do various things; from show posts for specific cats, subcats of a cat, etc.. BUT, I cannot for the life of me find, nor do I know the WP API well enough to do ...
1 vote
1 answer
994 views

Exclude admin from user list

Hi i'm fairly new to PHP and Wordpress, i'm using a plugin (Users Insight) to list all users on my site. The problem is, that i don't want to admin to appear in that list. So far i've found the ...
10 votes
2 answers
7k views

How to display by default only published posts/pages in the admin area?

As it is, WordPress displays by default all the pages/posts in the pages/posts list in the admin area, no matter what their publishing status is. I have a lot of drafts, but usually I'm much more ...
0 votes
3 answers
547 views

get_all_category_ids for bookmark

I was wondering how to create a list of categories name and ids for Wordpress Bookmarks such as get_all_category_ids for post. I tried using the get_bookmarks, but the category does not appear in it. ...
0 votes
0 answers
33 views

I need advice for creating native Wordpress directory site based on native Wordpress functionality only

I created a directory site, but I used normal posts, and builder modules in post content to get the desired directory post layout, however i realized that using builder modules in post content was a ...
2 votes
0 answers
613 views

Gutenberg List Extension Block

I'm trying to extend the default Gutenberg unordered list that renders like this; <ul> <li>Item 1</li> <li>Item 2</li> </ul> To something like this when ...
0 votes
1 answer
208 views

How can I show the author's latest post with title?

The following is my code: (klcom is my theme name) I just show the author by: name and description, I want to show the author's last 3 post with tile after each author, How can I code? Thanks <...
1 vote
2 answers
1k views

Remove Order List Row Link in WooCommerce Admin?

I wanna remove the functionality of when you click on a order row in Orders in Admin, you will be sent to the edit page for that order. I know it's added with jQuery in a js-file in the WooCommerce ...
0 votes
1 answer
1k views

How do I add a separator to my list of terms with get_category

I have this... $args = array('child_of' => 3422 ); $categories = get_categories( $args ); foreach($categories as $category) { echo '<a href="' . get_category_link( $category->term_id ) ....
0 votes
1 answer
230 views

Convert UL to dropdown list not working

I am running a plugin called Divi Staff to show the staff on the website. I don't like how the specialisms are displayed and wanted to convert them to a dropdown list. I have tried to get this to work ...
0 votes
1 answer
501 views

How to get child pages and add unique class only to active page?

I have a parent page with child pages. How to get child pages and add unique class only to active page ? I am making a sidebar with children's menu parent page one level up. I can list all child ...
2 votes
1 answer
213 views

taxonomy list display custom post count

I use $term->count to display post count but it displays the total count of all type of custom posts attached to taxonomy... I just want to display the count of only a specific custom post type ...
0 votes
1 answer
900 views

How to show a list of only categories (exclude subcategories)

I have a list where you show me the categories, but I would like you not to show me the subcategories, only the categories $term_id = get_categories(); if (function_exists('get_wp_term_image')) {...
0 votes
1 answer
57 views

line order number start numbering from second line (SOLVED)

if(is_tax()) { $currentTermType = get_query_var( 'taxonomy' ); $cat_icon = get_field('logo', $queried_object); ...
0 votes
1 answer
24 views

Category list with postcount

Im total noob with wordpress, and would like to get some help with following problem. I Would like to make list of all categories and postcounts in category, something like this: category1(2), ...
1 vote
1 answer
335 views

List pages by custom field?

For SEO purposes I use my URLs like this: site.com/parent/child/ Currently I have pages like this: site.com/parent/ site.com/page-1/ site.com/page-2/ site.com/page-3/ I want to ...

1
2 3 4 5