Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [theme-development]

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

0
votes
0answers
5 views

Create navigation that changes depending on how you get to a single page?

I'm trying to make conditional navigation along the lines of "if a user goes into the tag "foo" make sure the navigation once in the single page only goes back and forth in the "foo" tags. But if the ...
0
votes
0answers
10 views

Add second featured image to a custom post type without plugin

I want to show on hover a different featured image for some wordpress custom post type. I don't want to use a plugin, this because I want to learn how to use the wp API natively. Is there a way to ...
4
votes
2answers
34 views

How to know if get_posts() failed?

So I see that get_posts() function return an array of posts. If there are posts, it returns an array of posts. If there are no posts it returns an empty array(). If there are posts, but the querying ...
1
vote
1answer
23 views

How should I be handling my theme version numbering?

Let's say I have a custom-coded theme, and here's the style.css: /* Theme Name: My Theme Theme URI: http://someurl.com Author: Me Author URI: http://wordpress.org/ Description: Some description ...
0
votes
0answers
13 views

WordPress MultiSite using paths and wordpress does not update other sites using IIS

I have two issues, one, when I go to update WordPress under upgrade network, it says all done, but the other sites do not get updated. And two, when I network activate a plugin, it does not show on ...
0
votes
1answer
20 views

How to list articles by year based on url?

Hie all, I am trying to list posts by year based on the provided url (for example: wordpressite.com/2004 - this should list all articles created in 2004), unfortunately all suggested methods from ...
0
votes
1answer
19 views

Archieve.php not loading for custom post type

I have a post with a category of blog . So i came across with this archieve.php , whereby we can edit the layout and content of a custom post type. From what I understand archieve.php contains the ...
0
votes
0answers
3 views

Echo Hestia Frontpage sections on other pages

I am using Wordpress theme Hestia. This theme allows me to use some pre designed frontpage sections to design my homepage, also does the Orbit fox plugin add some extra sections to home oage all of ...
0
votes
0answers
16 views

New theme development while keeping existing theme live

Due to a PHP issue I want to update my website which I built through Word Press to a new theme. Building the new site may take me a month or so I want the current one to remain live. However once I ...
0
votes
1answer
22 views

How to add an image to a theme page template in code?

So, I'm trying to do an update to a site's theme layout, and I'm not sure what exactly the right function to achieve what I want is. We have a custom theme that uses a page builder, and we can add ...
0
votes
1answer
5 views

Change Portfolio to show all same size grid?

Currently I am editting a website, I need the portfolio section to show all the same size images rather than it showing a long rectangle on the 2nd column. I thought it would be able to be fixed in ...
1
vote
2answers
43 views

How to use thumbnails in gallery?

Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.
0
votes
0answers
14 views

Underscores Theme Unit Testing - Catching Untitled Posts

Wordpress 5.0.3 | Underscores Theme I'm unit testing a theme I based on underscores using the wptest.io xml. Underscores does not gracefully catch untitled posts. There is no title in either ...
0
votes
1answer
16 views

What is a use of wpThemeClient.start(“ws”, “127.0.0.1”, “8090”); while developing theme using React JS? [closed]

I have setup my Wordpress using create-react-wptheme setup. And in the setup i found this wpThemeClient.start("ws", "127.0.0.1", "8090"); code at the end of index.php file at theme root folder. This ...
0
votes
0answers
19 views

Changing the official theme color [closed]

I can't seem to figure this out at all, how do you change the official color of a template? It leads to: localhost/wordpress/:88 - I need to change the color of a heading on the menu.
0
votes
0answers
11 views

Are paginated comments required for publishing Themes?

So i implemented nearly every feature into my new WordPress Theme, while checking every Imported Page / Post from the .xml Import i realized that i am missing the Paginated Comments Feature. Is this ...
0
votes
0answers
34 views

get_the_excerpt() is not working as expected - returns wrong text

In my template's 'footer.php', I'm attempting to generate a list of the four most recent blog posts, showing the featured image, title, excerpt, and a link to view. The title, featured image, and URL ...
0
votes
1answer
29 views

Custom Post Type archive page listing a 404 or single post

I want to preface this by saying we HAVE tried saving and re-saving the permalinks structure. We are developing a custom theme and have a few custom post types in our theme. An example of one of them ...
0
votes
1answer
18 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 ...
0
votes
0answers
15 views

Customizer control for including files in functions.php

I have the following include in my theme's functions.php file to add social sharing icons to my theme: require get_template_directory() . '/inc/social-sharing/social-sharing.php'; I would like the ...
0
votes
2answers
18 views

Looking to create an “update theme” functionality for a custom front-end dashboard

I've created a theme that includes a custom dashboard outside of wp-admin. I would like a user who doesn't have access to the wp-admin (but does have access to my custom dashboard) to be able to ...
0
votes
2answers
22 views

ACF not showing

I have a (weird) issue - can't get the ACF field to work on my page. I have a simple text_field and it shows on the Homepage page section: ACF settings: Homepage settings (when I refresh the panel ...
0
votes
1answer
19 views

Wordpress child theme, creating a custom php template page

I am currently working on a project that uses a child theme (storefront is the parent theme). I need to be able to code using pure php / javascript (outside wordpress admin). Other custom template ...
-1
votes
0answers
17 views

Why do my WooCommerce emails insert the header and footer twice?

I am willing to share additional details if needed.
1
vote
1answer
21 views

Is <title> tag default in WordPress?

This may be a stupid questions but I have been building some themes. Some of them doesn't include the <title> in the head and some of the theme include it. I belive some SEO plugin can add <...
0
votes
1answer
14 views

How can I adjust archive.php page using a framework (Divi)? [closed]

I would like to use the Divi builder to adjust the layout of the archive.php, I think about copying the layout of an other page in the database, but It feels like there's a better way that I don't see ...
1
vote
0answers
21 views

Display a grid of taxonomy terms at root taxonomy page

I’ve used WordPress for years as a content admin but I am new to PHP development (am fine with HTML/CSS). From Googling about and experimenting I believe that what I want to achieve isn’t standard ...
-3
votes
1answer
21 views

Detect if you're in the “Frontend Editor” mode in Visual Composer Wordpress [closed]

Marketo forms tend to break the Wordpress Frontend Editor. Now - my thoughts are to detect if I am just displaying the current page or I am in the frontend editor mode. If in frontend editor mode ...
0
votes
1answer
21 views

how to ensure responsiveness in wp themes? [closed]

I'm creating my custom theme from a static page I created. CSS seems to work on a static page but when I tried to convert it into a wp theme, it didn't work. I suspected it was because of how I ...
0
votes
1answer
48 views

How to float an image in Gutenberg

I am trying to make my first post in Gutenberg and I've discovered that aligning the image right around the blocks works in the editor but when I preview it is not floating right. Previously I had ...
2
votes
1answer
26 views

the_content() in single-{post-type}.php problem

I have Custom Post Type "pjesma" (song), and the only way I managed to display the content is like archive-pjesma.php. It works fine: <?php get_header(); global $post; $args = array( 'post_type' =...
0
votes
1answer
29 views

Too many revision when post status is changes [duplicate]

When ever i update the custom post type it generates too many revision which crashed the website. ( memory exceeded) How can i debug this issue? Update : I was able to find the culprit. Will it be ...
0
votes
0answers
11 views

How to display only those posts as related post which have same post object?

I have two custom post types Lectures and Chapters. I have made a custom field in lectures post type and set the field type post object. In chapters post type I have added Chapter 1: Biology Fsc ...
0
votes
0answers
26 views

How does theme forest use routes [closed]

I found a new way of routing while using lovestory template from themeforest. Usually I used pages to have routes but they have a php file for route but I don't know how it works, there is a file ...
0
votes
2answers
10 views

Attach media to multiple posts

I have a simple code where I am attaching existing in the library image to a post: function attachToPost($attachmentId, $postId){ return wp_update_post(array( 'ID' => (int)$...
0
votes
1answer
28 views

How to display only child category post in related posts in custom post type?

I'm trying to display only those posts which are under the same category of the post which I have clicked as related posts. My custom taxonomy are like this : Fsc year 1 => Biology => Bio chapter 1 . ...
1
vote
2answers
109 views

How to modify an image block in Gutenberg WordPress 5?

Adding images to a post with the block editor: produces the code figure of: <figure class="wp-block-image"> <img src="http://localhost:8888/time.png" alt="alt text" class="wp-image-1391"...
0
votes
0answers
32 views

PHP Script on a template page & dealing with URI's

I am working building a page within a template which will be a PHP script to do various URL-based things (basically an API). Creating a page is simple enough, I created page-mypage.php in the ...
0
votes
0answers
13 views

wp_bootstrap_navwalker not working dropdow mobile or tablet

I am making a wordpress website from html and i'm using wp_bootstrap_navwalker.php to create a dropdown menu. I have successfully created that menu and it's coming nicely on laptop and desktop but ...
1
vote
1answer
10 views

WordPress menu link doesn't work properly

I am developing custom site. The header links work on home-page but when I go inside shop then the home-link becomes siteurl/shop how to solve this? <div id="content" class="site-content"> &...
0
votes
0answers
16 views

Ajax Add to cart with custom fields

So I'm using WooCommerce TM Extra Product Options to create custom fields for product page and WoodMart theme. This theme is using an Ajax ADD to cart button and I can't disable it but I don't want to ...
0
votes
0answers
17 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
0answers
45 views

Overriding HTML/CSS Classes of “Columns” block from Gutenberg editor

A custom CSS framework such as Bootstrap or UIKit includes its own much more flexible grid system. I would like to use this instead of Wordpress's CSS for the default Column block. To override the ...
0
votes
0answers
24 views

Child theme menu not appearing in Twenty Seventeen

I am trying to add two menus to the same location on a wordpress site. Which menu is displayed will be based on which page is being viewed and can be handled easily with CSS. I created a child theme ...
1
vote
1answer
9 views

How to add multiple custom widget areas

I'm looking to add multiple widget areas to a page in my theme as id like to have widgets within certain pages. I can add one using this code, I'm just struggling with a second. function ...
0
votes
0answers
7 views

Display header other than internal page index

I have a problem in my logic, I want to display a different header of the index until I could do it now I want to display the name of each page or category through this code, but the problem is that ...
0
votes
1answer
18 views

Do i need escaping get_the_passsword_form function?

I saw themeforest/WordPress.org has said all WordPress default get functions need to be escaped output for security region for WordPress Theme or Plugin development, Now I want to show password form ...
0
votes
1answer
17 views

makeing a terms of use page that is part of the theme

I need to make a "terms of use" page. The only way I see to do so involves the user needing to manually add a page in the admin. But I need to implement it as an integral part of the theme. Is ...
0
votes
0answers
25 views

create-guten-block in wordpress theme?

I'm working on a wordpress theme and want to replace my shortcodes with gutenberg blocks. I'm new to working with blocks but having looked into it a bit I've decided to try and use create-guten-block ...
0
votes
1answer
20 views

Hestia Child theme creation

I'm working on creating a child theme of Hestia for my own website but I'm just not getting where the code is supposed to go in my child theme coding. I know how to design websites and I'm familiar ...