Questions tagged [theme-development]

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

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

A live chatting system/plugin with woocommerce product id and information with individual [on hold]

thanks in advance whoever you are checking this to help. I am on a project where I have to manage a chatting system in a woocommerce site where users/buyers will click on a button called "Negotiate ...
0
votes
1answer
12 views

Custom Nav Walker Displaying Values in Sub Menu

I'm trying to display Submenu links within a Custom Tailwindcss / Vue component that I added within the Nav Walker. Menu Issues header.php <nav class="flex items-center justify-between flex-...
0
votes
1answer
14 views

Error Connecting to Database WHEN Installing Wordpress on XAMPP [Tried All the Usual Stuff] (Pics Included)

Here's the error I get https://gyazo.com/56134064606564c836ae8b0f18a129ba Here's the DB login settings I used: https://gyazo.com/2facfe11765bc4b887c31bc111bb123a Here's my DB names and users: ...
2
votes
2answers
450 views

How to change the customizer´s sidebar width?

I want to increase the width of the expanded sidebar in the WP customizer. The relevant customizer markup: <div class="wp-full-overlay expanded preview-desktop"> <form id="customize-...
4
votes
1answer
2k views

get_attached_media() returns empty array if media file already used by another post

I wish to retrieve the different PDF and ZIP files attached to a single post and display them in a specific section, outside the content, using the WP function get_attached_media(). While my code ...
1
vote
1answer
86 views

Gutenberg - editor-font-sizes in functions not working

I'm adding theme support for editor-font-sizes in my functions.php but it doesn’t take affect. Any ideas why? I’ve already added a custom color palette without issue, but having issues with this: ...
0
votes
1answer
15 views

fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term

