Unanswered Questions
661 questions with no answers
4
votes
0
answers
76
views
Using Primary Color in Plugin Block
I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to ...
4
votes
0
answers
280
views
Gutenberg Blocks - Attributes from comment delimiter or from HTML?
I wrote a custom block and am trying to better understand the interplay of the JavaScript and PHP on both front and back end regarding blocks.
Say I have some block that I want rendered dynamically. ...
3
votes
0
answers
397
views
When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?
I am trying to extend the core/image block to add an option for a deferred image. I want to replace the src attribute of the image with an empty string and add the url as a data attribute to be loaded ...
3
votes
0
answers
162
views
How can I rewrite a plugin generated URL?
I'm using the wpForo plugin to create custom profile pages on the front end of my website.
The profile URLs generated by the wpForo plugin look like this:
example.com/community/profile/username/
...
3
votes
0
answers
346
views
Add custom field to category of custom post type
I want to add a custom field (for a icon) to categories of a custom post type.
I use the default category type and not a own create category taxonomy.
How can I add the custom field only to the ...
3
votes
0
answers
1k
views
wp_nav_menu custom walker - child items
I have written a custom walker to integrate a jQuery drop-down nav script into my WordPress template. I need to add .dropdown-link to each of my parent menu items and .dropdown-wrapper to the ...
2
votes
0
answers
130
views
Prevent posts from being published if the 'Uncategorized'-category or no category is selected
I do not want a user to be able to publish a post if no category is selected. This exact solution from a similar question is exactly what i want to do:
jQuery(document).ready(function ($) {
// ...
2
votes
0
answers
118
views
Custom widget select options needs to stay selected after save
I am working on a custom widget that includes a select options drop-down list of pages. When I select a page and save, the selected option does not stay selected. However, if I refresh the widgets ...
2
votes
0
answers
241
views
Hiding Draft Post In Admin
Does anyone know of a way to hide draft post so that when "All" post is selected, draft post is not included?
I tried adding this code to my functions.php file but it lead to an error, I'm ...
2
votes
0
answers
438
views
How to extend nav-menu-item-control data in Appearance > Customize?
I have one question as for Nav Menu Items custom fields in the Appearance > Customizer screen.
Since 5.4. there are 2 new hooks:
wp_nav_menu_item_custom_fields - it works for Appearance > Menus ...
2
votes
0
answers
1k
views
'Invalid post type' error when importing from one site to another
Our existing corporate site was developed by a 3rd party vendor. I am in the process of creating a new version of our site, in a new WP instance. I need to export the 'News' articles, from the current ...
2
votes
0
answers
602
views
Hide Login information in Account settings in Buddy Boss
First time working with Buddy Boss.
I managed to customize the navigation items on the profile page, but I can't find a solution for the Account settings page.
What I'm trying to achieve is to hide/...
2
votes
0
answers
375
views
Meta query for custom post type ignored in main query
I looked through the interwebz but couldn't find a solution.
I am creating a website with custom post types where posts also include custom post meta (through ACF).
I am creating an archive file and ...
2
votes
0
answers
49
views
How to re-arrange media uploaded using : media_handle_upload() as per year / month
I have been facing this issue that all the new media files are getting uploaded to single folder which was auto-generated during initial site development.
Now since all new images are getting uploaded ...
2
votes
0
answers
59
views
How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
Auto-linking for "selected words" in the_content I am currently using the following code:
function wp_affiliate_links($text){
$replace = array(
'/ example /' => ' <a rel="nofollow" href="...