Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
564 views

Add multiple sections, settings and controls at once to the Customizer

I am trying to make a slider configurable via the customizer. In order to let the user decide how many sliders he wants, I added a setting where the user can enter a number. Based on this number I ...
6
votes
1answer
295 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 '...
0
votes
1answer
30 views

Proper use of Output Buffer for a whole php clas

For my ajax popup login i want to use Output Buffer for a whole oop php class. I just want to start buffering from the start of class and end it when the class is finished. class Wp_Ajax_Popup_Login {...
0
votes
1answer
10 views

Disqus comment system not show

I've installed the disqus comment system plugin. I need some help to use it, I'm not able to display the comment box inside my post or pages. I'm using a custom theme, and there is no a comment.php ...
0
votes
1answer
35 views

the_content() not displaying description correctly

I'm trying to display a description of a WooCommerce single product, but the instead of displaying the correct description, the loop starts over again displaying the image, price, add to cart etc. I'...
23
votes
4answers
11k views

Why does WordPress use outdated jQuery v1.12.4?

While checking the source code, I saw that WordPress uses jQuery v1.12.4. Why does WordPress use this outdated version of jQuery?
0
votes
1answer
20 views

use a single nonce in three different nonce field

i want to use a single nonce in three different form (login, register, lost password). But I am not sure how to use nonce in wp_localize_script( $handle, $object_name, array() ). In here $handle ...
0
votes
1answer
29 views

Import/Export WordPress demo

We are a team of developers who are beginning to publish our theme on Themeforest. We are facing an issue in presenting the demo of our theme and wanted to seek your help. Whenever we try to export ...
0
votes
1answer
21 views

Templates without a loop, best practice?

I'm working with a custom theme that someone else created, and it's becoming obvious the author(s) were not familiar with WordPress. I'm doing cleanup and I'm just finding all sorts of bad things. ...
0
votes
2answers
18k views

3 Level Deep Navigation Menu Not Showing All Levels

I have a 3 level deep navigation menu which will show beside all pages on the site except the homepage. The issue is only 2 of my 3 levels are showing in the menu when displaying it using the ...
1
vote
1answer
24 views

Get a setting value conditionally in the Customizer api

I'm doing this the normal way, instead of refresh I edit the element with JS according to the user selection, but in one case, I need a value that depends on another value and I can't get that. Here'...
1
vote
1answer
519 views

What is better way to use Bootstrap inside admin panel?

I need to use Bootstrap CSS for better UI in wp-admin but if I enqueue the bootstrap.css, it's affecting the admin default UI by changing background colors, etc. How can I use bootstrap.css inside wp-...
0
votes
1answer
13 views

Fatal error: Class WP_Customize_Image_Control not found

I'm using WAMP on Windows 8.1 64 bits to develop a custom theme. Right now, I'm getting the following errors when trying to create a custom control with the WP_Customize_Image_Control class: Fatal ...
0
votes
1answer
524 views

WordPress Customizer Help with FontAwesome Icon

Here's the scenario - I want to select fontawesome icons from the dropdown list but it's not working. For some reason the class inside span is not adding up (I have tried jQuery().append(), CSS) but ...
1
vote
3answers
41 views

Wordpress Theme Development: How to redirect templates the right way?

I'm developing a theme for WordPress. I have a doubt about templates redirect. For example, I have a theme that have the front-page.php template and I don't use the index.php template. What I should ...
1
vote
1answer
21 views

Theme Development: Starter Content after hook

I'm making a Wordpress theme that generate placeholder menus using the theme support "starter content". I read the documentation and is very vague: https://make.wordpress.org/core/2016/11/30/starter-...
1
vote
1answer
599 views

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme <?php /** * Template Name:Zoho testAPI * * * * */ echo phpinfo(); ?>
2
votes
4answers
78 views

Getting the wrong page ID

I am developing a theme and I need to get the actual page ID, when I do: global $post; $thePostID = $post->ID; I get the wrong ID. I tried get_the_ID() and I get the same ID that in the code ...
0
votes
0answers
15 views

Custom theme index layout not displayed correctly

I'm making a custom theme that I'm planning to sell. I'm reading some guides about themes creation, I have already experience with wordpress but this time I want to make a nice theme. I'm facing a ...
0
votes
2answers
28 views

Warning: count(): syntax problem of the count () function

I'm trying to repair a function that was working properly before going to php 7.2. The error comes from the count () function but I do not know how to rewrite it. Can you help me ? Here is the error ...
19
votes
4answers
16k views

Why when I submit a form in wordpress it loads a 404 page though URL is correct

I am just creating a simple contact form, but I notice that it seems to post to an invalid page. The url in the browser is correct but the title of the page is "Page not found" on the top of the page ...
-1
votes
0answers
22 views

can't change wordpress theme twentyseventeenchild edit file [closed]

I twentyseventeenchild theme editing file via cpanel it shows http error 403. and i change via wp-admin it shows Something went wrong. Your change may not have been saved. Please try again. There is ...
0
votes
1answer
602 views

Filter URL and shortcodes from the_excerpt

I just noticed a weird behavior on a theme I'm working on. If I have a post with just one link or shortcode, the_excerpt will print that URL or shortcode. But if I have some text in the post, below or ...
-2
votes
0answers
23 views

How to remove footer on Dara theme? [closed]

I am working on dara theme, I tried to remove PROUDLY POWERED BY WORDPRESS | THEME: DARA BY AUTOMATTIC by changing the footer.php but nothing happened. Now I am stuck here. I want to remove the footer,...
0
votes
1answer
25 views

How to create a multiple navigation layout in wordpress? [closed]

Just like in any other premium WordPress template I wonder how to do that and how to create an option in the dashboard so that users can select a different layout for their theme. Same goes to footer ...
11
votes
5answers
28k views

CSS not updating in browser when I change it

I am working on the CSS of my wordpress site. When I make changes and refresh the page the changes are not reflected. When I clear the browser history and cache the changes are still reflected. When I ...
14
votes
4answers
40k views

Custom post type single-{custom}.php not working

I made a custom post type with the machine name special_media_post and wordpress is simply not seeing the single-special_media_post.php. I am at a complete lose. It keeps defaulting to the index.php ...
0
votes
1answer
17 views

customize theme with get_template_part() [on hold]

I'm often using the get_template_part() function. I read the theme handbook about this function and the codex, but I'm not sure when this function can be useful. For example I've made some modular ...
0
votes
1answer
10 views

Problem with get_page_by_path() using with WP_Query

I get error when i use get_page_by_path() with WP_Query in a php class. I use after_switch_theme and switch_theme in that class. And while the theme is activated then everything is fine as expected. ...
0
votes
0answers
36 views

Wordpress files break if I edit them, but adding a closing PHP tag fixes it

So, I'm kind of stumped by this one, and I'm unable to find many other folks experiencing it. I'm extending the "largo" theme for a site we're getting ready to launch, and am working within the child ...
3
votes
2answers
57 views

How to deploy a new theme/theme options from staging to production site

Let's say you are building a new theme on a staging site. While you were building, the production database has changed due to new user registrations/orders. So now the question becomes how do you ...
0
votes
0answers
9 views

Custom archive page pagination issue

The WP Setup I created a template, broadcast-archive-template.php, that contains code that functions as a custom post type archive page. We set the page template to the template in the WP admin to ...
3
votes
2answers
772 views

What is $post_id? is it a global variable in wordpress?

How can $post_id be used while echoing posts in single.php? Is it a global variable?
0
votes
1answer
12 views

What is difference between add_theme_support and Theme Customization API?

I'm interested in adding customizable features to a theme. What is the difference between the following add_theme_support(...) and Theme Customization API Are they just 2 different ways to ...
1
vote
1answer
639 views

Wordpress shows error related to allow_url_fopen

I just installed wordpress with plugins, everything works find except on a 'contact me' page, where I can see an error like this. Warning: getimagesize(): php_network_getaddresses: getaddrinfo ...
0
votes
1answer
825 views

Remove External Links from WordPress posts Using add_filter() in Theme functions.php

We have been searching high an low for a plugin, code sample or example of how to remove all external links at the theme filter level but can't seem to find anything online. We want to keep the ...
0
votes
1answer
16 views

How do I change the tagline input to textarea?

I have had looked around for a while without success. I would like to make the default tagline editor in the Wordpress admin area being rendered as <textarea></textarea> instead of <...
-1
votes
1answer
16 views

Using <style> tag or inline style attribute?

I have a widget in plugin that will display a list of items <li> and I'd like to add one color to those items as option (color picker)... The question here, do I throw that color as a: <...
0
votes
1answer
13 views

Get post categories

I want te make a filter based on post-categories. I'm trying to add the category-names in a data-category-attribute, but It doesn't seem to work. This is what I tried: <article id="post-<?php ...
0
votes
2answers
28 views

How to use plugin's shortcode in custom design? [on hold]

This might be a beginner question, for disclaimer I'm just getting used to the WordPress templating system: I have a purchased theme installed on my working WordPress site, looking great sofar, was ...
0
votes
1answer
590 views

404 on child page template

I have a page called portfolio and I have created several child pages for it like Video page, audio page etc … I also created custom page template for portfolio and named its file portfolio-template-...
-1
votes
0answers
15 views

React Error “Target container is not a DOM element” [on hold]

This is my first time working with the WordPress build/scripts package which allows us to build our ESNext and React JS code without having to struggle with setting up Webpack yourself. I am building ...
1
vote
1answer
560 views

get_theme_mod returning no output

I can't work out why this isn't displaying anything. The option appears in the appearance - customise menu, I input my settings and display using:- <?php get_theme_mod( 'twitter' ); ?> <?php ...
4
votes
1answer
319 views

Can I make plugins required?

I'm developing my own Wordpress theme that I'm going to use for multiple clients. It has a Theme Options-page so I can easily customize the website every time, but I will also be using some plugins on ...
0
votes
1answer
596 views

How to remove page title from wp head on specific page?

I'm trying to remove page title from a template. Actually I'm using custom in title for singledigital.php template, and wp_head also adding page title on this page. So i want to remove it. I have ...
0
votes
0answers
21 views

i want to know is there any builtin way of ajax pagination

I have searched alot and comllete my task also but i really want to know is there any "builtin" features or way to make ajax pagination in wordpress index.php file or static homepage etc
0
votes
1answer
18 views

is_rtl returns false while it should return true

I have two cases for is_rtl, one doesn't work the other does, but don't know why. Case1: doesn't work i define a variable to hold a value depending on is_rtl, then var_dump it within the ...
0
votes
1answer
612 views

How to include all files within a folder & its sub folders to functions.php?

I try to include multiple php files under one category inside my Wordpress theme and the file/directory structure look like this: -Theme Folder --Functions_Folder ---Folder_1 ----File1.php ----...
0
votes
0answers
19 views

Problem with multi checkboxes value in metabox?

I'm a beginner and I have a problem with a part of the script that I found in a post. Practically when printing the checkboxes it does it outside the table. I can't bring the content of the foreach ...
0
votes
1answer
610 views

How to load mediaelement.js in theme template?

I'm developing a video oriented theme. I need to include native WordPress video player in my page template. This is what I'm doing: $video url comes from a custom field. It outputs the video file url ...