Questions tagged [theme-development]

Themes create the public (front-end) interface for a WordPress site.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Adding copyright notice to page bottom in full site editing template

I am adding a function, a copyright notice, to my full site editing theme. I initially tried a shortcode and added shortcode as a block in the footer within site editor. This renders the notice just ...
dooley's user avatar
  • 36
0 votes
0 answers
9 views

custom wordpress theme blog page always not showing the last two pages of the articles

custom wordpress theme blog page always not showing the last two pages of the articles, always sending in the last two pages to 404 page Anyone can give me a light. I create a theme, using the theme ...
tiago calado's user avatar
0 votes
0 answers
17 views

I want to resize post featured image without cropping image. How?

I want show post featured image on different page in different size but image in not showing full. Also, do not want to crop image. I am adding an link that what type of work I want do. Example When ...
First Guide's user avatar
0 votes
0 answers
12 views

New directory created each time I upload new theme zip

I'm creating a theme based on Underscores. I use its 'bundle' method to generate a new zip of the theme for deploying to a dev server. This has worked fine on other projects, but on this one each time ...
toby1kenobi's user avatar
0 votes
1 answer
28 views

Does a custom WordPress theme require updates to it's source code?

I have not found a satisfactory answer to this question. WordPress releases a lot of updates. As I am relatively new to custom theme development, I do not know if some of the changes in the WordPress ...
N.Mo's user avatar
  • 3
0 votes
0 answers
48 views

Transitioning a big blog to WEBP images

