New answers tagged themes
1
vote
WP HTML Templates - Any way to get bloginfo() or the path to the theme folder?
At the time of writing this isn't possible, twentytwentytwo works around this by registering patterns in a subfolder then using a pattern block.
This way they can define patterns in PHP then use the ...
0
votes
What is the first file wordpress looks at in a theme?
I think the more logical path is this:
style.css
functions.php
index.php
0
votes
Filter nav menu items HTML tags and wrap inner text with span
Here is my solution with assistance from TheDeadMedic.
I added the <svg> code to the replacement value in the preg_replace function, then added the opening and closing <span> tags to the ...
1
vote
Filter nav menu items HTML tags and wrap inner text with span
Just use link_before in your wp_nav_menu $args and add opening/closing span tags:
$args = [
'link_before' => '<span>',
/* Add closing </span> to link_after */
'link_after' =&...
0
votes
Accepted
setcookie on WordPress Page Template
This fails because the init hook is far too early to call is_page_template. Conditionals such as this function use the main query to decide their value, but WordPress hasn't created the main query yet....
1
vote
registering a global template wordpress 6.0
but now in WordPress 6.0, there is no such attribute that exists in Gutenberg to select a new page template.
This is not true! WP 6.0 did not remove this functionality. In fact in the block editor it ...
Top 50 recent answers are included
Related Tags
themes × 2844theme-development × 695
plugins × 403
customization × 229
css × 213
php × 210
child-theme × 186
functions × 140
menus × 111
templates × 110
theme-customizer × 90
theme-options × 88
widgets × 76
images × 69
posts × 67
multisite × 67
plugin-development × 66
pages × 66
custom-post-types × 64
javascript × 54
updates × 52
categories × 47
errors × 46
options × 41
loop × 40