Questions tagged [theme-development]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
70 views

Wordpress Contact form 7 falat error while send an email

Fatal error: Uncaught Error: Call to a member function get_status() on null in /home/mywebsite/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php:732 Stack trace: #0 /home/...
0
votes
0answers
19 views

How to rewrite rule and change product url to categories and product name?

Will really appreciate your help on how to rewrite products urls to be based on categories names (not category slugs). Let's say this is the structure of the categories and the product: Men (slug: men)...
1
vote
1answer
532 views

Set parent theme language with custom .mo files

I am using Buttercream as my parent theme. I have translated the .mo file located in themes\buttercream\languages and saved it as nl_NL.mo and nl_NL.po. Now I want to display the parent theme in Dutch ...
0
votes
1answer
642 views

How to change parent permalink?

I have a theme with hardcoded permalink structure for some posts. Those posts open with site.com/parent/page structure. I created a filter that replaces the link from "site.com/parent/page" to "...
3
votes
2answers
737 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-...
10
votes
8answers
12k views

Why is wp_head() creating a top margin at the top of my theme header?

I am creating a custom theme, and elements behave as they should but when I place the <?php wp_head() ?> tag I get a top margin, at the top of my theme header. When I remove the <?php ...
1
vote
3answers
6k views

Customizer API and add_panel(). Panel doesn't show

