Questions tagged [theme-development]

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

Filter by
Sorted by
Tagged with
4
votes
2answers
5k views

How to make native video player full width?

This is what I have now: I want the video player to take up the whole horizontal space and stretch width 100%. The video should also stay responsive, filling the whole video player area. I fallowed ...
0
votes
2answers
548 views

How to Show Next, Previous, and Page Numbers with wp_link_pages

I want to modify the output of wp_link_pages. Basically what I need is to show Previous and Next buttons and current page/total number of pages. I created the Previous and Next button. Now in between ...
1
vote
1answer
2k views

Load a page into a div with Ajax

I'm really a noob when it comes to Wordpress, right now I'm working on a theme that basically is all static, if you want to edit something you'll have to edit the .php file than rather doing it on the ...
0
votes
0answers
35 views

Iris color picker in custom theme option page not saving value

I have implimented the Iris color picker on my theme options page, but clicking 'Save' does not save the selected value, it just resets to blank (or the pre-set value). What am I missing here? ...
-1
votes
0answers
21 views

My developed plugin's css is overriding by theme's style.css

I have built a chatbot. But its text field has color background: #f4f7f9; which is getting override by Astra's selectors and giving it background: #fafafa;. I am using the Astra theme and by looking ...
8
votes
3answers
20k views

Add custom classes to anchor in wp_nav_menu

I want to add a custom class to anchors in wp_nav_menu outputs. Default for example is: <li id="menu-item" class="menu-item menu-item-type-custom"> <a href="http://example.com">...
0
votes
0answers
9 views

how to make my custom gallery work in wordpress

So am creating a custom theme in WordPress and looking to achieve this I was able to output my category but not too sure how to output the remaining information. As you can see from the image below ...
0
votes
1answer
2k views

how to handle the loop using filling bootstrap grid structure?

i make a code that can fill bootstrap grid structure i used while and for loop in my code but the issue is for loop repeat its value in 2nd row the above picture tells you column 2 and 3 of first ...
-2
votes
1answer
19 views

Javascript codes not working in internet explorer [closed]

I am currently developing a wordpress theme and all the functions in that theme working properly in google chrome. But in internet explorer my javascript file is not working. But file is enqueued ...
0
votes
1answer
11 views

How can I find related learndash course id from woocommerce product object?

I have woocommerce integrated with LearnDash. Now I am trying to get the selected course (related course) from the woocommerce product object or any other way (by woocommerce product id). There must ...
0
votes
2answers
1k views

Multiple do_shortcode($content) within one shortcode

TLDR; How can I run a shortcode with multiple shortcodes inside of it? I'm trying to run a shortcode with multiple shortcodes inside of it. I can successfully run a shortcode with one shortcode ...
0
votes
2answers
700 views

View list of all attachments on site

I'm new to WordPress theme development and I'm trying to figure out if there is a way to display a list of public attachments similar to how you can view a list of posts with a specific tag or author. ...
0
votes
0answers
6 views

Need help with disabling comments

I want to use only reaction emoji and disable comments is it possible? If so how to do it?
0
votes
1answer
12 views

Getting post URL within custom content template

This should be such an easy thing but it's giving me so much headache. I created a content template called content-sticky.php. Added all the code there <article id="post-<?php the_ID(); ?&...
0
votes
0answers
6 views

Table template code as a plugin

I am a bit new in Wordpress and for some circumstances I want to add a table template I have in html, css, js code to my child theme. Someone told me that I should make a plugin to add this template ...
0
votes
0answers
6 views

Add theme to TGMPA

I'm building a theme with the TGM plugin. The theme is Astra (can be any theme), I work with the child-theme. The TGM plugin I installed in the child-theme, that works fine. My problem is how to get ...
0
votes
1answer
15 views

Best way to declare product variables in woocommerce theme development?

I want to be able to use the product variables across all templates. Where should I store them? In Woocommerce templates folder? Example: $productTitle = $product->get_name(); $productSlug = $...
0
votes
0answers
8 views