I have a Wordpress site with a LOT of posts that still get significant amount of traffic (10,000's of posts). The site is image heavy and uses <img> tags for inline Jpegs as featured and inline ...
gravy's user avatar
  • 157
0 votes
1 answer
57 views

How do I send out an update for my custom wordpress theme?

I created a wordpress theme and I've installed it on two sites so far. I recently made an update to the theme and I want to push it to all of my clients. How do I send out an update?
Philly's user avatar
  • 3
0 votes
1 answer
30 views

Should we escape the values of constants?

In my theme folder, I store my constants in a file called constants.php. But when we use the constant, should we escape it like esc_html__('This is '. CONSTANT_A, 'text-domain'); I was wondering if a ...
ratib90486's user avatar
0 votes
1 answer
37 views

Modifying posts based on category in TwentyTwentyTwo theme

This is quite a starter question. I want to change the style of all the posts in the "photos" category by adding custom CSS to the style.css file of my child theme. However, I cannot find any ...
Klosmi's user avatar
  • 1
0 votes
0 answers
78 views

Align images to the left of the content

I am using WordPress 6.2 and the Twenty Twenty-Three theme. I am using a local version of WordPress so I am able to edit the style.css and other files. How can I make the left-aligned image blocks ...
Arete's user avatar
  • 308
0 votes
1 answer
66 views

Hook a search form anywhere on the site, using a custom plugin

I'm new and I apologize if I ask an already existing question. But I can't find the information I'm looking for. I need to know how a search form works in wordpress. I'm creating a custom theme and ...
f3l1x's user avatar
  • 1
0 votes
0 answers
59 views

Image and font support missing in editor when deploying theme remotely

So I am starting to learn Wordpress development and today I uploaded my first custom theme from my local environment to the remote hosting server. My theme installed with no issues and I was ready to ...
Mike Sav's user avatar
  • 105
0 votes
2 answers
91 views

Why is my Toggle field not showing in Gutenberg?

I am adding a PluginSidebar to Gutenberg and it works until I try to add a meta field to the sidebar. Then it doesn't work. I'm not sure why though. import { registerPlugin } from "@wordpress/...
JayDev95's user avatar
  • 169
0 votes
0 answers
154 views

Why isn't custom sidebar panel not showing up in the Gutenberg Editor?

I am trying to add a custom Gutenberg sidebar panel but it isn't showing up. I'm not sure why though as I have the sidebar.js and then enqueue it in PHP. I ran npm run start and it compiled the JSX ...
JayDev95's user avatar
  • 169
0 votes
1 answer
160 views

functions.php doesn't load all custom theme assets

I'm writing a simple wordpress theme. I've added this function inside the functions.php file and I've noticed that only style.css is loaded. Is there something wrong that will cause that the other ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
21 views

Wordpress search field won't get wider

I've tried everything I know how to get this input field to 100% but I can't seem to do it. It always stays at some stuck width. .search-field is the stock class and I've targeted that class using max-...
harshclimate's user avatar
1 vote
1 answer
44 views

How to set the margin on an innerBlock in a block variation?

I am trying to define a block variation that has an innerblock with a margin. I was able to set the color of the innerBlock just fine, but for the life of me, I can't make the margin work. Here's what ...
Scribblemacher's user avatar
0 votes
0 answers
72 views

Add text when displying attribute with a hook on single product page

I have books as products in woocommerce and I'm trying to show the order of the book in the series. It should look something like this: "The book 1 of Series" I've managed to add the link to ...
Mrs Vanklik's user avatar
0 votes
2 answers
272 views

Font Awesome Icons as squares [closed]

I have been trying to migrate my html css and javascript static website to a wordpress dynamic theme. Everything worked fine and looks perfect but for some reason my font awesome icons appear as ...
Anas Dah's user avatar
0 votes
1 answer
2k views

WordPress PHP8 Critical Error in class-wp-widget.php

Recently updated to PHP8 and I'm getting a critical error related to the theme. The critical error is: Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), ...
Gavin's user avatar
  • 1
0 votes
0 answers
39 views

When trying to run build script with gutenberg (with SVG import) - Error: Plugin name should be specified

I have a theme that is live and has some 10-20 custom gutenberg blocks, Those blocks sometime have svg imported to them like so import logo from './logo.svg' Today when I was trying to work and ...
AlonK's user avatar
  • 1
0 votes
0 answers
45 views

I am using update_option function to update theme options programatically but page needs to be refreshed many time for changes to reflect!

update_option( 'my-settings', $my_options, true ); This is updating the option but I need to refresh many times or clear cache every time for changes to reflect in frontend, is there a way for ...
Tuckedo's user avatar
1 vote
1 answer
101 views

Full site editing templates folder vs block-templates

I have a modified Bedrock installation that moves the theme folder outside of the wp-content folder (and the normal app folder for Bedrock). In this setup, the app folder has a data folder that is the ...
Bas's user avatar
  • 121
0 votes
0 answers
28 views

Getting error when accessing Customizer Page

i get this error when i try to access my multisite customizer page.I tried to see what it was, i thought it was a plugin conflict, but i think its something else, i guess Fatal error: Uncaught ...
Jovan Jovanovic's user avatar
1 vote
1 answer
138 views

How to make content as required in custom post type?

I created custom post type Testimonials and made the title required using the code in this link: Require title for pages Now I applied the code in order to make the content required, and it works fine....
Hatem Frere's user avatar
0 votes
0 answers
10 views

Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php

I write a code for add custom filed in checkout form as add affiliate code I want to match that custom field data with username. If custom field data match with any of the username the chcekout ...
Kunal Verma's user avatar
0 votes
1 answer
34 views

How can I use pre declared blocks in a php file?

Is there a way/ a function to insert a block and user reusable blocks from inside a php page/template-part like use_block('jetpack/google-calendar') to a block? (I am using a partial block theme, ...
ATP's user avatar
  • 121
3 votes
1 answer
37 views

Execute javscript when theme customizer loads (autosave issue)

I have a theme that is having an issue when there are unsaved theme changes, then the user restores an autosave. My theme has some jquery that watches for a font to be changed, then updates a second ...
JWright's user avatar
  • 33
4 votes
1 answer
185 views

Return the_content() with custom div class for a subset of posts

Is it possible to have the_content() function return the post content in a div with a custom CSS class (i.e. something other than the-content)? I have a unique post I'm trying to lay out that requires ...
Geoff's user avatar
  • 41
0 votes
0 answers
16 views

Wordpress administration is gone after creating base theme

I have following files for a base theme: wp-content/themes/base/style.css (empty) wp-content/themes/base/index.php // index.php <?php declare(strict_types=1); echo wp_nav_menu(); After ...
fabpico's user avatar
  • 101
2 votes
1 answer
32 views

WordPress Two Level Filters on Getting Custom Taxonomy Terms

I have a Custom Post Type Called movie and I have two taxonomies genre and quality associated with that. Now I need to get/filter all terms IF genre = 'action' AND quality = 'HD' Using this code I ...
Behseini's user avatar
  • 525
2 votes
2 answers
152 views

Theme's featured image option is not showing up

I'm new to WordPress development. I watched a video on how to add featured images. For some reason it's not working, and I can't really figure out why. The option for featured image is not showing at ...
Dorcas's user avatar
  • 23
0 votes
0 answers
112 views

WP Customizer get control value on change

I've written a function for my WP theme based off of this question:Changing the entire control choices using wp.customize with JavaScript My code is as follows: ( function( wp, $ ) { wp.customize....
JWright's user avatar
  • 33
4 votes
1 answer
383 views

Is there any filter or action hook to remove layout classes from appearing in my templates?

With the new WordPress 6.1 core update, my site is now having a is-layout-flow class added to the layout. Normally this wouldn't be a huge issue. However, we are using the WP API to feed the content ...
zeropsi's user avatar
  • 151
0 votes
0 answers
18 views

How to create A - Z List with pictures?

I need to create an A to Z list with pictures of the players profile pictures I know there is A to Z plugins, I did do some research and the A to Z list, created links. I need something like this I ...
CandyShop's user avatar
1 vote
0 answers
228 views

WordPress Ajax load doesn't work

Hello I have set up custom Ajax load more without plugins, but it’s only showing 3 posts on home page, and when clicking on button to load more it’s not loading anything. As I am a beginner I am ...
Ferdal Karaman's user avatar
4 votes
1 answer
61 views

Theme template file for a specific custom taxonomy

Is it possible to create a template file specific for a custom taxonomy? For example, I have music Custom Post Type and it has three taxonomies artist, album, and genre. So the hierarchy would be like ...
agent abstract's user avatar
0 votes
0 answers
28 views

How to make it so I can "use" template parts in (classic/full) site editor

I want to make a website with an editable front page for a client with no coding knowledge, the client should be able to edit the front page in the site editor like a regular page, but should be able ...
ATP's user avatar
  • 121
0 votes
1 answer
45 views

How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?

When creating a menu, and after selecting a page as front page and another page as posts page..it appears next to the page in menu screen. For example, "Front Page" appears next to home page,...
Hatem Frere's user avatar
2 votes
1 answer
153 views

Can't select my block by clicking on it on apiVersion - but using blockProps

I'm building my first Wordpress block but I've ran into an issue. If I set my block's apiVersion to 2, I am not able to select my block. I'm aware that for apiVersion 2, you need to use the ...
artulloss's user avatar
0 votes
2 answers
22 views

Not Able to Access Terms Under Custom Taxonomy Archive

Having a Custom Taxonomy called movie-genres 'rewrite' => array('slug' => 'movie-genres', 'with_front' => true) ); register_taxonomy( 'movie-genres', array( 'movies' ), $args ); And I have ...
Behseini's user avatar
  • 525
0 votes
1 answer
21 views

orderby property of query on pre_get_posts returns incorrect value

I am attempting to implement some custom sorting logic for a column but are facing issues in the pre_get_posts hook. The value of the orderby property on the query is not returning the value ...
Kasper Östberg's user avatar
0 votes
1 answer
115 views

My theme is full of error messages in the "Customize" screen, but nowhere else

I'm making a custom Wordpress theme. At some point, the "Customize" page in the admin panel has completely broken, giving me tons of these errors: Notice: Trying to get property '...
Hubro's user avatar
  • 141
1 vote
1 answer
1k views

How do I work with responsive images in Wordpress? (img srcset/sizes)

I'm trying to make a Wordpress theme and I'm very confused about how I should use responsive images. Here's how I'm currently displaying each thumbnail in my post list: <? the_post_thumbnail() ?>...
Hubro's user avatar
  • 141
1 vote
1 answer
364 views

Webpack does not create or update index.asset.php file in build folder

I am using @wordpress/scripts package to set up Webpack in a WordPress theme. However, I ran into a problem with default Webpack configuration as it is creating an unnecessary .js file inside the ...
Badan's user avatar
  • 215
0 votes
1 answer
250 views

Custom Theme functions.php – Using add_settings_field and input type="file" to set custom logo

I've seen several examples for "add custom logo" to wordpress theme, most of which use this basic code, specifically function display_logo_element() { ?> <input type="...
Sylvester DeMouser's user avatar
0 votes
0 answers
17 views

Is there any other ways to replicating changes on live from staging without pushing from git

I am just curious to know if is there any possible and reliable ways to replicate staging changes to the live site without using the git repo. Please share if there are any best practices to do that.
Muzammil Hussain's user avatar
0 votes
1 answer
125 views

How to show associated fields if checkbox is checked in customize widget screen using wp_customize?

I created a checkbox section to let user to choose whether wants to display a button in the menu or not, I set the default value to false, and created two fields for the label of the button and the ...
Hatem Frere's user avatar
0 votes
1 answer
77 views

How to Enfroce Domain Licensing Limits? [closed]

I'm looking to sell premium WordPress plugins (using Easy Digital Downloads licensing manager) and I want to limit the number of domains the plugin can be activated on (to receive automatic updates). ...
S.O.S's user avatar
  • 109
0 votes
0 answers
50 views

Meta box not displaying on the plugin page

I am working on a plugin and I am creating a meta box on my page using the below code but it's not displaying anything. Any idea where is the issue with my code? class bt_dashboard { function ...
Naren Verma's user avatar

1
2
3 4 5
90