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' => 'author', 'number' => -1, ]; // THE USER QUERY $user_query = new WP_User_Query($args); // THE TOTAL SUBSCRIBERS NUMBER echo '<h3 class="font-weight-bold">Total Listed Shops: ' . $user_query->get_total() . '</h3>'; echo '<hr>'; // THE USER LOOP if (!empty($user_query->get_results())) { foreach ($user_query->get_results() as $user) { // ACF PREFIX & FIELD DATA FROM USER PROFILE …
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. This is all the code <ul id="portfolio-list"> <?php $args = array( 'post_type' => 'post', 'post__and' => array( 15, 14, 17, 13, 10, 8, 12, 11, 9, 16), ); $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) :?> <?php while ( $the_query->have_posts() ) …
I need help with something, what happens is that I have created a custom role derived from the Editor role that Wordpress has by default and I have added some extra capabilities. Now, my goal is that this role can only create, edit or delete users that have as role one of the ones I want (e.g. Driver or Team). How can I achieve this?
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 aspect that is a little annoying is having to search & replace <li></li>tags to the start and end of each new line of lyrics. I was hoping to have PHP echo this automatically but my code is not working at the …
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, actually I have a database associated with this. So basically I want my piece of code to read the whole database and represent it in columns in my wordpress page. For ex. author_name, ping_status, post_status etc. So basically I want to write a function, that can …
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() { // Register default widgetized areas $sidebars = array( 'primary' => array( 'name' => __( 'Primary Widget Area', WMW_ADMIN_TEXTDOMAIN ), 'desc' => __( 'The primary widget area', WMW_ADMIN_TEXTDOMAIN ) ), 'home' => array( 'name' => __( 'Homepage Widget Area', WMW_ADMIN_TEXTDOMAIN ), 'desc' => __( 'The homepage widget area', WMW_ADMIN_TEXTDOMAIN ) …
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 the visitor reaches this point, on one side you see all the posts of the category "intranet" and on the other a kind of sidebar that shows the months ONLY of the category "Intranet". I tried with get_month_link(), but this shows all the months of all posts …
Hello, how can I add in the column, the tags of the products corresponding to the order please, the tag column which is painted in yellow, I saw that it was possible to put the name of the products but it is more complicated to put the product tags? Thanks for your help
it would be great if there was a way to change the default sort by dropdown in WooCommerce on the shop page. but I want to use list page or other page for default sort by dropdown in wp-query.
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 custom template so I have full access to the "single.php" template. Because I need to be able to edit the link text for each link, I don't think I can use custom fields as there is no way to match …
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, or will I need to use the dirty way?
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 'foo'. I am trying to also get the categories from the same search in a separate list using a second shortcode from the same global search. I am not sure how I can get the categories from the same global …
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 returns 100 posts all with different tags eg pizza, bred, tomatoes. I would like all the tags with tag count (tag count related to search result) related to my search to show on top of my search results page …
I'm building a plugin that works only in admin. I've a page where the user choose some posts, the script generate a pdf file from this data and then it save in a specif folder. To help the user to choose the posts I would to do an input text with a "live search". The user select the post from the list result and the script add it in a list (and the post_id in a hidden input). I've searched …
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 there is a way to get a list of file names so that I can downsize the images and replace them, without editing every image one at a time. The source images on the website are 1920x1080, and I need to re-upload …
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->parent){ echo '<a href="'.get_category_link($category->cat_ID).'">' . $category->name .'</a><br>'; } }
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, with redirect to specific taxonomy term page on option select. The code: <form id="category-select" class="category-select" action="<?php bloginfo('url'); ?>" method="get"> <?php $args = array( 'show_option_all' => __( 'Choose theme', 'l-p' ), 'hide_empty' => 0, 'echo' => 0, 'show_count' => 0, 'taxonomy' => 'theme', ); $select = wp_dropdown_categories( $args ); $replace = "<select$1 onchange='return …
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 custom fields. They are very computer illiterate and will need to be entering these events in very frequently. I used a few shortcodes from my theme to create the layout for these pages. Now I want to take basically make the page super …
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, only on category archives? E.g. It will still say "Filed Under: A, B, X" on single post templates. But it will say "Filed Under: A, B" on archives. Working in Genesis, if that helps.