How to add wordpress template part to a lightbox?

I want to add a wordpress template part to a lightbox. How can I do that? My code here but it not working <a class="venobox" href="<?php echo get_template_part( 'single/map' );?&...
-1
votes
0answers
8 views

Create a form and on submit save it as the post

First Field - Textarea as a Description on the backend Second Field - Add Image button - Multiple images should be uploaded at once using Ajax Third Field - Checkbox - tick the categories which are ...
0
votes
1answer
13 views

Theme Update Engine for my custom theme does't work [closed]

I have a problem with my custom theme. This is my first theme in which I want to implement updates. I am trying to implement this class from url https://w-shadow.com/blog/2011/06/02/automatic-updates-...
0
votes
0answers
9 views

Next and previous post links dissapear

I am developing a custom theme for my own portfolio / blog site. In single.php I have this code for my next and previous links... <section id="multi-posts-wrapper"> &...
0
votes
0answers
11 views

How to add dependency to customizer input field depending on previous selection?

I have created a customizer that creates buttons for the front page banner. There is the option to select 1 or 2 buttons. I want the fields for the second button to be hidden if it's not selected. // ...
0
votes
4answers
7k views

Display only one level subcategory in wordpress

This code uses Taxonomy Images plugin to display images for categories. This code display subcategories of main category in parent category page (category.php), But I want to display only one level of ...
0
votes
1answer
11 views

Post template not applying on theme (potentially rendering as Page template)

I have a Post template, when I select it in the Post options, it saves, but doesn't apply the template on the frontend. Any ideas why this is happening? The posts in question are in the default posts ...
0
votes
0answers
14 views

WordPress PHP Plugin Assign A Column To New Value Isn't Working, But Works For Shortcode

I wrote a code and added to my functions.php on my WordPress site. Theme is a coupon theme. If offer URL is filled, it shows a "go to offer" button; if not filled, it doesn't show. Also ...
0
votes
1answer
7 views

Removing element from DOM with jquery through plugin Custom Scripts for Customizer

This is my first post. I have the plugin powerpress loading an external image from an unsecure source that causes mixed elements so the page is not fully secured and I get the message "not fully ...
0
votes
0answers
8 views

How do I display sub category of a specific category?

My code below is getting data from the category with ID 5. Inside the if statement I want to be able to check for the sub categories with an ID of 8. How do I do this? <div class="row ...
0
votes
1answer
17 views

Child theme modifications not showing up

i am working on a job-portal site and i am little stuck into one situation . I uploaded a child theme and activated it. The child theme is activated successfully but it dosent show changes that i do ...
0
votes
2answers
16 views

Adding a button to wp/aution plugin

I got an auction theme (adifier) and i'm trying to add a button to a specific ads category. Tried a few codes but none seem to work, probably i don't know how to alter it properly. I got the category ...
0
votes
2answers
75 views

Loop inside page template not working

