Questions tagged [theme-development]

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

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

Alter shop page lay-out in OceanWP theme

In OceanWP, I want to alter my shop page by a Beaver Builder template so I modified part of the index.php file as follows: <?php // BLOG PAGE if ( is_home() ) { /* Beaver Builder generated ...
0
votes
1answer
79 views

How to wrap all titles generated by Gutenberg “Heading” block with <span> tag

Gutenberg is still relative new concept, so I lack experiences (and the Internet lacks good tutorials). My goal it to wrap all heading titles generated by Gutenberg's "Heading" block with the <span&...
0
votes
1answer
13 views

nothing happen in search form

I want to create search form but when I search something nothing happen and this is the code: index.php: <div class="tech-btm"> <?php get_search_form();?> </div> searchform:...
0
votes
0answers
23 views

the_content() returns an error

I am using the_content method and it returns me an error: "Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\wordpress\blog\wp-includes\post-...
-1
votes
1answer
24 views

How to create Custom Theme in Wordpress [closed]

I want to create custom theme in word-press from scratch so can you have the idea about custom theme folder structure and development steps so please help me. Thank You in Advance.
0
votes
1answer
9 views

Copying the theme style files and images to duplicate the website but with a difference

I have recently downloaded a nulled premium wordpress theme online and have been doing changes to see if I can build the website I want to with the theme. Now that I am satisfied with my result, I ...
0
votes
1answer
22 views

Problem paginating a subquery on a post

I have created a post template that looks for other posts with the same tags. I want to paginate this list of posts. The pagination links look correct but when I click on them the pagination is lost. ...
0
votes
1answer
19 views

how to change footer content for certain pages only

need to change the Address content in the footer section for certain pages only we are working in education domain the site has two main links one for ABC High school second is XYZ Nursery and ...
0
votes
0answers
11 views

images click popup form and submit images captions in email to admin?

Create Custom Post gallery..archive page display images. customer can click Enquiry Now button.. this button popup form submit all detalies name,email,phone no,msg to send email to admin
0
votes
0answers
7 views

How to avoid showing parent category if is not checked in wordpress

I'm not sure if what I'm asking is possible or not. Anyways, I'm fetching custom post type from the database based on category. When I tick subcategory or even subcategory of subcategory, all parent ...
0
votes
0answers
20 views

My wordpress local urls is still displayed even moved to live

My wordpress local urls is still displayed in some pages even moved to live. How do i fix this, local urls displayed in "canonical link", " meta property="og:locale" code, "schema code". NB: We are ...
0
votes
0answers
23 views

only the first post is shown

I want to show posts in index page but just the first one is shown!this is the code: <div class="w3ls"> <?php if(have_posts()): while (have_posts()) : the_post(); ?> <...
0
votes
0answers
10 views

Display or replace the custom field image in guest auhtor box bio pic from specific post in coding

I want to display, the image from the custom field in the guest author box of the post who has not registered.
0
votes
0answers
14 views

how to change footer quick links menus(Primary menu) for certain pages

Need to change Footer quick links menu and footer tagline for certain pages only we have working on School site it have both higher secondary school pages and nursery school pages if we click the ...
0
votes
0answers
18 views

Is the date when a theme was activated stored?

Is there a date for when the currently active theme was activated stored anywhere? If so, what's the best way to retrieve it? Thanks
0
votes
0answers
8 views

Page For Specific Posts

Im trying to find a way to choose in which page I want my posts to be published in. I have been trying to manipulate the theme-files and to write new functions. But so far without any success. ...
0
votes
1answer
17 views

function 'theme_settings_page' not found

I want to add change apearance setting to my theme and I am using this code: //admin pannel function theme_settings_init(){ register_setting( 'theme_settings', 'theme_settings' ); } //افزودن ...
0
votes
1answer
19 views

How to Download Minimum Requirement of WordPress (Not Themes )

This is not about themes! but WP core files. I am using WordPress just for sake of it's security and Routing engine. I do not need any slat and surges on top WP like commenting, language,.... What I ...
0
votes
1answer
19 views

wordpress can't find single-project page

