New answers tagged

0 votes

Long TTFB even without plugins

Since we cannot say much without actual investigation and many actual configurations can only be checked from the backend, so this resource might be helpful to understand (in easy language) the ...
  • 41
0 votes

Set a featured image as a replacement to the header image

In my case I have added some lines in hero-header.php: old code: if ( get_header_image() ) { ?> <div class="<?php echo esc_attr( 'site-hero-header-image site-hero-header-image--' . ...
0 votes

How to trigger function on theme delete?

Since 5.8.0 you can use the deleted_theme hook together with the stylesheet name: add_action('deleted_theme', function($stylesheet, $deleted){ // do something }); You will have to run this ...
  • 375
1 vote

How do I put my comment form above the comments?

I do this with CSS flex-box: #comments { display: flex; flex-direction: column; } #respond{ order: 2; } .comment-list { order: 3; }
1 vote

How to get postId from the argument $block when register_block_type()?

The get_the_ID() function will return the id of the current post in the loop. If your block is used on a single post page or in a post loop (archive page) you can use this.
  • 464
0 votes

Include Max mega menu Plugin into theme

In addition with Tom Hemsley's answer, this is a list of services and open sources that might be useful: WP Package Editor WP2E is a service allowing developers to create and manage installation ...
  • 375
0 votes
Accepted

My Blog page ( posts page ) theme isn't changing with the new theme

Interesting. Is there a caching plugin active? Is there caching at the hosting level? Have you loaded the page in a private/incognito browser window? Have you tried to completely remove the old ...
2 votes

Should you directly edit Template Parts and Templates from themes?

Must be create a child theme otherwise when you update theme then all modification file will be remove. Here is the best tutorial for how to make a WordPress child theme https://www.elegantthemes.com/...
0 votes

.submenu class missing in output from wp_nav_menu

Based on looking at the output HTML i'd have guessed this was because wp_nav_menu was using the fallback cb to render a wp_page_menu, the clue was the output of page_item classes instead of menu-item ...
  • 18.5k
0 votes

Define a Custom Template Part As A Widget Area

You should simply need an appropriate dynamic_sidebar() call in your template. https://developer.wordpress.org/reference/functions/dynamic_sidebar/ You pass the ID of the sidebar you registered it ...
  • 18.5k
1 vote
Accepted

Why does WP theme not look like promoted?

You need to use the same content and settings the author used to take the thumbnail, theme authors have no control over the content used in the theme preview on .org so the preview rarely shows what ...
  • 54.3k
0 votes

WordPress Theme activation hook?

The action hook after_switch_theme sometimes may fail because it fires only if the old theme still exists. This is written in the codex. You can also check it directly in wp-includes/theme.php in the ...
  • 71
0 votes

My wordpress site memory exhausted more than 1GB trying to debug with default

i have too problemm. Maybe this a betheme theme use or wordpress version 6.1 ? Yohoo... I can repair this problemm I use Betheme 25.6.1.3 and wordpress upgrade to 6.1 version automatic... I download ...
0 votes

Changing Sidebar In 2023 Theme

I got tired of the bugs in php themes hindering my progress, so I switched to the core wordpress theme 2023. As explained above, I need a 3 column page layout and dynamic sidebars. Using the 2023 ...
  • 145

Top 50 recent answers are included