fetch all post from wp multisite network and sort all the post in descending order on the basis of "Created by " term $all_blog = get_last_updated(); $countpost = 1; foreach ($all_blog as $...
2
votes
1answer
103 views

Retrieve data using wpdb to use for customizer controls

So I have the following code: add_action('customize_register', 'homepage_sections'); //products function homepage_sections($wp_customize){ $wp_customize->add_panel('homepage_sections', array( ...
0
votes
1answer
13 views

Get Current Menu Location inside Nav_Walker

How can I retrieve the current menu location (as registered with register_nav_menus) from inside a nav-walker class? eg: <?php class Special_Nav_Walker extends Walker_Nav_Menu { // How can ...
11
votes
6answers
31k 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 ...
0
votes
0answers
12 views

Parent menu item with character space breaks dropdown for submenu

My team has a WordPress site with a custom FoundationPress theme. One of the primary nav items is "About us", this item has secondary items nested beneath it in a submenu. This is configured in the ...
-1
votes
1answer
28 views

IS there any reason not to include javascript in my own post's embeds?

I'm looking at customising the embeds of posts for a theme I am creating. Looking at header-embed.php in Theme_Compat I see that the head has the following class="no-js". Does this mean that ...
4
votes
3answers
311 views

enqueue script for specific shortcode

I've created some shortcodes and for some of these, I need to load particular scripts on demand. I've included by default in my function.php file vendor.js myscript.js When i load the shortcode, i ...
0
votes
1answer
16 views

Headless Wordpress + Vue.js on the same server

I have found many articles about headless wordpress and vue.js using data via WP REST API. In these articles they deploy the app on separate servers. Backend is on different server than frontend. I'm ...
0
votes
0answers
13 views

How can I keep the same style as the fields above?

(Sorry I'm using Google Translate) The area marked in red is a Meta Box created by me. I was wondering how to keep the same style of the "Metas Box" above.
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 ...
0
votes
0answers
58 views

How do I keep my iframes responsive and scaled to fit their container?

This is a WordPress core question and only a CSS question as a byproduct. I am designing a theme using bootstrap. Everything looks exactly as I want it to with one exception - links embedded from my ...
1
vote
1answer
17 views

Using a `Template Parts` folder instead of an `Includes` folder in a Custom Wordpress Theme

When I've built static sites in the past I've had an includes folder and used php if I've needed to repeat components / HTML over different pages. I've noticed in Wordpress that this functionality ...
2
votes
1answer
873 views

Adding wp_enqueue_media(); causes problem

I want to add the media uploader in the theme options page. If I add following code in the options page, the media uploader works fine there, but it creates problem in the standard posts featured ...
0
votes
0answers
11 views

WARNING: .ds_store Hidden Files or Folders found

Trying to upload a custom theme to Wordpress.org and I'm encountering this issue. I have scoured it for .ds_store and other hidden files but couldn't find any of it. Same warning I'm getting with ...
0
votes
0answers
26 views

How can I include custom Gutenberg Blocks in a theme?

I know that officially Wordpress wants people to include blocks as companion plugins, and I understand their reasoning for that. I am building a theme with a very specific usecase though and I would ...
10
votes
3answers
14k views

How to set permalink structure via functions.php

I'm setting up a Wordpress Network and wanted all new sites to have the same permalink structure (i.e. "/%year%/%monthnum%/%postname%/"). I'm wondering if this is possible to do via hooks or hacks in ...
0
votes
0answers
22 views

Can I set rest API endpoints from within a theme?

I would like to know if it is possible to set rest API endpoints from within a theme? I created a class to do this and made an instance of the class in the theme's functions.php file. This triggers ...
1
vote
0answers
21 views

Warning: A non-numeric value encountered in theme functions.php

Warning: A non-numeric value encountered in functions.php I am using php 7.1.31. I am using Linux Centos Server. I have also tried to type casting. but not worked. When I have changed php version to ...
2
votes
0answers
28 views

Gutenberg Reusable Block as part of WordPress Theme page

I'm using WordPress "Twenty Nineteen" (child) theme. What I'm trying to achieve is to include one of my previously created Gutenberg Reusable Blocks as part of theme's index.php file. The reason for ...
0
votes
3answers
1k views

Am getting duplicate data from get_posts()

Am trying to display posts only from the "latest" category on my wordpress blog but am strangely getting the same post displayed twice. What am i doing wrong? /* * Theme file:index.php */ global $...
1
vote
1answer
1k views

How to disable controls in theme customizer?

Edit: I have rewritten the question in hopes I will get a reply from someone who knows the theme customizer. I am trying to figure out how to disable setting controls in the Wordpress theme ...
0
votes
0answers
5 views

SVG in list-style-image breaks when adding fill

I'm trying to add a custom bullet using CSS list-style-image. Here is the attribute: ul { list-style-image:url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='utf-8'?><svg width='...
0
votes
1answer
19 views

Custom Post Type has wrong label and is not found when called by a loop

I'm new to WordPress (and to code), having just started my classes. I am working on a project with a few students and can't find a way to call my Custom Post Type. I tried several solutions from ...
1
vote
1answer
1k 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 ...
1
vote
2answers
9k views

WP_Query for WooCommerce Products

I am trying to display WooCommerce products in custom loop. This is my code: <?php $args = array( 'post_type' => 'product', 'posts_per_page' => 6, 'product_cat' => 'apparel', 'orderby' ...
0
votes
4answers
6k 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 ...
-2
votes
0answers
30 views

How can I update theme which I made? [sved]

I developed a theme and I want to sell it.But you know it must be updatable so how can I give this skill to it? thanks fr these inks: https://github.com/YahnisElsts/plugin-update-checker https://...
0
votes
0answers
17 views

Wordpress displaying two different headers, one at top and one below footer

I am building a custom WP theme for the first time. Just started trying to put specific header template files with my different page templates. For some reason, when I use "get_header(X)" to call a ...
0
votes
0answers
19 views

Archive Page title issue

I have a problem on my WordPress Archive page. The slug doesn't much with the title. i am using the_archive_title to display the title on the archive page
0
votes
0answers
15 views

there is space between sticky row and header

I have a problem with visual composer. I set the tab get stick to the top of the site but there is white space between tab and header when I scroll the page. how remove this white space? (http://...
5
votes
1answer
861 views

Page template in two level deep folder

Is this possible to enable WordPress to read page templates on .php files that are two levels deep inside the theme folder? Example: theme/ folder-1/ child-folder-1/my-template.php ...
0
votes
0answers
9 views

wp customizer js preview - use setting based on other setting

I'm quite green at wp js framework; What i'm trying to achieve is that if setting 123 == a then assign setting_x to .header-banner background-color; else if setting 123 == b assign value of setting_y....
0
votes
1answer
17 views

Theme starter content translation is not working

I have written and translated a theme and all is working fine, except the starter content. It seems that i am not able to translate the content and it is still displayed in English, even though I have ...
0
votes
2answers
1k views

creating a custom post template

I want to customize my individual posts. I have an example of what I'm trying to achieve below. Would I make a custom post template for this? If so how would I do this? Or should I add to my single....
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
0answers
19 views

How can I ping update-core.php with a script?

I have the paid Divi theme on many websites on a cPanel powered server. I use WP-CLI in a bash script to update all the plugins and themes. But Divi will never update because it only reveals an ...
3
votes
3answers
3k 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 ...
5
votes
2answers
2k views

Need help setting default setting value for radio button in theme customizer

I need help figuring out how the radio button saves it's value in the theme settings. In my theme I added Radio buttons in the theme customizer. So far they are working great. Although I have one ...
5
votes
3answers
11k views

How to remove “prev, next, shortlink” from wp_head()?

I'm using these filters to clean the head of my theme: remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'feed_links', 2); remove_action('...
-1
votes
1answer
108 views

Theme layout for home page [closed]

I'd like to create a theme with this layout for the homepage. At the moment I am working off an already existing html website I am a confused about what the white and green/blue part of the layout ...
2
votes
3answers
13k views

My child theme doesn't work Error: “The parent theme is missing. Please install your parent theme”

I am using the Pricerr theme. In my parent theme I have a CSS folder with a few css files in it, a rtl.css and a style.css. What should be the code to put in the functions folder so that I can pull ...
4
votes
2answers
1k 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
17 views

Custom post type's posts are not showing anywere but in xml sitemap

I don't use any cache plugin. Custom post type's posts are only showing in xml sitemap but not showing in other places on the site, until I "open each new post url manually" or "use a third-party ...
0
votes
2answers
193 views

Saving Permalinks Results in 403 MAMP (Windows)

I am trying to setup a local environment on my Windows 10 machine (to knock out some overtime) but keep running into a problem. Let me start with my environment workflow on Mac OSX... I have developed ...