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

Mask transition for image [on hold]

The main goal I want to achieve is from previous to the new image should change that too. if I keep the mouse on the image then slowly display another image like a mask transition here is a below ...
0
votes
1answer
11 views

Check if user has enrolled in Sensei LMS Course on Lesson Page

I would like to adapt this code (which works on the single-course.php page) to work on the Single Lesson page (single-lesson.php): <?php global $post, $current_user, $woothemes_sensei; $...
0
votes
0answers
15 views

Custom Post Taxonomy Template Not Loading Properly

I have a website I inherited that is exhibiting strange behavior for a custom post type taxonomy template. The post type is resource, the taxonomy is resource_brand, and if it matters, the taxonomy ...
0
votes
2answers
40 views

i cant see the max_num_pages of a custom wp query

i hope you help me with this, i am making a wordpress website witch has 3 diffrent post types(the regular post type and 2 others), i have the pagenation work very with in the regular posts page, but ...
0
votes
0answers
21 views

Show Yoast SEO meta tags in Custom WordPress Templates (Theme)

I overwrote twenty nineteen theme in WordPress and included all my templates. After that, I installed the Yoast SEO plugin to add dynamic meta tags to pages created using custom templates. I have ...
0
votes
1answer
14 views

Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?

I am trying to create a Custom Premium WordPress theme for a Travel Agency. I am thinking of finishing the theme and submitting it for review. I want this theme to be really useful so I ended up ...
0
votes
1answer
11 views

How to add Custom HTML widget to target sidebar on theme installation [closed]

How to add Custom HTML to your desired sidebar after theme is installed?
-2
votes
0answers
11 views

How To Create Post Grid Layout Without Plugin? [closed]

Please I need help. I want to create custom post grid layout in wordpress without plugin just like home page grid of bmtechtips.com.please anyone reply to this messsage. Please provide me css code ...
0
votes
1answer
17 views

Are there any caveats to compiling all of my theme's SCSS into the style.css file in the theme root?

I work in WordPress development and I've always been told by more seasoned WP devs to compile my theme SCSS into a separate style.css file, typically into a sub-directory like assets/css/style.css. ...
0
votes
0answers
24 views

when to use the Wp customizer and when to use Wp widget?

im new to wordpress dev and im a little bit confused about building component like Call to action or search bar , should i use customizer or widget , and what is the pro and cons of both of them
0
votes
1answer
9 views

Wordpress - root / home page redirects to live site [closed]

I have a little problem. I am trying to set up a local dev environment for one of the websites that I host on flywheel. Now the process I did: Downloaded the database, downloaded the plugin, theme ...
0
votes
0answers
30 views

Need to make site logo appear to the left of site title and site tagline

Im using the code below to show site logo, title and tagline. As of now all the three appear one after the other vertically in separate lines. I want the site logo appear to the left of site title ...
1
vote
2answers
24 views

How to customize save function event?

I'm trying to customize the save feature of a Wordpress theme, unfortunately I doesn't have the necessary knowledge on this so I need a bit help to do this in the right way. Essentially the theme ...
0
votes
1answer
22 views

Adding Custom Post Type Content to Elementor Custom Widget

I created a new Elementor Widget using the documentation provided here: https://developers.elementor.com/creating-a-new-widget/ The widget works fine from the demo for static content. But what I'd ...
0
votes
0answers
22 views

wp_title() return random number

wp_title() function return only one integer, 27 to be specific. On all pages it works great but one. Before I changed title it was returning 'false', further changes make no difference. Place where i ...
1
vote
1answer
31 views

Setting custom search engine indexing for a “dynamic WordPress page” with htaccess

I am searching for hours but didnt found the code for my requirement, Can my requirement be done with htaccess? Requirement - These urls of a page should be indexed by Google: example.com/example-...
0
votes
1answer
27 views

post_exists returning 0 if title contain special characters

I am using the below code: $title = get_the_title($result->post_id); if ( 0 === post_exists( $title ) ) { $title = 'Document Id: '.$result->post_id .' (Deleted)'; } But it's returning 0 if ...
0
votes
0answers
7 views

How to display post excerpt in Avada's Featured Image Rollover?

I've tried this hook in my Avada Child functions.php but it doesn't work… I'm afraid that the class="fusion-rollover-excerpt" doesn't exists and I don't know where to add it. ?> <?php if ( $...
0
votes
0answers
18 views

Ajax Pagination link go to /wp-admin/admin-ajax.php/page/3 in second click event

I create a ajax pagination for twentyfifteen child theme. That pagination works fine in first click ( in case of http://example.loc/page/23 ) , but in second click it redirect me to wp-admin/admin-...
0
votes
2answers
16 views

Remove annoying WP Adminbar CSS

I am trying to remove the annoying WP Admin bar css. <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and (...
-2
votes
0answers
12 views

How to display product by sku in custom html page template

Solved: I am trying to display a spesific product by sku on a custom html page template which I place in /wp-content/themes/child-theme and then I set the page in wordpress with templates. I tried &...
0
votes
1answer
14 views

register dependency css and js inside a plugin class

I have this code: public function __construct() { add_action('wp_enqueue_script' , array( $this, 'initBootstrap' )); add_action('wp_enqueue_style' , array( $this, 'initBootstrap' )); ...
0
votes
0answers
34 views

Adding a drop-down (select tag) option under Menu Settings in WordPress Admin

I looked (surfed) around a lot to get idea of how can I add custom field/drop-down under "Menu Settings" in WordPress Admin. I want a select tag with options from which I can get value based on the ...
1
vote
1answer
24 views

custom shortcode will not display the wrapped content

I'm trying to create a plugin to have some shortcodes utility for my custom bootstrap 4 layouts. I'm reading the shortcode API docs but I'm unable to display the contents wrapped inside the shortcodes ...
-1
votes
0answers
8 views

Creating a child theme so that I can create a page that doesn't show up in frontend Topbar (navgiation bar)

It seems as though every time I create a slider (in the form of a page) for my website's homepage, It creates a section on the topbar. From what I've read, I will need to create a child theme in ...
0
votes
0answers
11 views

How do I append options to a select box in the customiser from an API call?

I'm working on a WordPress theme and I've added a select box to allow users to select a font for their site. I figured I'd use the Google Fonts API to grab the list of fonts rather than add all 900-...
-1
votes
1answer
18 views

Apostrophes replaced by &#39;

I use a plugin for automatic posting of articles on social networks, and when I send an article on Facebook or Twitter from my website, the apostrophes of my articles are replaced by this: ' ...
1
vote
0answers
22 views

Custom Nav Walker Trouble

I got a snippet for a custom nav walker online and it works fine for the main menu items. I can't figure out how to get it to work for the sub-menu items. This is what i'm trying to achieve: <ul ...
0
votes
0answers
28 views

Is it possible to echo a woocommerce prouct attribute discription?

Rather than displaying the attribute name I would like to display it's description. Is this possible? function woo_specifications_product_tab_content() { // The new tab content global $product; ...
0
votes
1answer
30 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
15 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: ...
0
votes
1answer
17 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 $...
0
votes
1answer
15 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 ...
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 ...
2
votes
1answer
108 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( ...
-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 ...
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
0answers
59 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
20 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 ...
0
votes
1answer
28 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

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
28 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 ...
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
44 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
35 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
0answers
6 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 ...
0
votes
0answers
18 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
21 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
11 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....