Questions tagged [theme-development]

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

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

How to add a class name at visited links in wordpress

See the sidebar of the image. I want to add a class name in the visited post link. Like when someone clicks on Web Design, the Class name will be added in li tag of Web Design. Here is the code of ...
0
votes
1answer
11 views

Website layout not matching purchased theme's demo

My website is: threepillarsin.wpcomstaging.com The original demo is: https://themes.envytheme.com/ecademy/ My website seems like it is breaking. Can someone please suggest what changes i need to make ...
0
votes
0answers
14 views

Bootstrap Navigation

<div class="mobile-menu"> <ul id="mobile-menu" class="menu"> <li class="dropdown"> ...
0
votes
0answers
13 views

Google Web Core Vitals - management, how to in wordpress and advice

I maintain several small websites and know my CSS and HTML. However, when it comes to javascript and server side optimisation, I have no idea. I was advised to ask my question here where I initially ...
0
votes
1answer
18 views

How to change footer credit text in Twenty Twenty One theme with a hook?

If I want to change the footer credits, I would usually copy the footer.php to a child theme and edit the following snippet: <div class="powered-by"> <?php printf( /*...
0
votes
1answer
20 views

Wordpress theme header.php should I add title meta?

I am making a theme for WordPress and I have noticed that most themes does not have meta in them Is there any specific reason for this? Am I allowed to put custom metas such as keywords that are SEO ...
0
votes
0answers
39 views

When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php

When I click on a link to redirect to 'single_assignment_page.php' it is not showing the content of this page but it is showing the content of 'index.php'. That's something I don't want but in the URL ...
1
vote
0answers
24 views

How to set up VS Code for WP plugin/theme development in 2021?

I'm trying to improve my WP theme and plugin development workflow. VS Code is my editor/IDE of choice and I'm pretty with it in general. However, setting up VS Code with debugging, formatting, linting ...
-1
votes
0answers
4 views

Use PurgeCSS with Gulp Dev and Bootstrap [migrated]

Please I need your help to use PurgeCSS with gulp in a WordPress theme to remove unused styles from Bootstrap. Here's my gulpfile.babel.js code thank you in advance :-) import { src, dest, watch, ...
1
vote
0answers
19 views

image url relative path not working in css file

When i write this in css file image will loaded background-image: url(http://localhost/wordpress/w3/wp-content/themes/test_theme/images/img.png) if i write this in css file image will not-loaded ...
1
vote
2answers
32 views

Create a customizable child theme

Here's the situation: I've created a child theme that enhances a popular parent theme. The enhancements include CSS, JS, and php. I want to use this child theme on multiple sites, and I want to allow ...
0
votes
2answers
28 views

How to implement a $_SESSION alternative in Wordpress inside a theme without a plugin?

I want to show a popup to the first time visitor of a Wordpress site. I tried to check the visit state using $_SESSION. Something like this in the footer.php: <?php if(!isset($_SESSION['pxpop'])) ...
0
votes
0answers
11 views

Social-Link block not loading html on page with custom theme

When I use the Gutenburg Editor to add Social Links to my page it does not load the html on to the page. it shows the standard wordpress commenting (as shown below) but no html below it <!--wp:...
1
vote
0answers
19 views

Which html elements should be styled in wordpress theme

At the Wordpress Codex said next: All possible HTML elements should be styled by your theme (unless it is a child theme), both in post/page content and in comment content. Tables, captions, images, ...
0
votes
0answers
34 views

How to diagnose wp-env environment problem

Short version % node -v v14.16.0 % npm -v 7.6.1 % wp-env --version 3.0.2 % npx @wordpress/create-block foo ... Done: block "Foo" bootstrapped in the "foo" folder. % cd foo % wp-env ...
0
votes
1answer
18 views

Why nav_menu_css_class doesn't work with apply_filters?

I was trying to add css class to nav items. The documented function call in WordPress docs was apply_filters( 'nav_menu_css_class', string[] $classes, WP_Post $item, stdClass $args, int $depth ) But ...
0
votes
1answer
20 views

Does size of a theme's functions.php file matter?

I created a custom theme for my website and I'm in the process of updating the theme to work with Gutenberg. So far the file size of the theme's functions.php file is currently 1.9MBs. Does the file ...
0
votes
0answers
9 views

Customize Menu Structure Creating a Section Where you can add icons/imgs

Basically i would like to add a section in "menu structure". So, when i access to any page/post i can create (for example) a select with some font-awesome icons class to every single <li&...
0
votes
0answers
8 views

img sizes show only one value

Setting up a new theme, I realize WordPress is outputting only one value in sizes. for example: <img src="https://site.dev/img-1-324x324.jpg" loading="lazy" srcset="https:/...
0
votes
0answers
13 views

How to add quick edit on the list of users to edit custom fields?

Hope everyone is doing well, I need to add quick edit action or bulk edit option on the list of users so that I can edit custom fields of an user. Thank you in advance!
0
votes
0answers
17 views

No wordpress installation even though wordpress is installed

Im using VCCW (vagrant), I upgraded from php7.0 to php7.4 so that i could use the sage starter theme (roots.io), After upgrading to php7.4 everything was fine however after running composer install ...
0
votes
0answers
7 views

How to create post comparison in wordpress

I am creating a feature in the child theme which is vehicles(car) comparison. the checkbox will add the vehicles(car) in the compare list from the car listing page. and compare page will give the ...
0
votes
1answer
129 views

Error : “Updating failed: The response is not a valid JSON response” with custom shortcode

I am building a theme into which I have integrated data recovered by an external API. I chose to create a plugin in which I put all my data processing, it allows me to generate a shortcode with which ...
0
votes
0answers
10 views

GitHub `access_token` depricated. How to set Wordpress theme update download link with `Authorization HTTP header`

I'm getting emails from GitHub to change my code and stop using access_token in the url query. But I don't know how to do this with Wordpress. With the update code I want to grab updates from my ...
1
vote
1answer
27 views

Exclude category from

I am trying to exclude a category from <?php the_category(', ') ?> inside my loop. I came across the following code on CSS tricks that says would solve the problem. You add this to the functions:...
0
votes
1answer
22 views

Can't select my block by clicking on it

after uploading a photo my block is selected, so I can change properties. But when I select another block, then by clicking on that photo I can't select my block. I can select only through list view. ...
1
vote
1answer
19 views

Add theme support for post thumbnail isn't working from theme class

I have a theme class that I bootstrap my theme in and add the theme support but the featured image meta box isn't appearing. Inside the class file: class WCS_THEME { private function ...
0
votes
1answer
22 views

How can i use archive.php for indexing wordpress default posts?

I am developing a wordpress theme. In my theme there are a custom post type 'project'. This 'project' post type using archive.php page to index all projects . I want to use archive.php also for ...
1
vote
1answer
23 views

How to override checkbox styles if these inputs have a unique id [closed]

I'm trying to override default input checkbox styles, but not good result. First of all these checkboxes and labels have unique ID. But if I try edit these checkboxes, no effect, because every ...
0
votes
0answers
13 views

How to display site title, if logo is missing in customize?

I want to display website title, if logo is missing in customize my codes for logo, functions.php add_theme_support( 'custom-logo', array( 'height' => 100, 'width' => 400, ...
0
votes
1answer
17 views

how can i remove js file from my footer in wordpress

i want to remove a specific js file from specific template. i have seen sone solutions and try them but got no result. following i am writing the code which i tried. add_action('wp_enqueue_scripts','...
0
votes
0answers
19 views

Unpublished Pages Failing To Appear On Custom Path

The Context I have a domain, we'll call it example.com, where traffic travelling to this domain first hits a reverse proxy and depending on the path it is directed to two different containers. Traffic ...
0
votes
1answer
30 views

WordPress Admin bar missing from custom theme

I'm working on a WP site which has a custom theme built from scratch and I can't seem to figure out how to get the Admin Bar to appear when viewing the public site. The themes footer.php file has the ...
0
votes
0answers
16 views

Custom Enfold theme tab layout not compatible with WPML

I'm trying to create a new page with the Avia Layout Architect but there are some problems. I used the health check plugin to disable all plugins and tested if the tab works with my custom theme, ...
0
votes
1answer
25 views

Wordpres core-update theme renames theme folder name

I've got a theme that checks for a new version on GitHub. When it finds a new version it downloads it and install it. The problem is that it installs the theme with a different folder name than ...
0
votes
0answers
35 views

Attribute form NumberControl doesn't update when I update page before it lose its focus

I am creating my own block. And I've got a problem. My scenario: I update attribute through NumberControl (it doesn't lose focus yet). I click "Update" page button. And an attribute from ...
0
votes
1answer
20 views

Impossible to declare box-shadow with wp.customize?

I'm trying to put a section in the customizer where you can choose how to put a box-shadow in a h1. The problem is that i need to write the whole box-shadow box at once, is not like border where you ...
1
vote
1answer
51 views

How to call WooCommerce update cart function programatically

I am rendering WooCommerce Cart items in a custom html table wrapper by a form that points to a custom PHP file. <form class="woocommerce-cart-form" action="/update-cart.php" ...
0
votes
0answers
9 views

Hook action after user profile page WP Dashboard is updated / saved

There is the "edit_user_profile_update" and "personal_options_update" - but as I understand, they can't help me on it. I have the following function: add_action( '...
0
votes
1answer
29 views

Ajax: Populate <div> with content from a post's ID not working - duplicating current page html instead

Ok guys and gals, I'm losing my mind here... I am looking to append the content and a custom field of a post to a div on page. The ID of the content and custom field is defined by a data attribute on ...
0
votes
1answer
9 views

how to hide empty fields of post category description?

I am creating one website from scratch, where I have to display Category description, how to hide the div, if there is no description written in backend for the post category? my codes are: <div ...
0
votes
0answers
18 views

Build wp/wc forms from scratch

I am working on a theme but i cant find anywhere how to create my own forms from scratch. I am talking about all the different forms like comments, adding a product to the cart, etc... They all have ...
0
votes
1answer
20 views

woocommerce: Customize email with item total count

i looking everywhere, but not found this functions, i need to calculate the total items in the report email new order,i think is (admin-new-order.php) so i need to see the numbers total products in ...
0
votes
0answers
37 views

Loop categories with query

Is it possible to create a query for get the categories and sub categories? I want a more advanced query for this and get_terms or get_categories is not enough for me.
1
vote
1answer
22 views

How to make wordpress theme iframe responsive

I am currently developing a theme and in my theme youtube video embeds and other video embeds are not really responsive. I found so many posts how to make iframe responsive with plugins. But i need to ...
1
vote
1answer
16 views

Open Post Thumbnail in New Child Theme File in Wordpress

Today I am stuck in a new problem using WordPress Theme Development. What I'm going to do is to open a Thumbnail image in a new separate child theme, when the user clicks on the anchor tag. Example: ...
0
votes
0answers
15 views

Adding an optional page title with background image to custom page templates (or all pages for that matter)?

I will explain what I’m trying to accomplish as I am having a difficult time figuring out the best way to ask this question. I have a custom theme that I am working on. I have several custom page ...
0
votes
0answers
14 views

Best way to give user the option to make a menu, mega menu?

i am developing a WordPress theme for themeforest and i was wondering whats the appropriate way to give the option to user to make a menu, mega menu. currently my way is that user has to go to ...
1
vote
0answers
17 views

Use register_setting() in a loop

I try to use the function register_setting() in a loop but the settings are not set. This is my code <?php add_action( 'admin_init', function() { $registerSettings = array ( '...
1
vote
0answers
15 views

Blog page not working

I'm working on a WordPress theme. I'm using Elementor as my page builder. I have created some Elementor elements for my theme. but the problem is when I create a page and select it as my post page not ...

1
2 3 4 5
85