I try to add panel to my customizer but code below doesn't work (panel don't show in customizer container). My code: add_action( 'customize_register', 'customizer_test' ); function customizer_test($...
0
votes
0answers
23 views

Problems with cart and pages on _s theme

I recently took over managing this website Berman Instruments, one of our clients. They claim that it the cart was working until June. This is a 2 part problem. In this scenario, an unregistered user ...
0
votes
1answer
718 views

How to get next post and previous post URL in loop, single.php My WordPress 4.9.6

I want to show next previous button in single.php please suggest me the possible way, I'm stuck at these point in my site development Next Previous > <?php posts_nav_link(); ?> <?php &...
0
votes
1answer
96 views

Update Multiple Post Meta for the Same Post In One call?

How can I update multiple fields/Custom fields for the same post using only one call? Everything I came across are cases of multiple calls of "update_post_meta", for each of the fields. Is ...
0
votes
1answer
19 views

Why does the first loop take arguments from the second loop?

I created an index.php file with two loops. The first one is standard and should only show the title of the page. Just below it is the second loop with class WP_Query. My problem is that the first ...
2
votes
1answer
56 views

WordPress default theme css units

Is there a specific rule the default WordPress themes follow for CSS units? I see em's on some font sizes and rems on others and px on certain places. Referred the following links but I couldn't ...
17
votes
4answers
8k views

Is wp_is_mobile() effective?

I'm going to test the user agent to load a mobile template instead of the desktop theme. There are many mobile detection scripts out there. Does wp_is_mobile() function work well? What is your ...
0
votes
1answer
15 views

How to use custom function in posts and pages templates

I want to add a custom function to get related posts into my wp theme. I have added this function code to my theme functions.php file but it will not work: function my_related_artickes() { $...
0
votes
1answer
37 views

Shortcode Attributes to Return different $_POST

I am creating a solution to enable front end editing of custom fields, I am using hidden input containing the custom field to send via POST request to an editing form, the form contains default value ...
1
vote
2answers
633 views

How can I remove specific custom post meta from the “Custom Fields” fieldset?

I've created a custom meta box to handle certain custom post meta fields and I don't want the clutter of having these custom fields duplicated down in the "Custom Fields" area. How can I remove ...
0
votes
1answer
25 views

Need Help to make a logic for editing posts in Frontend

I have an issue, I'm creating classified website, so I have a login and a registration form and users can post their own adverts. They have account page where they can see their posted adverts, I'm ...
0
votes
1answer
540 views

add shortcode support in customizer

How to add shortcode support in Customizer live preview. I have implemented the live preview using transport postMessage but, It just reflect the HTML as it is. I think I need to use ...
1
vote
1answer
528 views

Update a custom theme with Subversion?

Before I start: I'm not sure if this is feasible so any guidance, suggestions, criticisms are welcome. I'm looking for an easy way to deploy my Wordpress theme code from my development environment (...
0
votes
1answer
19 views

Can't upload image via submitting custom post from frontend

I have an issue with submitting custom post from frontend with image. I have a form with post title, description and image, that should be featured image of the post. So when user submitting post, it ...
1
vote
1answer
885 views

Do I need normalize.css when developing my own Wordpress-theme?

I'm developing my own Wordpress theme and I'm trying to make it as light as possible. I started from the Underscores starter theme, but they use normalize.css to reset the styles. Is it necessary to ...
0
votes
2answers
938 views

I can't add CSS with functions.php

I'm relatively new to creating a theme with WordPress, and I've been adding all the stylesheets (main and for each page) with the old echo get_stylesheet_uri();. But I find out that this isn't the ...
0
votes
1answer
690 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
2answers
577 views

Display Featured Posts Grid on Static Page (Gazette)

I'm using the Gazette theme which has a jet pack enabled featured posts grid when the front page is set to show latest posts. I would like to use a static page instead of recent posts, but keep the ...
0
votes
2answers
21 views

How to specify the path for require_once in a child theme?

I have a child theme folder called themes/child-theme and inside I have a file dashboard_payments.php. Under the child theme folder I'm creating a new folder called gateway and inside there's a config....
1
vote
1answer
994 views

Root Sage theme styles are not working!

One of the websites that I'm working with has a custom build theme using Sage Roots. It works just fine on the live site and I was trying to setup it up in my localhost to work with it. For some ...
1
vote
2answers
33 views

Custom Script Section Only Echoes Text

I have a custom script section in a theme I'm creating that is only echoing the verbatim text, rather than treating it as script & I'm not sure what I'm doing wrong. I thought at first that it may ...
0
votes
1answer
8 views

Is it possible to show sort page excerpt in search.php

Current I have my search just return the title of the page that has the result, is there a way to show an excerpt This is what i have <?php get_header(); ?> <section class="page-wrap&...
2
votes
2answers
982 views

Custom CSS In Uploads Folder

I am wondering if it is typical to have custom CSS files in the uploads folder. I have inherited a custom theme from a previous developer, and a significant amount of the styling of the front-end is ...
0
votes
4answers
880 views

How to disable automatic colors in the Twenty Twenty theme?

I'm using the Twenty Twenty theme to create a website, and I want to totally disable the automatic colors that Wordpress generates based on the accent hue. I have very specific branding guidelines to ...
0
votes
0answers
16 views

how to change a static testimonials into dynamic

i have a section in my home page where i have testimonials and i want to customize it ! im using TC Testimonials plugin and i want the dots to be separated and in front of the testimonial section ...
0
votes
0answers
18 views

Customizer API Multi Sections in single Panel

I'm trying to build up a multi sections Customizer in wordpress and when i add the third section in a single panel the first section is set to display: none don't know what seems to be the issue. If ...
1
vote
2answers
792 views

How to display admin bar when using WP_USE_THEMES = false?

So I'm using WordPress in a 'themeless' manner, i.e. not using a "blog" template. My site files are in the root directory (not in the theme folder), and WordPressis installed in its own /wordpress/ ...
0
votes
1answer
44 views

Adding the_content() return warning count()

I'm using the_content() function for elementor plugin implement, but warning comes up once I use this function: Warning: count(): Parameter must be an array or an object that implements Countable ...
0
votes
0answers
34 views

3 Level Menu Navigation (3rd Level not displaying)

I am using wp_nav_menu on my wordpress theme but I can seem to figure out how to display the last level on my menu navigation. I would like the last level to display on hover of the parent item. Here ...
0
votes
0answers
14 views

What is the best way of inserting information onto a page, that will need to be updated?

I am creating a custom theme. On one page there is a menu with multiple menus you can access via an anchor, without leaving the page. e.g. Breakfast, Lunch and Dinner Currently in order to display ...
0
votes
3answers
69 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 (...
0
votes
1answer
12 views

get_next_posts_link() returns no result despite available posts

I am developing a custom theme based on the Genesis framework. I want to display a 'previous post | next post' navigation below any article in the single post view. However, neither ...
0
votes
1answer
44 views

What form should the $query media query array have for an Elementor page builder function? [closed]

I'm building a theme with the Elementor page builder and I want to add some CSS output to certain elements. I hooked into the parse_css function. I want to use the stylesheet::add_rules() function (...
0
votes
1answer
34 views

Redirection from a specific page for users logged in but not with membership

I am trying to redirect logged in user but not with a membership, from a specific page to product page. But it is showing error if I land on that page. Let's say join is the page with id 1867. Here is ...
0
votes
1answer
899 views

Theme option page doesn't save options

I am trying to practice adding theme options page using settings API but unfortunately the code i have written according to the codex doesn't work properly. When i tested the code no errors generated ...
0
votes
2answers
24 views

cannot echo the_post_thumbnails

I'm using the following PHP code to echo post thumbnails. <?php $args = array( 'post_type' => 'post' , 'orderby' => 'date' , 'order' => 'DESC' , 'posts_per_page' => 1, '...
4
votes
3answers
8k views

How Do I Programmatically Force Custom Permalinks with My Theme?

I'm making a custom theme. It's a highly specialized theme to make WordPress into like an application rather than a CMS system or blog. For instance, a Dental Office Scheduling System (with CMS and ...
0
votes
1answer
17 views

Is functions.php in themes applied to all templates?

I've been reading the theme developer handbook for a bit and maybe I ended up with one too many questions on wordpress theme development. I haven't done any theme/php development in a very long time ...
0
votes
2answers
53 views

get_header() on new page fatal error

I'm building theme and using this link in navigation bar to about.php page. <li><a href="<?php echo get_template_directory_uri(); ?>/about.php">אודות</a></li> ...
0
votes
1answer
800 views

How to add custom nav_menu_css_class to certain menu only?

I want to add a custom CSS class to menu items. So far, I got it working by using the filter hook nav_menu_css_class. However, I want to add this class to items of a specific menu only. So, how must ...
0
votes
1answer
23 views

Trying to customise 2011 Child Theme Background Colour

I am trying to customise the background colour of my site. It's a 2011 Child Theme. When I go to Appearance -> Customize -> Colors, I get the Light and Dark option under Color Scheme, but can't ...
0
votes
2answers
928 views

Need help with adding custom wordpress menu and sub-menu

I've got my HTML Custom Nav set up and it works fine for static template. I want to convert it into wordpress navigation menu. I am totally new to wordpress and i want help to convert html menu to ...
0
votes
1answer
950 views

How to add aria role and schema markup to custom walker container

Edit: after doing some research I've found that in the wp_nav_menu function uses the following code to display the containers value. if ( $args->container ) { /** * Filter the list of ...
0
votes
1answer
743 views

How to get value of a selected option from select tag and use it in WP_query to filter posts?

This is how I'm getting the value but how to use it in WP_Query so when I click Search to display let's say posts with Option 1 value? I'm doing this but don't know if meta_value is the answer $...

1 2 3
4
5
83