I am facing a problem with the loop inside the page template. Here is the code. <?php /* Template Name: Blog-Template */ get_header(); $args = [ 'post_type' => 'post', 'posts_per_page' => ...
1
vote
0answers
17 views

How to show user online status on their posts?

I've tried a lot to solve this but of no use. I have a classified wordpress website where users can post their ads. I want to show their online status on the ad they post (archive and single posts as ...
0
votes
0answers
9 views

Wordpress Next Post and Previous Post with Custom Post Type UI

I am trying to add the "Next Post" and "Previous Post" but I don't know how to pull the posts from my portfolio item which I created in the plugin CUSTOM POST TYPE UI. Please see ...
0
votes
0answers
8 views

Generate a custom nested layout by tinymce editor button

I create a new button in TinyMCE editor. And i want that new button of TinyMCE editor will show this below structure as dummy content while I press that button. <div class="table-of-contents-...
0
votes
0answers
16 views

Don't know why post meta doesn't work even no error is thrown

I am having a problem with post meta. I have a custom meta box for posts. But when I select the option it doesn't work. Neither does this code throw any error. One week ago it worked like charm. Here ...
0
votes
0answers
19 views

Can I add customizer to a custom made wordpress theme and have those styles in a CSS file?

I would like to make my colours, logos, and hero images all dynamically changable using my customizer.php. I haven't played around with customizer much, but understand I need to use php to store the ...
0
votes
0answers
17 views

Why front-page.php doesn't show content of file instead shows loop

Firstly, I understand the template hierarchy a little bit and read all the answers given by experts but unfortunately didn't get that. Here is the problem I face: If I use home.php then the content ...
0
votes
1answer
695 views

Theme Functions run a function upon activation or preview

My theme currently has the following line in the function.php file: if ( $_GET['activated'] == 'true' || $_GET['preview'] == 1 ) If this statement is true the code runs a function. I am getting a ...
0
votes
0answers
13 views

Are there any guidelines/standards for post styling?

I am a beginner in Wordpress Theme development. I have been trying to create my first theme and I have already started by adding some basic styling. I am using single.php as a template for loading the ...
0
votes
2answers
3k views

How to output wp_enqueue_style() in HTML head instead of footer

I added some actions to wp_enqueue_scripts to load my custom css and js files in the header section by using wp_head(); right before the closing </head> tag. function mytheme_scripts(){ // ...
1
vote
1answer
67 views

How to add “Read More…” link in twentytwenty

How do i fix this in twentytwenty so i can show a read more button or something ?
3
votes
3answers
4k views

Get category slug and display it on a query_post

I just read "How to create option page for wordpress theme" in wp.tutsplus.com - I have a problem with getting categories . there is two parts to my question - Part A - Get category slug and ...
0
votes
0answers
14 views

Error on The uploaded file exceeds the upload_max_filesize directive in php.ini when building theme

So I'm building a WordPress theme from scratch and I'm learning things as I progress, but I'm having issues with file uploads on production. So locally, everything works great and I can upload images ...
2
votes
1answer
184 views

Can we completely remove the WordPress Sitemaps (WordPress 5.5)?

I have been using my WordPress site to create various types of content, I obviously submit my sitemaps to Google for getting my site indexed. But there is some content which I don't want on Google, ...
0
votes
0answers
16 views

How to Detect “Your homepage displays” setting in wordpress

I simply want to detect what user has selected from these settings. Because i need to display the homepage content according to this setting. For example, if user select "Your latest Posts" ...
4
votes
3answers
5k views

Specify image dimensions

I ran a performance report for my website (using GTmetrix) and I realized the image dimensions are not set, and I missed specifying the height and width attributes. The theme already had some images, ...
1
vote
0answers
77 views

wordpress customizer - pass setting value into another control to live update dropdown choices

In the wordpress customizer script I am trying to pass the value from a select control into a custom control that displays taxonomies associated with the selected value (1st control). - ...
0
votes
1answer
597 views

Divi - How can we show background video on mobile

By default, Divi theme forcibly stops background videos from ever displaying on mobile devices. Is there a way around this, even if not all devices are supported, at least to show the mp4/webm to the ...
0
votes
1answer
15 views

Why does wp_customizer default values do not apply when theme is installed for the first time?

I am creating WordPress themes, when i install theme on another site / domain, the default values added under wp_customizer do not apply for the first time when theme is just installed. When i go to ...
1
vote
2answers
3k views

How to remove header image in Twenty Eleven theme?

Please give me details on how to remove the custom header image in the Twenty Eleven theme.
1
vote
1answer
1k views

Change locale by detecting viewer's browser language setting and let them choose prefered language after

I am coming from a multi-linguo country, and viewers may speak different language. I am writing a theme and I noticed that the language of my theme only changed based on the setting of my admin panel,...

1
2 3 4 5
83