Questions tagged [theme-development]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

add_meta_box showing blank screen in my page

I am working on the plugin and getting issues in add_meta_box. // Page URL- http://localhost:8080/wordpress/wp-admin/admin.php?page=testingpages&action=edit //Plugin page code if ($_GET['...
-2 votes
0 answers
13 views

Front & Backend Categories Name Change

How to change the category names in the front end in the case below? Frontend View Backend view I am able to change the default category name at the backend but it is not allowing me to do it in the ...
8 votes
3 answers
8k views

Reset positions of metaboxes in admin

I am writing a theme and in it I have a function which creates two metaboxes. The forth parameter of the "add_meta_box()" function I used can be set to ( high, core, default or low). I want the boxes ...
-1 votes
1 answer
941 views

404 on child page template

I have a page called portfolio and I have created several child pages for it like Video page, audio page etc … I also created custom page template for portfolio and named its file portfolio-template-...
0 votes
1 answer
16 views

Override plugin constant using a theme

I have a plugin which starts: <?php define( 'MAX_THINGS', 30 ); I would like to change the constant to be 2. I know I can edit the plugin file directly - but that will be overwritten if the plugin ...
0 votes
1 answer
32 views

Template for posts of category in block theme?

I am trying to use a custom template for posts of a given category in a block theme. I have created the template file in html (post-show.html). And I have edited the template in the site editor. As I ...
1 vote
1 answer
785 views

How to Upload CSV Data into Custom Post Type Data with Metabox programmatically

I have a Custom Post Type called movies which had only title enabled from post support and 3 custom field of metabax as box office, year, and director like now I have like 150 rows CSV formatted ...
4 votes
3 answers
5k views

Symlink a directory to wp-content/themes

Is it possible to symlink a directory from my project folder to my wp-content/themes folder which is in a Vagrant setup called chassis: https://github.com/Chassis/Chassis ? I tried to symlink already ...
1 vote
1 answer
865 views

How to set the currently active page in the menu including parents

I have the following problem: There is a custom post type. There are several pages each listing some of the posts based on some post criteria (custom WP_Query). When I click on a link to open the ...
0 votes
1 answer
42 views

Website Developer has gone missing! How to gain full access of your code from a Wordpress website?

I have hired a website developer to create a Wordpress website for me. The website is nearly finished, but the website developer has gone missing! I have admin access to the Wordpress dashboard. How ...
0 votes
0 answers
10 views

PHP warning: Undefined array key 2 in feed.php

I'm trying to resolve "PHP warning: Undefined array key 2 in ... feed.php". I was looking online, and it seems that when there is an undefined array, I can resolve the issue with an if(isset(...
0 votes
2 answers
874 views

Set a featured image as a replacement to the header image

