Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [theme-development]

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

0
votes
0answers
8 views

DIVI - Child theme modify footer siderbar

I would like to modify semantic H4 (default DIVI) by span with custom class CSS. In my child theme function et_widgets_init_overwrite() { register_sidebar( array( 'name' => esc_html__( '...
-1
votes
0answers
22 views

Including WP-Load Causing Issue on PHP - MySQLi Prepared Statement

I have a custom php file and trying to run WP_Query there by including the wp-load.php file there. The file is simply getting some data from external table like require_once "config.php"; $myArray = ...
0
votes
0answers
11 views

How do I add a loop to featured images?

I'm adding multiple images to featured images. And the theme I use is taking them as a preview. For example, I add 10 pictures. They are in turn playing just like a video preview. But he keeps going ...
0
votes
1answer
12 views

How to show Custom Field Value in Woocommerce Shop Page

remove_action('woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title',10); add_action('woocommerce_shop_loop_item_title','fun',10); function fun() { echo 'custom_field_value'; } ...
0
votes
2answers
14 views

Anyway to output the registration form like the login form with wp_login_form()?

I'm trying to create a dual login/register page with WordPress and so far I found out I can create my custom template and then output the login form with wp_login_form, however I cannot find any ...
0
votes
1answer
11 views

add class to all images inside the content

I have a function like this : function add_responsive_class($content) { $content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8"); if (!empty($content)) { $document = new ...
-2
votes
0answers
20 views

Webmail not working in Gmail [on hold]

I have connected my webmail server to Gmail so that any email come to my Cpanel webmail will directly transfer to Gmail. Recently i have uploaded my website to Cloudflare. After uploading, my webmail ...
0
votes
0answers
13 views

ERR EMPTY RESPOSNE on ajax delete request in wordpress

I am trying to delete a post with REST api endpoint. evry thing is working fine on local. but on live(000webhost server) its giving error with no response text. http://mylivesite/wp-json/university/...
1
vote
1answer
20 views

WP_bootstrap_Navwalker_issue

I have put a navwalker in my bootstrap wordpress which gives me a fatal error Fatal error : Uncaught Error: Class 'WP_Bootstrap_Navwalker' not found in A:\xampp\htdocs\wordpress\wp-content\...
0
votes
0answers
14 views

Add fields to the top of widgets form

i have read this and create custom fields : How to add Custom Fields to Settings in Widget Options for all Registered Widgets? but i want to add this custom fields to the top of all other fields . (...
-1
votes
0answers
25 views

How to echo inside the js file with wp_localize_script?

I have used wp_localize_script() to pass a variable to a javascript file. var countries = [searchresults.data]; The variable is getting passed but I want it in a js file like below: var countries = ...
0
votes
0answers
7 views

What's the best way to remotely colloborate on redesign while keeping existing site live?

As the title asks, what's the best way to redesign a small informational website while keeping the old design live? The overall goal is to allow two people to colloborate remotely on a test site (...
0
votes
0answers
7 views

Menu to the right of screen on desktop using Bootstrap 4

I'm fairly new to WordPress development and would love to learn as much as possible. I am building a theme from scratch and using the wp-bootstrap-navwalker (https://github.com/wp-bootstrap/wp-...
0
votes
0answers
24 views

Show all menu levels except top level. How to exclude top level of a menu?

I have a menu that looks like this: Women and Men har the top level menu items while the lower nagivation menu items are the children. The menu structure looks like this: Women New styles ...
0
votes
0answers
20 views

Featured posts reordering without plugin - Newspaper theme

I am using Newspaper (child) theme where the 2 carousels display the 11 featured posts (first 5 in the main carousel and the following 6 in a secondary carousel). We used to use a plugin to reorder ...
1
vote
2answers
36 views

How do I create a custom partial / template?

I have created an sign up form and placed it in my header: <div> <h5 class="myapp-sign-up-text">Sign up for updates</h5> <form class="myapp-email-form"> <...
0
votes
1answer
17 views

Unable to delete option

I am able to delete the option with form action admin-post.php but it gives me a blank page after clicking the button <form action="<?php echo admin_url('admin-post.php'); ?>" method="post"&...
0
votes
0answers
17 views

Delete WP option with a click of button [duplicate]

I want to delete an option from the wp-options table when clicked on a button in the back-end. i have created an option with this : get_option( string $option, mixed $default ); is there any ...
1
vote
0answers
12 views

How to display all subpages and short by year

How can I display all child-pages and short by year in Wordpress For example: all subpages in 2016, 2017, 2018: • 2018: ----- Subpage A ----- Subpage B ----- Subpage C • 2017: ----- ...
0
votes
0answers
11 views

How to create page in admin panel. that show pending post list

I want to create new page under posts menu, that just show pending posts list. I create page under post, but i dont know what should write in function add_action('admin_menu', 'my_theme_menu'); ...
1
vote
1answer
28 views

How do I get current page ID in Wordpress customizer file?

I'm trying to hide or show customizer settings based on what page I am viewing similar to active_callback' => 'is_front_page', however, I haven't found a way how to access the current page ID from ...
0
votes
0answers
14 views

Trying to find a specific theme - any ideas where to look? [closed]

I want an admin dashboard theme. I have a membership subscription business in which I charge my customers to access very specific data and this is all done using membership plugins and simply ...
-1
votes
0answers
26 views

strange behavior with update_post_meta

I am updating custom post meta values through a frontend form with ajax, and i have two fields, one is a select form and the other is a Bootstrap Datetimepicker input, which i've localized to Arabic. ...
-1
votes
0answers
6 views

How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?

I want me to move the product info (name, price) from under each Woocommerce product image on the shop page to only be seen via Featured Image Rollover (instead of the current rollover info.) Pretty ...
0
votes
0answers
13 views

Massive wordpress (The Flavour) issues

Built wordpress content with brizy on the dashboard. Everything is done and ready to go live. However the template keeps showing up on the site instead of my new content. The home page has my ...
1
vote
1answer
12 views

Should I change text-domain of TGM library inside theme?

I created a theme and I want to publish it in wordpress.org. I used TGM library to check to require plugins. but the Theme-check get bellow warning: Warning: More than one text-domain is being used ...
2
votes
0answers
37 views

Edit srcset and sizes attributes in Gutenberg image, cover and gallery - blocks

I am looking for a way to adress the responsive srcset and sizes attributes on Gutenberg image blocks - like image, cover and gallery. Usually one would do this with the '...
-1
votes
0answers
26 views

How do i change the text and icon of Woocommerce social icons in WordPress on the product archive pages?

In my Woocommerce single product page, I have social share buttons that i would like to change the text, as well as each icon. For example, change the facebook from "share on facebook" to "share on fb"...
1
vote
2answers
36 views

wordpress custom theme import and export options for sample data [closed]

I am Created WordPress custom theme as per Html template. it was worked fine. now I am trying to create custom export/import functionality for my custom created theme. but I don't have found a better ...
-2
votes
0answers
18 views

Can i get $this->get_id() in javascript into elementor?

I want to get $this->get_id(); in javascript into custom elementor. can anyone have answer for this question?
0
votes
1answer
20 views

Is it possible to edit the styling of the admin panel from within a custom theme?

I'm making a custom theme. I know from reading around that I can make a custom admin theme by creating a plugin, but I would prefer to keep everything contained within just my custom theme. ...
0
votes
1answer
27 views

How to safely return the HTML?

I have return '<button type="button" class="btn btn-success">Open Now</button>'; If I echo this it will work fine. I am getting an warning like echo is used without escaping. I know ...
0
votes
0answers
24 views

How to paginate across foreach loop?

I want to paginate a lengthy page, but it is not about paginating a post loop. My site has thousands of posts of type "article". And taxonomies including "company" and "format" - an "article" can be ...
0
votes
1answer
25 views

Cold Fusion to Wordpress

I've been tasked with moving a website from cold fusion to wordpress. In the old site there are several templates that are brought into the site via cfinclude. I've coded most of a custom wordpress ...
0
votes
0answers
21 views

How do I left justify top menu in 2017 theme

It’s not a theme customization menu option. Can’t find it in the css file either. Can anyone help or point me in the right direction
0
votes
1answer
29 views

Where i should not use if (!defined('ABSPATH')) { exit; }?

I think this best way to prevent direct access.. <?php if (!defined('ABSPATH')) { exit; }?> i have used this on all my php files..can it create problems? any files on WordPress theme i should ...
1
vote
2answers
83 views

How to Globally Use wp_localize_script() Ajax URL

I have added this to my functions.php and need to use ajaxURL in all of enqueued scripts in the template (instead of enqueuing only one script here add_action( 'wp_enqueue_scripts', '...
0
votes
1answer
32 views

Which cache is kicking

I have been struggling with a site that I inherited from another developer. My main problem is that, changes I make in the css file of the template don't get picked up right away, indicating that ...
0
votes
0answers
12 views

wp_nav_menu() filter - preg_replace value returned wrong

I'm having an issue where the filter I've added to wp_nav_menu() is adding code to the second level of the navigation. How can I change the filter or the preg_replace code in a way that only adds it ...
0
votes
1answer
14 views

How to display latest posts with authors image

how can U get latest posts from a specific category and post them with the picture of the author. All authors are signed as an author on WordPress and they all have profile picture. Actually it will ...
0
votes
0answers
24 views

WordPress panel is not loading after plugin activated with error: HTTP ERROR 500

when i try to activate Yoast Seo Plugin, my WordPress panel stop loading and the browser displays: HTTP ERROR 500. I checked my error_log file and there was this error: call_user_func_array() expects ...
0
votes
0answers
9 views

Different WP Rest API custom endpoints across different themes

I have created a custom theme on Wordpress with custom WP Rest API endpoints. This is how I have set it up. Theme name: Theme 1 Added below line in functions.php require get_parent_theme_file_path( ...
0
votes
0answers
20 views

What is the recommended way to save errors / warnings / user messages from actions / filters for custom display in the frontend?

This is a very basic question and there are a lot of solutions to it - however what is the recommended (or at least a good) way? Problem statement: While processing a request to a WordPress project ...
0
votes
2answers
23 views

How to make animated intro?

There are a few websites that I stumble upon now and then that have animated intros like the one here: www.monotwo.com How do I do that in WordPress? And how would I integrate this into a customs ...
1
vote
0answers
25 views

Adding custom class to get_avatar() image doesn't work

Instead of outputting <img alt="" src="#" srcset="#" class="avatar avatar-60 photo" height="60" width="60"> I want to add custom class which looks like <img alt="" src="#" srcset="#" class=...
0
votes
0answers
16 views

My page got to many DOM elements (still loading fast though)

So we are building a new webshop on the Wordpress/WC platform and we bought a theme on the Envato Market. I am trying to optimize all of the things at this moment and we are getting some pretty ok ...
0
votes
1answer
28 views

Menu is in Reversed order

I cannot seem to figure out why this menu is in reversed order only for Mobile. site-navbar.php <div class="menu-container"> <div class="menu w-full mx-auto container xl:pr-16"> ...
0
votes
1answer
12 views

How to set different localization file for different users?

I am trying to load localization file depends on users settings. Is this way is correct or there are better ways to implement locale changing depends on user settings? <?php ...
0
votes
0answers
10 views

Add tax status to products in header mini cart (woocommerce/storefront)

I have a site running woocommerce with a storefront child theme, and I need to add the tax status of each individual product as a class in the html within the header mini cart. I figured there must ...
1
vote
2answers
33 views

Same ACF on two different pages

I've made quite an extensive page.php using ACF-repeaters and the flexible content module (1000+ lines of code). The code is getting really spaghetti-like, and I'm not sure how to structure it so it's ...