Skip to main content

Unanswered Questions

3,131 questions with no upvoted or accepted answers
7 votes
1 answer
2k views

Registering menu with 'Automatically add new top-level pages to this menu' selected

Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the ...
6 votes
1 answer
2k views

Add category to custom post URL

I am trying to create custom post with custom taxonomy and categories. Structure is like: Product: Has categories Has taxonomy Custom post type create: function create_alco_custom_post() { $...
6 votes
2 answers
661 views

Link to Author archive from Navigation Menus in dashboard?

I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
5 votes
2 answers
6k views

Display all posts from all categories with pagination

Alright, this might be a tricky one to explain but I'll do my best. At the front page I want to display all the posts from all the categories. However I want them to be divided. Take this for an ...
4 votes
1 answer
5k views

AJAX handler throws 400 (Bad request) - why?

I am trying to apply a "Load more posts" function to a post loop, but I am dealing with a 400 Bad request, when admin-ajax.php is referred to. The reference I used is this - https://rudrastyh.com/...
4 votes
1 answer
117 views

How do I get the total number of categories in a list of search results?

I want to display the total count of categories in a set of search results. For example, "10 posts found in 3 categories." (Assuming that each post has only 1 category.) Right now, my solution is to ...
4 votes
0 answers
435 views

display most popular tags of category?

0ne year ago i used this code to show most popular tag of the current category in my sidebar: function my_tags_from_category( $atts, $content = null ) { extract(shortcode_atts(array( 'type' => ...
4 votes
1 answer
2k views

Custom Loop and Infinite Scroll

I am using customized version of _s theme where I have Product CPT. In the following files, I need to use Infinite scroll (provided by Jetpack) - archive-products.php taxonomy-[tax-name].php ...
4 votes
0 answers
2k views

Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content

I've never posted here, but I'm tired of slapping code together. That said, I would be most appreciative if someone could help me with this. I need a page template that: outputs the PARENT PAGEs, ...
4 votes
1 answer
644 views

Get page content by category or tag

I'm trying to sort of emulate the Views behaviour in Drupal with WordPress, but doing it in theme templates. Now, I have pages that are assembled by using wp_query in the template to get posts ...
4 votes
1 answer
353 views

How to sort posts by last name (2nd word) on ONE category only?

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. ...
3 votes
1 answer
104 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 ...
3 votes
0 answers
1k views

How to display post categories within the Latest Posts block?

I'm trying to display the category/categories from each post within the Latest Posts block in the WordPress editor. This post seems to provide some solutions, however I am unsure how to use this ...
3 votes
0 answers
1k views

Add Product categories to Wordpress menu without losing hierarchy

I need to add product categories to Wordpress menu, but when I'm doing this with WP interface it lose the hierarchy I tried with WP-CLI, but there is no method to specify wich item is the child. ...
3 votes
1 answer
573 views

Replacing the NavWalker dropdown element

I'm creating a website for my school with Material Design for Bootstrap and the NavWalker is giving me some issues, I want to change the element of dropdown i.e. from ul to div. I've tried to edit the ...

15 30 50 per page
1
2 3 4 5
209