I am setting a header image as a background image to the .blog__header block via inline styles in functions.php: $header_image = get_header_image(); if ( $header_image ) { $header_image_css = " ...
2 votes
1 answer
144 views

Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?

I am trying to create a Custom Premium WordPress theme for a Travel Agency. I am thinking of finishing the theme and submitting it for review. I want this theme to be really useful so I ended up ...
0 votes
2 answers
1k 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 ...
2 votes
1 answer
977 views

Best choice of options/settings framework for plugin/theme development

My question is what is the best options/settings framework out there now to safely build custom plugin/theme upon? I found the similar question here, but it was asked 7 years ago and definitely, ...
-1 votes
1 answer
749 views

Issue on Getting Images URL of the Post Gallery

I am trying to get the URL of the attached galley into the post on custom page layout called Gallery Page. I tried to use the code from Codex at This Page (get post gallery images). but I am not ...
0 votes
0 answers
28 views

How to fix wp-env: "error: Your local changes to the following files would be overwritten by checkout"

I have been using @wordpress/env for a few weeks, starting it with npm run wp-env start. Since this morning, that now fails with: > wp-env "start" ✖ error: Your local changes to the ...
-1 votes
1 answer
18 views

Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel

I would like to create a simple static page in my theme which would then show some practical information on a certain event. The page would be served on the path /practical. For now, there are no ...
0 votes
2 answers
1k views

have_posts() return false on single post

I'm a little bit confused with the use of the Loop. This is my first theme and i just use index.php currently to display all my pages. It works fine for pages but have_posts return false when i try to ...
0 votes
0 answers
31 views

Do core themes normally allow automatic upgrades?

I understand that in general WordPress core and plugins automatically upgrade themselves, depends on the theme, but is it true for core themes? I am planning to create a website which is basically all ...
0 votes
2 answers
5k views

How to output wp_enqueue_style() in HTML head instead of footer

I added some actions to wp_enqueue_scripts to load my custom css and js files in the header section by using wp_head(); right before the closing </head> tag. function mytheme_scripts(){ // ...
0 votes
1 answer
632 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
1 answer
639 views

How can I make my options in an array and store theme in WP options one DB row?

I am making a theme with theme options but for customization, I have completed my theme options more than half. Suddenly I have triggered one problem and that is I have checked my wp_options DB I have ...
0 votes
1 answer
823 views

enqueue styles for only mobile wp

I tried to enqueue some styles on mobile only using wp_is_mobile() function, but it always give me true, Here is the code (From functions.php file) : add_action('wp_enqueue_scripts','...
1 vote
1 answer
32 views

How to get postId from the argument $block when register_block_type()?

I'm trying to register custom block type in the file functions.php of my block theme: function render_custom_block($attributes, $content, $block) { return $block->available_context['postId']; } ...
0 votes
2 answers
2k views

How to disable controls in theme customizer?

Edit: I have rewritten the question in hopes I will get a reply from someone who knows the theme customizer. I am trying to figure out how to disable setting controls in the Wordpress theme ...
-1 votes
1 answer
637 views

How to CRUD from wordpress database in wordpress theme?

I am in project where I am required to read certain data from a table (which table is created by my plugin, related to this project, I mean custom table, not the default tables of wp). I use $wpdb ...
2 votes
1 answer
763 views

How can I get full attachment url from wp_get_attachment_metadata?

I want to get all sizes of an attachment. I can use wp_get_attachment_metadata to do this. But it only return filenames, not file urls. How can I do this? This is a workaround, but doesn't take ...
0 votes
1 answer
748 views

How to use posts as tabs in a custom page?

everyone. I'm a beginner at coding/Wordpress and need some help with a custom page I'm developing right now. The idea is simple: A list of items on the left An image with a description below on the ...
2 votes
3 answers
5k views

"Display Site Title and Tagline" checkbox not working?

I'm trying to develop a theme. but "Display Site Title and Tagline" checkbox not working nothing change when i check or uncheck the site tile and tagline still exist. also the color option not ...
1 vote
1 answer
1k views

Wordpress shows error related to allow_url_fopen

I just installed wordpress with plugins, everything works find except on a 'contact me' page, where I can see an error like this. Warning: getimagesize(): php_network_getaddresses: getaddrinfo ...
0 votes
1 answer
25 views

the_author() str_replace error

I Am Using WordPress 6.1 In Which I Am Calling the_author() function to get author name in single blog page. The problem is that it works properly when we call it in blog page but when I Call it in ...
0 votes
0 answers
14 views

How to display posts from a specific term first then another posts from another terms using tax_query

I am building a Custom query to display custom posts ( Jobs post type ) from a specific taxonomy ( job location taxonomy ) depending on IP detection. But i need to query all jobs and display them ...
0 votes
0 answers
17 views

Is there a block to print post link standalone in a block theme?

I know we can print post property (e.g. title or date) wrapped into the link to the post by using a block with the attribute "isLink":true i.e. <!-- wp:post-title {"level":1, &...
2 votes
3 answers
650 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
1 answer
1k views

Display content on Single page

I am building a single page theme, And I am having a problem with get_post_meta() The Problem This code bellow does not work, and I cannot see anything on the website as it's blank. Here is my index....
12 votes
2 answers
3k views

Is there any sort of theme dependency management?

I'm developing a Wordpress theme with a few other individuals and am running into a problem where I add a plugin and then I have tell the other developers about the plugin I installed and the settings ...
0 votes
1 answer
16 views

.submenu class missing in output from wp_nav_menu

I Am Developing A Custom Theme. I have registered nav menus as you can see below register_nav_menus( [ 'hub_header_menu' => __('Header Menu', 'HUB_WP'), ...
2 votes
1 answer
761 views

Why don't 'wp_nav_menu' CSS classes work until a menu is created?

I'm trying to create a theme for wordpress so I've done a clean install. I have not created entries, pages or menus. At this point I am in the part of creating the menu so I created in my functions....
1 vote
1 answer
13 views

DIV containing iframe disappears below break point of 992 in Oxygen Builder

I have a dynamic CSS grid using a repeater in Oxygen Builder that displays a mix of images and videos from an ACF repeater. I have used the following CSS which works fine up to 992px. .embed-...
3 votes
2 answers
926 views

Cache Busting using htaccess Rewrite rule?

I am trying to follow this tutorial that says i can make a server to send a file like style.css if the requested file is style.15458888.css with a rewrite rule to be put inside the htaccess file. ...
1 vote
1 answer
736 views

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme <?php /** * Template Name:Zoho testAPI * * * * */ echo phpinfo(); ?>
-1 votes
1 answer
410 views

My wordpress site memory exhausted more than 1GB trying to debug with default

My wordpress site memory is exhausted [02-Nov-2022 08:41:33 UTC] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in /home/ahzabcollections/...
1 vote
0 answers
12 views

WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?

You know WordPress is adding pagination for all pages not only for posts page/blog page. For example www.mysite.com, I'm getting URLs like www.mysite.com/page/15, etc. Here, www.mysite.com has a ...
0 votes
1 answer
2k views

Woocommerce Theme Reviews / Comments

Ok so i'm creating a Wordpress theme and i'm at the point where i'm trying to get a list of the reviews but the default comments_template() HTML isn't how I need it. I don't have a /comments.php ...
1 vote
0 answers
60 views

How do I add new layout width options in Wordpress editor?

How can I add new custom widths to the block alignment menu? I have set the two inbuilt ones in my theme.json, but how do I add more? Eg. narrowSize etc. { "settings": { "...
0 votes
0 answers
16 views

How to send async emails in wordpress?

How to make WordPress emails async I used this link but i got errors like wp mail already exist or redeclared error so kindly guide me how I resolve this certain errors thanks
0 votes
1 answer
698 views

Filter URL and shortcodes from the_excerpt

I just noticed a weird behavior on a theme I'm working on. If I have a post with just one link or shortcode, the_excerpt will print that URL or shortcode. But if I have some text in the post, below or ...
0 votes
1 answer
1k views

How to load mediaelement.js in theme template?

I'm developing a video oriented theme. I need to include native WordPress video player in my page template. This is what I'm doing: $video url comes from a custom field. It outputs the video file url ...
21 votes
12 answers
86k views

CSS not updating in browser when I change it

I am working on the CSS of my wordpress site. When I make changes and refresh the page the changes are not reflected. When I clear the browser history and cache the changes are still reflected. When I ...

1
2 3 4 5
89