I created a project form for adding projects,but when I create it,a wrong link create this is how I created project form: add_action('init' , 'create_project'); function create_project() { $...
1
vote
3answers
19 views

Stylesheet not linking

So I have the following structure in my theme: Themes/ - theme-name/ -- functions.php -- style.css -- page-directories.php For some reason, I'm unable to link the style.css to be included ...
0
votes
1answer
60 views

How to get a post views count using 'WordPress popular posts' plugin

I am using 'WordPress popular posts' plugin, and I'm trying to get post total views by ID using: wpp_get_mostpopular() function. Is there anyway to achieve that? or is it even possible?
0
votes
1answer
11 views

How to find where an object first instantiatiation

Problem is solved. I have built a theme options class so i can build as many option pages as i want, an i implement a singleton design pattern to fetch options only once, and i have WPML plugin ...
0
votes
0answers
13 views

moving sections around on wordpress themes that contain sidebar toggles

I am trying to edit a wordpress theme's home page and despite looking hrough some of the php and java acripts as well as searching for the Div classes in all files can not figure out how the theme is ...
0
votes
1answer
1k views

How can i convert the figma design into wordpress [closed]

I have the design in figma, i want to build a wordpress website on these design. can anybody suggest me how can i proceed. Thank you
0
votes
0answers
15 views

In if…else condition, the else statement shows even if if statement is correct

Will please someone help me why this happens. Firstly here is my code. add_action( 'woocommerce_after_add_to_cart_form', 'sione_enquiry_button' ); add_action('woocommerce_cart_actions', '...
1
vote
0answers
41 views

the_permalink() doesn't work

On the index page I want to show projects. Each project has a detail. When clicked on the permalink on the index page it should open detail page. But it doesn't do so. This is the code: <a href="&...
1
vote
2answers
55 views

Showing Co-Authors on post page

I am trying to make my theme compatible with Co-Authors Plus plugin and show the co-authors of a post if had any. I spent about 30 minutes trying to convince myself that I understood the following ...
1
vote
1answer
12 views

Grab posts by multiple categories

So I have the below code that works great: if (isset($meta_field['category'])) { $post_data = get_posts_by_category($meta_field['category'], 0, $post_limit); } else { $post_data = ...
0
votes
0answers
9 views

Alpha Color Picker, moving title at beginning of picker

I am using alpha color picker (with transaprency) by Braad Martin's. See Source Here Initially, it doesn't show the title and description. Its shown as below When I click the button it shows the ...
0
votes
1answer
21 views

Wordpress Local Install Theme Folder Permission To Edit

I have installed WordPress on a local LAMP installation. All I want is to edit the theme files locally on an editor like VS Code where I can open the theme folder and start editing on the go. But I ...
-1
votes
1answer
17 views

add_action works outside condition but not inside it

I am developing a theme framework for my own purposes. So this time i am facing a problem, that is add_action works out side conditional. add_action( 'meanz_before_main_wrap', '...
0
votes
0answers
5 views

How to create a specific slug like add_menu_page in theme for frontend user

I am working on theme application for wordpress frontend. For example : I have developed plugin contacts . Now its working fine in wp back end . admin.php?page=add_contact admin.php?page=...
1
vote
1answer
15 views

A custom theme with support for multiple layouts

I've been tasked with creating a custom WP theme for my company's website. I know PHP and decent WP plugin development but haven't worked with themes before. I'm using Underscore as a base for my ...
0
votes
1answer
8 views

Default customizer colors aren't displayed outside of the preview

I've been working on a custom theme & going through the usual rollercoaster that accompanies this particular exercise. I do find it very rewarding but what I'm looking at right now is the theme's ...
-1
votes
1answer
22 views

Adding php within a return statement [closed]

How should I add php code within a return statement. My following code does not work: function read_more() { return '<a href="<?php the_permalink(); ?>">Read More</a>'; }
1
vote
0answers
30 views

Can't access variable outside for loop

My problem is that I can't access the $cat_slug variable inside the [display-posts] short-code. The idea is to use that variable to dynamically pick post categories via the array returned from ...
0
votes
0answers
24 views

Change Next/Previous for category

I need to add the change by category in my next and previous buttons. I have tried this previous_post_link('%link', '%title', true ); next_post_link('%link', '%title', true ); but it hasn't ...
1
vote
1answer
27 views

Best practices regarding the creation of custom widgets?

I am creating a theme, and I need to create and register a couple of custom widgets for my sidebar. I need to extend the widget class (for every widget) to do this, which produces a metric ton of ...
0
votes
1answer
14 views

Image cropping isn't working correctly when using Offload Media

I've been working on a custom theme using the blankslate boilerplate & I'm happy with how it performs with a few minor details. This one concerns image cropping when a site uses the Offload Media ...
0
votes
0answers
26 views

Variable ++ in query loop

There are 2 dynamic changing requiers thing in my html.they are "active" and "numbers (for example 1,2,3...)".I want write "active" into class if it is first element in query, else write only one ...
0
votes
0answers
18 views

sanitize_option_{$option} filter returns null

I have a problem that theme options is not updating, so after tracking down the problem i have reached to the sanitize_option_{$option} filter, so before applying the filter i var_dumped the $value ...
1
vote
2answers
43 views

How to enable template page only for a post id page

I wish to limit the possibility to use a specific template page only for post id x I have created a page-blog.php template and I want it usable only for the post id 115 (id of my blog page). ...
1
vote
1answer
37 views

I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php

I'm working on converting a code template (html, css, js) into a Wordpress Theme. This wordpress theme is not a child theme. For the home page (front-page.php file) the enqueues of stylesheets and ...
0
votes
2answers
14 views

How toprint informations in footer

Is there any filter or hook to print a script or add in the footer some content? I'm not talking about wp_enqueue_ function, I'm creating a plugin that will show a banner for privacy and cookie info ...
0
votes
1answer
23 views

Pagination doesnt work in custom post type

Pagination template part includes common pagination function with style.The template part works for archive.php ( its for "single", you know default wp file ) but doesnt work for custom post type. ...
1
vote
1answer
58 views

Default image size not working

I have some hooks on my WordPress Theme in order to customize the default images sizes, but it does not work. Here is the code: function my_custom_image_size() { add_image_size( 'post_size', 730);...
0
votes
0answers
27 views

Having an issue with a php theme and a slider plugin

Good morning, So, I am working on an intranet site, and we've created a couple themes to use. The issue is, when applying a certain theme, the slider that is added via shortcode will not display with ...
0
votes
0answers
11 views

Theme functions don't work as expected in partial included via get_template_part() after custom query using Ajax [duplicate]

I am developing an custom theme which could be a child theme of any arbitrary theme out there that has custom theme functions defined. The home page is simply configured as list of latest posts. I ...
0
votes
0answers
20 views

How to implement pagination in category.php template

I'm creating the category template for a custom theme. With this code I'm able to get the last six posts of the news category, I need to add pagination links at the bottom of the page, How I can do ...
0
votes
1answer
14 views

Can any IDE (eg PHPStorm, VS Code) correctly show functions added via require get_template_directory() string results?

I would simply like to do some WordPress theme development using statements like require get_template_directory() . '/functions/base.php'; in my functions.php file. It seems IDEs do not ...

1 2 3
4
5
83