Questions tagged [theme-development]

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

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

How to show metabox on page if it is using a template

I was creating metaboxes for a special kind of pages. But i got stuck when showing metaboxes to the pages only who currently have the template 'Sky'. my template file name is sky-template.php and ...
0
votes
0answers
25 views

Mix it up & Wordpress

I'm trying to create a MixItUp of articles. Those articles are in my category "Projet" which as 5 sub-categories. My problem is that I can't sort them with my sub-cat controls. If someone can explain ...
0
votes
1answer
14 views

Displaying the right content on a page url

I created a WordPress theme with one page design format which means I wrote all the code in the main index.php file. Now I need to make a different page with separate URL but for some reason it still ...
0
votes
1answer
19 views

Replace Home with image link inside custom header menu

What I want to achieve is a header menu like this: Right now, I have this: I am not far off. To get to where I am currently at, I followed these instructions and added some custom CSS. So I added ...
0
votes
1answer
47 views

Is_single not working properly in genesis

I am currently creating a child theme for my website which uses Genesis as a parent theme. Now I am making single pages as per my choosing. So, I am removing the entry header from within HTML main and ...
0
votes
0answers
60 views

How to offset main query without affecting other queries and backend

I'm trying to offset my main blog query by 3 posts whilst trying to get the pagination to function correctly. I've been following the codex reference here but I'm struggling to get it working as I ...
0
votes
1answer
101 views

Multiple content areas with Gutenberg - Transparent areas mid content

I am trying to find a solution to a layout I have been tasked to build using 'Gutenberg' blocks. As far as I am aware there can only be one the_content(); per page. The layout I am trying to achieve ...
0
votes
1answer
120 views

Fix hover images blink

I have this css script generated using php, it's used to show a wordpress second featured image when an user hover. The problem is that the images are blinking and I don't know how to solve this small ...
0
votes
1answer
20 views

Comment status shows 'closed' in db, but it shows 'open' when i echo it

Here is database ss. And comment_status is closed But when i print it, it shows open echo $post->comment_status; Also, in page settings, comments checkbox is unchecked. So, i can't hide ...
0
votes
1answer
332 views

How to unset a set query variable?

My theme file, multiple times over, passes sets a variable to a template part used in a subsequent template part file via set_query_var, like so... set_query_var('feature_id', array(143866)); ...
1
vote
1answer
126 views

Using a variable in is_page(array())

Similarly to this topic I need to extract some page IDs from user input (a theme options admin page), store them in a variable, and then filter using the is_page() filter. The input consists of ...
0
votes
1answer
36 views

Moved a website and excerpts don't work for old posts

I moved a WordPress website to a different host and all post excerpts stopped working in the blog list. When I make a new post they appear fine but doesn't show for the old posts. I peaked into the ...
0
votes
1answer
19 views

How to get full native language instead of iso?

I am not using WPML or Polylang, but multisite to create multiple languages. The code below is used to make a language switcher, but I want a second menu with the full language name for a different ...
6
votes
2answers
90 views

Proper, exhaustive documentation for wp.editor etc

There exist the following : wp.editor.PanelColorSettings wp.editor.InspectorControls wp.editor.RichText wp.editor.BlockControls etc. Where is the documentation that shows the full list of available '...
0
votes
0answers
21 views

Create custom role and capabilities to manage CPT

I have created a job offers plugin with two custom post types job_offer and job_application. Now I'm trying to create a custom user role "HR Manager" with custom capabilities. This user role should ...
0
votes
0answers
12 views

I want to add plugin files in wordpress theme directory

I added a few lines code in plugin. I want to add that plugins file in wordpress theme to avoid to be overwritten when there is an update. How can I do this?
0
votes
0answers
13 views

How to show users with have role in separate menus in wordpress admin panel

In users menu Wordpress admin panel, for default shows all users with all roles in a menu. I want to show users with have role in separate menus in wordpress admin panel. For example each users have ...
0
votes
2answers
255 views

Multiple do_shortcode($content) within one shortcode

TLDR; How can I run a shortcode with multiple shortcodes inside of it? I'm trying to run a shortcode with multiple shortcodes inside of it. I can successfully run a shortcode with one shortcode ...
0
votes
2answers
57 views

change background image on scroll

I want to create a background image effect that will change the image when the user scroll. I'm facing a problem with the images urls, how i can fix this? How I can link an image url in jquery from a ...
0
votes
0answers
19 views

(Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme

I'm a WordPress developer but this one has left me scratching my head... I've got a parent theme and a child theme. Works great on my local machine, and was working great on my live server. However ...
0
votes
0answers
14 views

Correct approach to build dynamic links between translated pages

I have a simple website, www.recconsulting-services.com and I have the pages translated both in Italian and English. As you can see on top of the screen (header.php) I set two anchor flags images. If ...
1
vote
1answer
35 views

Custom Blocks as part of a theme

I'm new to wordpress, but I'm a pretty competent developer. I'm trying to nail down what my client can do to their site. My idea was to create some special 'blocks' for them, which provide the page ...
0
votes
1answer
22 views

two col layout bootstrap 4 with one fixed col and fade in effect on image

I've created a layout for my single post that have a fixed column and another that contains images that has the vertical scroll. I'm using viewportchecker to check if the images are inside the ...
1
vote
1answer
19 views

Storing the contents from txt file into The_Contents"

Currently I am trying to fetch data from an external page, which I have stored via a custom field and store it into the top portion of my WordPress the_content when the post is saved. The steps are ...
1
vote
0answers
52 views

Storefront child theme not applying parent theme [closed]

I've followed, word for word, the Storefront guide for creating a child theme: https://docs.woocommerce.com/document/set-up-and-use-a-child-theme/ I've got a new folder in my themes folder, added a ...
1
vote
2answers
354 views

Custom post type archive sorted and grouped by date in post meta field

I am trying to build an Custom Post Type for showing information about events. The Custom Post Type has name 'Event', with the following meta fields: event_startdate (date in format YYYY-MM-DD) ...
1
vote
1answer
21 views

How to display the link (title) and thumbnail post?

I found this related post code here, but the code calling it is incomplete, it only shows the article title. How do I make the links and thumbnails appear? I really hope someone helps, because this ...
0
votes
0answers
10 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
189 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
1answer
76 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
40 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
1answer
30 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
24 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
44 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
24 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 ...
1
vote
2answers
57 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.
1
vote
0answers
21 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
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
234 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
35 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
62 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
17 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
24 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
87 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
24 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
vote
1answer
33 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 <...
1
vote
1answer
197 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
40 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 ...
1
vote
1answer
184 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 ...