Skip to main content

Questions tagged [theme-development]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
23 views

FSE Change Post Template to Something Other Than a List

I'm currently building a hybrid theme and am having trouble with my post template. It keeps rendering as an unordered list when what I want is a div structure. Is there any way to change it so that ...
elke_wtf's user avatar
  • 383
2 votes
0 answers
18 views

How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class

I am working on a WordPress project using version 6.5, which introduced support for JavaScript modules. I have a parent theme that exports a JavaScript class, and I want to import this class in a ...
Nani samireddy's user avatar
-1 votes
0 answers
24 views

How To Convert a Downloaded Site Into a Theme

I have downloaded a website (appinventiv) using the HTTRACK tool, and once the downloading has completed I was trying to convert it into a WordPress theme, all the images are displaying well but css ...
Ridhi Garg's user avatar
1 vote
1 answer
37 views

How to add translation for FSE theme?

How to fulfill this requirement for FSE theme "All theme text strings are to be translatable." ? I am using esc_html_x() to translate string in my patterns Example <?php esc_html_x('...
Stephen Paul Samynathan's user avatar
0 votes
0 answers
10 views

Capture the Selected Radio Button Value between two files in wordpress theme

$html_output .= '<div class="form-group"> <label><input type="radio" name="driver_type" value="society" checked required> ...
amine asfar's user avatar
1 vote
1 answer
28 views

What is considered good practice for registering menu locations?

I decided to try my hand at creating my own WP theme from scratch. I've made a header, a navbar, and a footer so far. I've also registered a couple menus, so my navbar will be populated automatically ...
ArceusLegend50's user avatar
0 votes
0 answers
15 views

Smooth Scrolling Animation of Image Between Two Containers (Elementor) Using JavaScript and GSAP

I am trying to achieve a smooth scrolling animation in Elementor where a Cola can image moves from one container to another container as the user scrolls down or up the page. please see attached. I am ...
Brango's user avatar
  • 1
0 votes
1 answer
16 views

How to create new title and its description inside a section in WP Customizer?

Actually, I want to add a new title General settings with a small text description of it in a new section that I've created in the WordPress Customizer. The section is already created and works well, ...
Sam94's user avatar
  • 15
0 votes
1 answer
37 views

Activate Gutenberg group block for theme

I using the Timber Starter Theme for my website and would like to group multiple blocks through the Gutenberg block editor. Unfortunately, the group option isn't available. I'm wondering what needs to ...
obs's user avatar
  • 103
0 votes
0 answers
17 views

Composer dependency

Hello there I'm working on Wordpress plugin. How do i prevent version conflicts with other plugins or themes. Please is there any working code ? Help me please
Blessing Makwale's user avatar
0 votes
0 answers
30 views

How to add multiple custom blocks in custom Wordpress theme using create-block?

I want to add multiple custom blocks to my custom wordpress theme using create-block package. In my root folder I initiated package.json by running npm init -y and added wp-scripts as a dev dependency....
chupapimuyanya's user avatar
0 votes
0 answers
21 views

I want to move the one click accesbility button on bottom of my website screen,

I want to move the one-click accessibility button on bottom of my website screen,Kindly give me a code for that
user243103's user avatar
0 votes
0 answers
20 views

Adding features to Gutenberg without theme.json

I am using a non-block theme for my website and am using Gutenberg for writing posts. I want to extend Gutenberg's functionality by adding the image lightbox feature. So I added a theme.json file to ...
Ryan's user avatar
  • 1
0 votes
0 answers
21 views

How to enable wc_add_to_cart_message?

I faced a problem and I have no idea how to fix that. I enabled "Ajax add to cart", and now wc_add_to_cart_message now shows the message that says "X added to your basket." I ...
Sallar Rabiei's user avatar
0 votes
1 answer
27 views

Export Wordpress theme with modifications for other site

I purchased wordpress theme. No i have upoloaded it on new site and modified it as i wanted. Now i want to use that theme in my all sites. Problme is theme also saves its oevrride stuff or ...
kgill's user avatar
  • 1
0 votes
2 answers
49 views

How to use meta_query to retrieve posts from multiple custom post type

I am having two custom post type "meet_our_community" and "news" I have added a checkbox field named 'add_to_meet_our_community' from the acf to 'news' post type. Now I when tried ...
Amal's user avatar
  • 1
0 votes
2 answers
20 views

How to build help pages similar to Wordpress Developer Resources

We need to build a help page similar to Wordpress Developer Resources (see the screenshot below). We're problably looking for a developer solution as we haven't found any plugin that would fit our ...
Łukasz Korona's user avatar
0 votes
0 answers
40 views

WP Update Messages get cut off during Theme update

I created a custom class for updating my custom theme. It has been working well for several months but the usual WordPress messages during upgrade get cut off when any upgrade process is running. The ...
ToongeePrime's user avatar
0 votes
0 answers
28 views

WordPress theme.json: Why doesn't "contentSize" work

On the WordPress 6.5.2 version, in the theme.json file, I have the following code { "version": 2, "settings": { "layout": { "contentSize": "...
Sergey Gabrielyan's user avatar
2 votes
0 answers
24 views

Registering a block in "My Patterns"

I have created a bunch of blocks, and every time I have saved it as a pattern by selecting the block in the list view > three dots > Create pattern. All these patterns appeared in a new category ...
willywilly's user avatar
3 votes
1 answer
86 views

How to add group-row to InnerBlock template?

We are trying to add a group-row to our InnerBlock template. Now there is a core block called core/group which works when being inserted. The core/group has variations as group-row. But when inserted ...
user241943's user avatar
1 vote
1 answer
107 views

Checkboxes on custom `WP_List_Table` also check select all

In a bespoke theme, I have a custom class that extends WP_List_Table. The relevant parts look somewhat like this: class Custom_List_Table extends WP_List_Table function get_columns(): array { ...
ACJ's user avatar
  • 63
0 votes
0 answers
88 views

How to create a template for a post in Query Loop block?

Let's say I want to use WordPress' block builder to construct a page, and for one of the sections I use the Query Loop block. In the "List View" (layers panel sidebar) I can add and remove ...
Dane Rossenrode's user avatar
1 vote
1 answer
98 views

Disable creating sort index SELECT post_modified_gmt

strangely my theme doesn't have the function that generates queries like this SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER ...
Công Tử Huyết's user avatar
0 votes
1 answer
39 views

Home.php not working with underscores

I have a clean install with reading settings set to static page and blog index set to a page named 'Blog'. According to the codex home.php should be the template in use for the blog index, but ...
NotaGuruAtAll's user avatar
0 votes
1 answer
47 views

Best approach to change mobile background image and adding its class

I have extended core/group block to add different background image when its being viewed on smaller view port. I would like to know what will be best approach to add class name here which I did in my ...
up1512001's user avatar
0 votes
2 answers
13 views

Custom add to cart does not work well only on the first time

I have foreach which loops through product and create custom add to cart links, for the first time I've got redirected to cart and product was not added to cart, but if I go back to homepage and add ...
Martin Orešanský's user avatar
1 vote
0 answers
22 views

Custom loop menu is not working

I am using the below code to create a custom WordPress menu for mobile. With this code, nothing is return. Even the menu is not retrieving. Can anyone assist me with this? This is a multilingual ...
user2584538's user avatar
0 votes
1 answer
37 views

WordPress move current to top in the loop

I have this code to loop coupon codes in store page. Current coupons open in same page of store page. I want move the current coupon to top of loop. <?php while ( have_posts() ) { the_post(); ...
user3418508's user avatar
0 votes
1 answer
30 views

Unwanted spacing for cover block

I am running into issues when using the cover block. I created the following header with the cover block: Unfortunately there is more space to the top when using the cover block which makes the ...
Marzii's user avatar
  • 23
0 votes
0 answers
590 views

Custom PHP Template in Twenty Twenty-Four

I am trying to use a custom php template in the latest theme and not only it has an file editor, there is no place for me to paste my template file. This is a template file for a custom post type so I ...
Sid's user avatar
  • 129
0 votes
1 answer
34 views

Style categories block in query loop

Within a query loop I wanted to display the category of the post. Therefore I used the categories-block: I want it to look like this: I did not find an option to style this block in the theme.json. ...
Marzii's user avatar
  • 23
0 votes
1 answer
27 views

Homepage with latest posts does not include current-menu-item

I have selected the following settings in WordPress: And created a navigation with two links: The Work link should link to my homepage which is why I set the URl to /. This works perfectly fine. ...
Marzii's user avatar
  • 23
0 votes
0 answers
35 views

Trying to create a cutom query with pagination and page 2 breaking. Any help?

This is what I have tried so far: <?php /* Template Name: Archive-posts */ ?> <?php get_header(); ?> <main id="primary" class="site-main"> <div class=&...
Ivan Bezerra's user avatar
0 votes
1 answer
24 views

Where to find the category page in Bosa Theme

I have a WP site based on the Bosa Restaurant Cafe theme. I gave fully customized it by editing the php files, since it is easier for me to edit the files becaues the customizer don't have many ...
Adam Basha's user avatar
0 votes
1 answer
155 views

WooCommerce custom add to cart buttons does not add products to cart if you're logged out

I'm actually doing custom template for my client. My client want to have few specific products to show with their add to cart button on homepage. On internet I didn't found the answer for this ...
Martin Orešanský's user avatar
1 vote
0 answers
12 views

WP Bootstrap NavWaker: Dropdown Menu Opens All Dropdown Menus at Once

I'm having difficulty implementing a dropdown menu with Bootstrap and WordPress. I've used filters to add the 'dropdown-toggle-split' class to the link elements of menu items that have submenus. ...
Hendra's user avatar
  • 15
1 vote
1 answer
53 views

User set default settings for a Block in Site Editor

For a block I want the user to be able to set a couple of defaults for each newly generated block, think e.g colors and other attributes. Then every time a new block is created on the website, the ...
Sina's user avatar
  • 111
0 votes
0 answers
9 views

Trying to create wordpress pagination and breaking while live [duplicate]

I have been coding a pagination for my WordPress site, for a custom post query. and while it works just fine in my local machine it breaks online. I get a 404 when trying to click on page 2, while ...
Ivan Bezerra's user avatar
0 votes
0 answers
29 views

Lazy loading in my own WordPress theme

I am designing a theme for WordPress and, as I read in the official documentation, the loading="lazy" parameter is added only since WP 5.5 as long as the post images have a defined width and ...
Javi's user avatar
  • 1
0 votes
1 answer
43 views

How do I access the current post object within a block theme template or pattern?

How should I be able to query things like specific metadata or any other thing from the post object? Apparently I don't have access to basic functions like get_the_ID() or similar functions inside ...
thebigJ's user avatar
0 votes
1 answer
56 views

How to customize password reset message page on success if no error in password reset

I tried login_message filter with $_GET['action'] && resetpass but I want it on success password message page.
Wordpress developer's user avatar
0 votes
2 answers
228 views

Querying by post category slug with core/query block markup

I know how to query all posts in a certain category by slug with WP_Query. What I would like to do is the same with the core/query block markup. I am able to get it working with the category ID, but I'...
JDQ's user avatar
  • 149
0 votes
1 answer
82 views

Dropdown Toggle Split in Bootstrap Navwalker Wordpress

It's about Wordpress Theme Development. When working on a WordPress theme using Bootstrap 5, I used Bootstrap NavWalker to create a navigation bar (navbar). The dropdown feature is already built into ...
Hendra's user avatar
  • 15
0 votes
1 answer
88 views

Only show read more text when when wp:post-excerpt meets excerptLength

NOTE: The issue I'm encountering is specific to Block Themes; I understand how to filter the text returned from the_excerpt in a Classic Theme. What I would like to only show read more text when when ...
JDQ's user avatar
  • 149
0 votes
0 answers
103 views

Wordpress 6.4.2 - can't load editor style css using 'after_setup_theme' or 'admin_init' actions

My hosting company upgraded my remote Wordpress version of my site to 6.4.2 and as I mentioned in a previous ticket alot of things stopped working. One item that seems to be broken are the custom ...
Mike Sav's user avatar
  • 127
0 votes
0 answers
22 views

Why is wp_nav_menu() not removing the container around the nav <ul>?

I am trying to remove the <div> that wraps the <ul>, but when I set 'container' to false or '' the <div> still shows up. Why is it not being removed? Example with false: <nav id=&...
JayDev95's user avatar
  • 179
1 vote
1 answer
299 views

Convert base64 string to WordPress attachment uploads multiple images instead of a single one

I'm trying to convert a base64 string to an image file and upload it into WordPress media library. It seems like the code is working, but, for some reason, every time I call this function it uploads ...
benjah's user avatar
  • 111
1 vote
1 answer
29 views

WP "optimizing" PNGs into thumbnails 5X larger than originals - FIX

As I am about to add over 50,000 product photos to a site in development, I am more than concerned about the thumbnails being generated and “optimized” by WordPress. Between WordPress, Woocommerce, ...
Swapot's user avatar
  • 11
0 votes
0 answers
59 views

ACF Pro simple Business Directory - Requesting assistance with created Templates and associated Functions.php Coding

I want to replicate the basic Business Directory functionality found at this URL. We've not had any luck with off-the-shelf software and our needs are very basic. https://onetopanga.com/directory This ...
Micah K's user avatar
  • 15

1
2 3 4 5
90