Unanswered Questions
3,936 questions with no upvoted or accepted answers
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() {
$...
5
votes
1
answer
181
views
Pb with responsive image sizes in WP 4.4
I don't understand how to customize responsive sizes images in WP 4.4.1.
The only available hooks that I see are wp_calculate_image_srcset and wp_calculate_image_sizes, and neither has the named ...
5
votes
1
answer
2k
views
How to add image uploader to a custom widget?
I'v built a custom widget that will show some sport scores. Scores are added trough custom post. When i open new custom post(scores) i enter their team names, score, scores. Now i want to add an ...
5
votes
1
answer
597
views
Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
I'm adding an upgrade for the WordPress plugin which I have developed ages ago. This plugin is just a product catalog, so just show products and their images. Products can have more than one images.
...
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
201
views
@wordpress/create-block image url in css
how to include image URL to css "style.css" in custom block?
Both these not work:
background-image: url("images/imagename.png");
background-image: url("./images/imagename.png&...
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. ...
4
votes
0
answers
1k
views
Make alt text required when setting a featured image
In the EU it will shortly be a requirement for public sector websites to have alt text for uploaded images. My organisation's users are rubbish at adding alt text, however, and I'm trying to find a ...
4
votes
1
answer
6k
views
wordpress responsive image srcset not working
I'm trying use wordpress core responsive image feature but it's not adding srcset to image. Here is th my codes
I have a div w=370px h=280px now I added image sizes
if(function_exists('...
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
1
answer
102
views
How does WordPress work out the srcsets?
WordPress gives some images srcset but not others how does it work this out, I cannot find anything documenting the topic. How does WordPress decide which images to give the srcset attributes 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
4
answers
21k
views
alt, title tags not showing
I have added alt tags, title and description on all the images on my website but none are showing when I check them in the inspect element tool in chrome or firefox.
Here's a screenshot:
And here's ...
4
votes
1
answer
51
views
Prevent Deletion of Blogs
I'm trying to prevent the deletion of blogs in a WordPress Multisite installation. There is already a plugin that does this, but it uses wp_die() as the solution, which in my scenario does not work.
...