Questions tagged [theme-development]
Themes create the public (front-end) interface for a WordPress site.
4,484
questions
1
vote
2
answers
85
views
Weekly background code not working
I have this code I want to implement onto my website. I have successfully set up a child theme. This code is suppose to change the background every day of the week. I am not all too familiar with ...
0
votes
1
answer
222
views
WordPress creating images if uploaded image is greater than 960px on one side?
I'm creating a new theme and have modified the media settings. From the Settings > Media page, all sizes are marked as 0x0 so they will not be produced.
I am creating only 1 custom thumbnail in my ...
0
votes
2
answers
80
views
Breaking Categories Up into Individual Divs
I've been working with the wp_list_categories( $args ); to display categories from a taxonomy and I feel that this might be the wrong method to use. Now I'm wondering if it is possible to instead of ...
7
votes
2
answers
917
views
What is an alternative method to the WordPress private _doing_it_wrong() function
I've noticed plugins using a singleton pattern that will use WordPress's _doing_it_wrong() function in their clone() methods, like so:
<?php
public function __clone() {
_doing_it_wrong( ...
1
vote
2
answers
133
views
Cannot figure out how to overwrite files in child theme
I'm using the catch-base theme as a parent theme and have the following code in functions.php
<?php
function my_theme_enqueue_styles() {
$parent_style = 'catch-base';
wp_enqueue_style( $...
3
votes
2
answers
64
views
Add meta-information to theme itself
For my current project (a custom and not public WordPress theme) I would like to show additional information with the themes existing meta data (version, author, description, "Visit theme website", ...
0
votes
1
answer
2k
views
How to write "alt" tag in image for wordpress code?
I want to use the code <img class="img-responsive" src="<?php echo the_post_thumbnail_url(); ?>" alt="" /> instead of <?php the_post_thumbnail(); ?>, to output the post thumbnail. ...
1
vote
1
answer
122
views
Wordpress Unite Theme: Footer isn't sticking [closed]
I have been all over in regards of trying to troubleshoot why my footer is not staying at the bottom of the page, below all the content.
My theme is Unite. It's not online, so I cannot provide a link....
2
votes
2
answers
2k
views
Dequeue script in template isn't working
I want to dequeue a script ('enterprise-responsive-menu'), but the function I have in my template does not do that. Does anything look wrong?
Here is the enqueue in functions.php-
//* Enqueue ...
-2
votes
1
answer
413
views
How can I convert a complete bootstrap template into a WordPress template? [closed]
I have download a bootstrap css template, how can I use a complete bootstrap template as a WordPress template?
0
votes
1
answer
584
views
Use WordPress function in php file
I have a WordPress Child Theme and I have added a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer )
So I try
<?php
$...
0
votes
2
answers
44
views
Providing updates to your Wordpress theme
I've been doing a lot of research but can't find a straightforward way to provide updates to a Wordpress theme.
I have a custom theme I created for my blog and would like to provide updates to it ...
6
votes
1
answer
36k
views
How to get woocommerce inventory status [closed]
In a woocommerce theme, Im trying to show a warning when product is out of stock. Something like this:
<?php if ('this_product_is_out_of_stock'): ?>
<p>This product is out of stock. ...
1
vote
1
answer
60
views
Unable to restore from backup - how to obtain old blog posts?
A little back story for context:
I was brought in to help fix an issue with a WordPress Theme Update & Migration gone horribly wrong. Long story short, when the guy that did the move finished the ...
2
votes
2
answers
952
views
Different Admin Theme - Based on Role?
I'm wondering how to change the admin theme based on a user's role. Currently I can change the admin theme using a plugin (ex: Blue Admin) - but I'm not sure how to make those changes based on a role ...
1
vote
1
answer
68
views
What is the safe way to print tracking code / pixel code before </head> tag or </body> tag
What is the safe way to print tracking code / pixel code before </head> tag or </body> tag from theme options.
In header.php I printed the following code before the </head> tag
if (...
1
vote
2
answers
63
views
Wordpress security issue to output data from user input from theme option form
I have the following code (below) in my theme. I am using redux framework for my theme options. My codes in a part looking like this. And I am really not sure about the security issue of this chunk of ...
2
votes
3
answers
661
views
Include Max mega menu Plugin into theme
I want to add the Max Mega Menu plugin into my theme for a project.
What i've done:
copy and paste plugin folder into my theme
include megamenu.php file into my theme function.php file
Needed to ...
0
votes
2
answers
36
views
Looping single post in a theme
I am developing a wordpress theme. In single.php page I want to loop similar to this,
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( is_single() ) : ?>
<div class=...
1
vote
1
answer
51
views
How to set a correct $content_width when there are two content widths on one page?
Currently I have 1860px wide image as featured image which shows on top of a post page, and 800px as post content width, and when I
Set $content_width = 800
The featured image shows as 800px wide ...
1
vote
2
answers
3k
views
Wordpress logo upload option in theme panel
Hello every one i am facing one issue in adding logo option in my theme panel of wordpress i am using this code
function logo_display()
{
?>
<input type="file" name="logo" />
...
5
votes
3
answers
296
views
How to build a complex page structure
Let's say i need a page structured like the image below.
There is a frontpage and from there i can choose one of the sites partners. Every partner gets a additional "partner page" which has to be ...
0
votes
3
answers
3k
views
Navbar- disable "onClick" drop-down
I'm working on a project on my desktop for a theme development, but an issue I am having is that when the user clicks on the navigation menu, it causes it to collapse. Since I got collapse to work on ...
0
votes
1
answer
47
views
Methods for development wordpress themes [closed]
Analyzing the code from WordPress themes, both free and paid for, and realized that there is no standard for the development of themes. Some themes use CPT for all other widgets, other Visual Composer ...
0
votes
1
answer
62
views
Custom theme: adding unwanted <p> tags in the content
I've built a custom theme and it works fine apart from WordPress injecting unwanted <p> tags on the page before the post loop starts. On top of that, it adds the word 'Save' eg: <p>Save<...
1
vote
1
answer
60
views
My javascript jquery won't work?
I am trying to make a mobile navigation for my site. However the jquery code won't work.
You can see what I am trying to do here: jsfiddle.
I have the html in my header.php after body tag, css in my ...
0
votes
1
answer
78
views
Creating Slider in wordpress theme with custom post
Im trying to integrate an html template.It has a slider.Each of the slide contains 6 images.clicking on the image opens a modal,which contain details about the image.Currently im implementing this ...
0
votes
2
answers
749
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
1
answer
3k
views
Unable to access Wordpress functions from functions.php
I am following a tutorial in an attempt to create a custom theme on Wordpress. I created my functions.php file in my theme folder, and am attempting to use the Wordpress function 'wp_enqueue_style()' ...
-3
votes
3
answers
3k
views
why my WordPress theme doesn't support shortcode? [closed]
I just create a simple WordPress theme, everything looks fine but when I use a plugins which need shortcode.
I put the short code in a page (like this [user-submitted-posts]), on front end, it show ...
0
votes
1
answer
709
views
Help with Multi Level Category Archive Page
I'm currently building a site for a local beauty salon and I have come across an issue that I just cannot seem to put my finger on and I have been stuck on this for weeks, where I'm stuck is with the ...
1
vote
0
answers
286
views
$this->get_field_id() not working in customizer
$this->get_field_id() is working fine when widgets are already added to it but when I add widgets using customizer it returns wrong id something like #widget-i
My Code:
//Custom Widgets
class ...
-2
votes
1
answer
37
views
How can I add a single image from a gallery into the page header?
Revised for clarity:
I want to upload a group of images to the site (through Media so it works through Wordpress) and then have that subset of images used to pull a random image for display either in ...
3
votes
2
answers
3k
views
Custom Post Type Archive URL takes over page URL
I am having troubles with the archives for a custom post type.
I have a WordPress page at /address/
I have created dynamic custom posts that are to appear at /address/post#/
When I activate this ...
0
votes
0
answers
216
views
Where can I find the declaration of `$_wp_theme_features`?
Where can I find the declaration of the global array $_wp_theme_features on WordPress core?
1
vote
1
answer
2k
views
WordPress get_template_part() function not working
I'm using get_template_part() function on my file (page-home.php) like
page-home.php and it is working fine until I called it 5 times on the same file (page-home.php) but when I called it 6th times ...
1
vote
1
answer
2k
views
Create another "Display Site Title and Tagline" checkbox, "Header Text Color" setting and control
When you enables Custom_Headers support for your theme with the following code, a "Display Site Title and Tagline" checkbox on the Site Identity section and a "Header Text Color" control on the Color ...
0
votes
1
answer
249
views
Will my site get messed up when the wordpress theme updates if I edited the html code in the editor to change footer?
I am trying to change the footer of my wordpress theme.
I have seen videos where they change the html code right in the editor. This seems like an easy way rather than creating child themes. I am not ...
1
vote
1
answer
1k
views
How can I display recent posts from a particular category in my header?
Question: Category Display
I'm trying to create a header that pulls data from the most recent 3 posts in a specific category along with pulling the image associated for the most recent post (if there ...
0
votes
1
answer
85
views
How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
I've tried posting each of these questions to the Wordpress forum, but I'm not getting responses. Hopefully, someone here can assist me.
Question: Catgory/Subcategory Styling
I'm trying to style all ...
0
votes
1
answer
235
views
How to perform str_replace on the results of wp_list_pages
I am trying to target and replace the text produced by a function. I'm not too sure what I'm doing wrong.
$InnerPages = wp_list_pages('child_of='.($post->post_parent != false ? $post->...
0
votes
1
answer
245
views
How to show children pages as array
I am creating a template that would display children pages of a parent page.
Employees
♦ Managers
♦ IT guys
♦ Designers
I want parent page (employees) to display its children pages.
...
1
vote
2
answers
72
views
Menu jumping when calling it via PHP
I'm using a Custom Theme to re-design our website. However, I'm getting an issue where the Menu jumps around and shows all links, before quickly collapsing them under the parent options, in the menu.
...
0
votes
2
answers
339
views
Single.php the_excerpt loads same as the_content not loading read more line
Currently I'm using the the_excerpt on my frontpage which works perfectly. When the visiter goes to the post it first needs to read the first part of the story, see a featured image and then load the ...
-2
votes
2
answers
212
views
Is there any way to show child theme in theme detectors?
I am using a child theme of Colormag on my WordPress site (I am a developer).
I named my theme "happiness" but whenever I check theme using an external theme detector, say "WP Detector", it shows ...
0
votes
1
answer
37
views
Different stylesheet for different pages not working fully
I am trying to use different stylesheets for different pages, but it doesnt kinda work. For example i made a page called 'Contact' and assigned the template contact-template.php to it.
and this is ...
0
votes
2
answers
312
views
Display current taxonomy slug in a post
I'm searching for a way to display the current taxonomy slug in a post.
Edited to make it more clearer here a more accurate example.
I have the CPT activites. I have more than 200 article posts ...
0
votes
1
answer
278
views
How to add post meta fields to an article's <head> as meta elements
I need to add the following type of meta information in the article
<meta name="citation_publication_date" content="1996/05/17">
<meta name="citation_journal_title" content="Journal ...
4
votes
2
answers
1k
views
What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
When I run "themes check" , it recommends not to use CDN.
I am using Bootstrap CDN this way
function underscore_bootstrap_wp_scripts() {
/* bootstrap and font awesome and animate css */
...
0
votes
3
answers
5k
views
"options.php" not found
I am making a Wordpress theme with a custom admin page. What I did to make it save the settings was this:
<form method="post" action="options.php">
When I hit the submit button, I got an ...