Skip to main content

Unanswered Questions

2,367 questions with no upvoted or accepted answers
2 votes
0 answers
53 views

How to stop unlink images when remove a site or user

What's the best way to prevent images deleting?. I have a central cdn site to share images to several sites on wordpress multisite, and by mistake, I have remove a user from the network and all my ...
2 votes
0 answers
490 views

Programmatically create menu with custom link

I am creating pages and assign them to a menu with custom link. Pages are properly created and menu is properly created, too. However, custom links are not given to the menu items. What I want is to ...
2 votes
3 answers
45 views

Remove Page Name From Wordpress Menu

I have a Wordpress menu that are both being used as a normal menu with page name that links to the page. I want to echo the same registered menu, but without the page name. To be clear, I still want ...
2 votes
0 answers
277 views

Wordpress menu that shows all posts in a certain category like w3schools

I am working on creating a widget menu(kind of a sidebar like w3schools) that is supposed to show all posts that are listed in a particular category. And update automatically from particular category(...
2 votes
1 answer
1k views

Add code to WordPress menu items by class

I am trying to add onclick="toggle_visibility('sub-menu');" into the opening tag of specific menu items generated in WordPress. I have used the following function to target all parent menu items ...
2 votes
0 answers
2k views

redirect product-category to a custom page

I hope you can help me. I've made one page for each woocommerce category I have in my store with a specific design. The problem is that when you click on the link of the product-category to which a ...
2 votes
1 answer
1k views

How to display dynamic content in start_lvl function

I am creating a custom nav walker but having trouble outputting parent menu item title in start_lvl function. I want to output it right after the <div class="dropdown"> in the following ...
2 votes
0 answers
104 views

Wordpress Template not affecting the working, keeps defaulting to the index.php template

I thought this would be incredibly simple, but it has not. I have an index.php file that has my default template for my site. I then made a new file called magazine.php for a template file so that I ...
2 votes
0 answers
28 views

Custom Widget form function common elements

I am writing a set of custom widgets, all of which share a common 18 lines of code in the form() function, which looks like this: <div class="common-section"> <input type="hidden" class="...
2 votes
1 answer
667 views

Add custom taxonomy under the category title

I've added a custom taxonomy to my product category page in the admin. I can call the custom field using the following: $queried_object = get_queried_object(); $t_id = $queried_object->term_id; $...
2 votes
1 answer
419 views

Updating Widget options in custom install.php

I am using a custom install.php in /wp-content/ to over-ride some defaults when creating sites in a multi-site install. For the most part, this is easy and working really well. I am having difficulty ...
2 votes
0 answers
533 views

Create menu / submenu from category subcategory and posts

I have a custom menu made up of pages and categories and I am trying to output the category and subcategories as well as the last 4 posts from each category/ subcategory. In trying to use a walker ...
2 votes
0 answers
1k views

Custom Loop through category menu to include sub categories

In my custom wordpress theme I currently have the below loop to the main categories <?php $menu = wp_get_nav_menu_object('navigation'); $items = wp_get_nav_menu_items($menu->term_id); foreach($...
2 votes
0 answers
75 views

How To Add buttons to the toolbar which appears in TinyMce when you click over images

Using Wordpress 4.4 I need to add a custom button to manipulate images. The button should appear when the user clicks on an image, next to other buttons. An example of the other buttons:
2 votes
1 answer
2k views

Programmatically set current-menu-item using wp_nav_menu

I'm calling wp_nav_menu programmatically on a class and I'd like to be able to set the field that will be shown as the current-menu-item but I don't see an argument for that. It seems like I may be ...

15 30 50 per page
1
3 4
5
6 7
158