Questions tagged [customization]

Modifications to theme and plugin files to create new functionality.

1,287 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
121 views

Create a custom php page and load it at a specific slug

I have this painful problem with a client. They need to load a feed from a remote endpoint into a page that fits their WordPress template design.. They also want to display the page at a particular ...
1
vote
0answers
27 views

Structure of data : CPT + terms

good morning, It’s not technical question about query or something else but about sructure of data. My current organisation doesn’t satisfy me, I’would need some advices please. The site speaks ...
1
vote
1answer
131 views

Redirect specific user role to specific site after login?

I have a function which kind of works. It will not work the first time when cookies are cleared. But the next time I will get redirected after login. Why is that? function role_user_redirect_login($...
1
vote
0answers
471 views

Send multiple attachments with wp_mail in PHP

I'm trying to send multiple attachments with wp_mail() , after some issues of attachments names (it displayed something like phprTxfd.pdf instead of file_name.pdf), i succeeded to display the name of ...
1
vote
0answers
34 views

Prepopulating a specific page template with HTML/CSS

So, I'm trying to prepopulate a specific page with HTML/CSS every time the page template is used. I've found this thread that was very helpful with how to do it, and this one was very helpful on ...
1
vote
0answers
236 views

When sale price is 0.00 show only regular price

I run my woocomerce product updates via excel sheet uploads with over 10,000 products. However, with the sale price/promo price column, I have prices of 0.00, 0 and some blank. I want a situation ...
1
vote
0answers
59 views

Wordpress admin pointers tour bug?

I found a fantastic function which lets me create a tour for the site admins when visiting the dashboard for the first time. I managed to make it work really well, except when I tried to make two ...
1
vote
0answers
62 views

The function can not create a table on MariaDB server

The function works on MySQL server well but it can not create a table on the MariaDB server. What could be the problem? public function create_table() { $current_version = get_option('...
1
vote
1answer
241 views

wp_get_nav_menu_items wp-admin/customize.php problem

Hello what can I do I somehow get the following error on the custom panel at admin panel. Normally there is no problem on the menu. I only get an error when I enter the Customize page to live the ...
1
vote
0answers
225 views

redirect post id to post full url

I use this permalink structure /%post_id%/%postname%/ in WordPress the problem is that posts are accessible via post_id for example: example.com/1415/how-to-make-a-cookie is accessible with this ...
1
vote
0answers
37 views

How to handle paged param in post and custom-post-type?

hope someone can help me on my customization. PREMISES i'm very experienced dev, but very beginner on wp. I readed lot of answer on SO but not finding nothing similar to solve my issue. What i need ...
1
vote
0answers
24 views

Allow a Widget to be used one time only?

I am trying to only allow the use of all my widgets one time per widget. But searching a lot for this did not help me. I found something called $settings['_multiwidget'] = 0; but I don't know what it ...
1
vote
1answer
154 views

Edit postmeta when user changes user role?

I'm trying to update a postmeta field in the database called background-video. I want to clear the value from this when a user has changed the role to a user role called basic. I found this code, ...
1
vote
0answers
28 views

Prevent Delete Attachment by URL or When Submit

This code is working, which prevent being deleted by specific title: add_action( 'delete_attachment', 'check_relations' ); function check_relations( $post_id ){ if(get_the_title( $post_id ...
1
vote
0answers
71 views

result from custom filter admin table list backend does not work

UPDATED!! So when I choose an option my admin table does not change based on filter I have create code to make custom filter by custom postmeta. My filter is created and appeared above table but ...
1
vote
0answers
722 views

Save custom attributes of product in woocommerce

I have some custom attributes for each product in woocommerce, I can edit them at the Attributes tab. I can also read them using this code $product = new WC_Product($product_id); $v = $product->...
1
vote
1answer
31 views

How can I create a second multisite network in a subdirectory?

I currently have two Wordpress installations. One is in the web root directory and is a multisite installation using subdirectories, not subdomains. The other is a test site, in a subdirectory of the ...
1
vote
0answers
130 views

WP_Object_Cache for heavy WP_Query

I am wondering what is the best way to cache a Wp_Query that can have from 10 items to 10000. I know it's a bad practice but for specific reason I have to process all this post types all together and ...
1
vote
1answer
73 views

Calling an attribute from a plugin shortcode

I'm using this plugin to show the reading time of my post: https://jasonyingling.me/reading-time-wp/ However, I have modified some stuff because I want to be able to use it with different languages ...
1
vote
1answer
216 views

Cutom wp_query for geolocation search, pagination not working

I have a custom search form that ends up on a page-template.php which then performs two WP_Query's. This is for a real estate where each property CPT has a long / lat value set via ACF. The code is ...
1
vote
1answer
1k views

Custom search to display results within same page

I am using the Easy Digital Downloads plugin to sell my music. I would like to add a custom search form inside the downloads archive page so the results will be displayed on that page. For example, ...
1
vote
0answers
32 views

Search widget will search everything in the site, how to limit to only search gallery name

I am using the default search widget in sidebar, the problem is , it will search every text in the site. I would like to make different search widget, e.g. one search widget for search gallery name ...
1
vote
0answers
325 views

$wpdb->replace: WHERE?

My plan is to upsert values in a custom meta table with $wpdb->replace. This is what I try: $up_meta = $wpdb->replace( 'spieldaten', array( 'spiel_uid' => $uid, '...
1
vote
0answers
234 views

“Add A Widget” button in the Customizer

I'm developing a theme and working on the Customizer at the moment. I've been able to add sections, panels and controls to change text, colours and images. One thing I've seen on other themes is an "...
1
vote
0answers
170 views

Zoom on custom theme without child

I'm currently developing my own theme in WooCommerce, it's a great way to get familiar with it, and a rather fantastic plugin... I worked on a lot of aspects, including carts, but now, I'm attacking ...
1
vote
0answers
47 views

Unable to login using username

In my website i have signup and sign form.And also I exposes the web services for the signup and sign in form. Flow of web as well as mobile application are as follow: For every signup the ...
1
vote
2answers
39 views

Use of Templates in a Plugin

I´am creating a Plugin. For this I wrote my own templates. Now I want to have the templeates files in my Plugin directory. But that doenst work fine. Since I used the Plugin directory, wordpress ...
1
vote
0answers
30 views

WooCommerce - buying as well as selling

Having looked around, I can't find an obvious answer to this one. Can WooCommerce be configured to have both products available to sell as well as products I offer to buy? I have looked at setting ...
1
vote
1answer
204 views

Work flow for multiple developers

I'm looking to streamline the development work flow for a new project that will have multiple developers involved (backend and frontend). My biggest quandary is how best to make sure all devs have ...
1
vote
1answer
273 views

WP_Query custom post type query not showing the exact post type

I am new in WordPress. I have registered wp_query function through 'custom post type UI' and 'Advanced custom fields' plugin. And this is the code in the portfolio page. <div id="tf-content"> &...
1
vote
0answers
186 views

Authenticating to Wordpress, using my own authentication two-factor system

This is basically the same request as Integrating WordPress to my website, while keeping my own authentication system I am using the below code as requested. It seeks authentication from our ...
1
vote
1answer
279 views

Alphabetical Custom Menu

I'd like to create an alphabetical a to z to # custom menu on top of the regular menu. My website is about artists and lyrics. I'd like to have something similar to this menu structure. when you ...
1
vote
0answers
125 views

Search results posts_orderby and ID

I'm using this function for customizing search results: function order_search_by_posttype( $orderby ) { if( ! is_admin() && is_search() ) : global $wpdb; $orderby = "CASE WHEN ...
1
vote
1answer
142 views

How to add a do_action on refreshing of WP customizer?

I want to clear the cache of a plugin on refreshing the preview of the WordPress customizer because I can only see the changes I make if the cache of that plugin is refreshed. This because the theme ...
1
vote
0answers
84 views

Add Custom API Call to WP-Login.php

I want to trigger an API call to another system every single time when a new user register (in real time). Therefore, I opened the wp-login.php and I was able to locate the register form but I'm not ...
1
vote
0answers
1k views

Allow the comment author to delete their own comments

I've looked high and low and I can't find anything that will allow the logged in comment author to delete their own comment from the front end. All I want is a delete link under their comment that ...
1
vote
0answers
117 views

wp_query get post custom taxonomy in search.php

domain.com/?cat=id custom taxonomy not get post but category get to post How do you write wp_query get post taxonomy? <?php $args_my_query = array( 'post_type' => 'post', '...
1
vote
0answers
190 views

External Domain on Wordpress Multisite

I have a new wordpress multisite install. I want to point an external domain to a specific site on this install. I'm using the WP mu domain mapping plugin. I'm hosting on Godaddy cpanel. Things I'...
1
vote
0answers
52 views

Theme Customization through admin panel. (Appearance-Customize)

When i customize my wordpress site's theme through customization settings in appearance menu at the admin panel, will the settings lost after i update my theme. I am aware with the usage of child ...
1
vote
1answer
912 views

Get rid of title from static front page

I don't have an image logo header yet, rather, I'm just using one of my 'Pages' as my static front page. It's title is "Welcome" So now, 'Welcome" and links to it are appearing in three places: at ...
1
vote
0answers
14 views

In the archive widget, how do I sort in between two years?

I want to make custom time periods in my archive widget. Right now it is sorted by month and with plugins I can change it to months and days and stuff, but I don't want that. I want to sort the ...
1
vote
1answer
78 views

How can I setup a wordpress site with multi country & multi lingual support

We need to create a website for a large company that is present in 4 continents. Content, services and contact information for each region will be different. Moreover, each region may have the website ...
1
vote
0answers
359 views

Creating subfolders in the media library

I'm new to WordPress. As far as I can tell, there's no built-in way to manually organize uploaded media into subfolders. There are free plugins that enable categorization, but this does not affect a ...
1
vote
1answer
65 views

Function to delete a post, it's children and it's grand children (half way there already)

I've got a function working to delete a post and it's children. How can I amend this to delete it's grand children too? <?php function delete_post($sectionid) { global $post; $...
1
vote
1answer
18 views

Make custom page look exactly as homepage

I want to make a custom page that looks exactly the same as index.php, while showing different content. Right now, on index.php I'm showing only posts under the "News" category, but on my custom page ...
1
vote
1answer
201 views

Weird 404 URL Problem - domain name being placed at end of urls

For some reason when doing crawl tests I'm finding pages with the domain name being tacked on the end and causing 404 errors. For example: http://domainname.com/page-name/http://domainname.com This ...
1
vote
0answers
83 views

Customizer: save setting/control content to post/page

Is it possible to have a custom Customizer control/setting that saves the content in a new post/page instead of a theme mod/option. Each control would be assigned a post/page, and that control would ...
1
vote
1answer
138 views

Q: How to pull data from custom table to populate zustomizer setting/control select options

I am trying to create a select box/dropdown menu in the Wordpress theme customization area where the options are to be extracted from a column called "alias" in a table named "wp_revslider_sliders" ...
1
vote
0answers
80 views

Turn On Comments On Custom Post Types in Directory Theme

I have been trying like crazy to get comments turned on in a directory theme with Custom post types. Their support wont do much of anything but link me here and I've tried what I've found, but its ...
1
vote
0answers
23 views

Integrate wordpress into index page

I have index page which is pure HTML/CSS http://example.com/ and Wordpress blog into sub-folder http://example.com/wp/. What I want to do is to show most recent post + recent post widget from blog ...