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
20 views

Time based access control of custom post types - what is good approach?

I have a site where I teach courses. I want to have my courses run each quarter. So I would have Course 1 - Fall 2019 Course 1 - Winter 2019 Course 1 - Spring 2020 Course 1 - Summer 2020 The course ...
1
vote
1answer
18 views

Send a custom WooCommerce email when custom order change

I am facing a problem to send a custom email when order status changes. I created a custom WooCommerce email 'WC_Ready_To_Ship_`Email' and a custom WooCommerce order 'wc-ready-to-ship'. What I am ...
1
vote
0answers
20 views

Gutenberg block outputting JSON in front end - is this normal?

I have a custom block that modifies an Ultimate Add-On Gutenberg Section Block, so that I can define section types, such as exercise and apply some custom formatting. I noticed on front end my ...
1
vote
0answers
21 views

Find resources dynamically loading and change or add to the url

Is there a way using the wordpress functions.php file that I can: Find a resource trying to load from a url and add to it or change it. For example, if a .woff file was loading dynamically from a ...
1
vote
0answers
7 views

Custom Post Type - Category Rewrite - Remove Rewrite from Sitemap

I've got "case_studies" post type and categories for it as "case_studies_categories" with a rewrite to include category in URL. Everything works, but for some reason, rewrite url is in sitemap (as ...
1
vote
0answers
38 views

Overide plugin files from child theme (/inc/ ) folder

I would like to change the rendering of specific part of a plugin from a childe theme, so that I wont loose my changes after plugin updates. Well the plugin start by doing this: add_action( '...
1
vote
1answer
35 views

Change the Labels of Users to Customers in Admin

Ok, I've been searching for over an hour for something I thought (and still think) is pretty simple. I need to change the title Users to Customers in the admin for a client. I can and have easily ...
1
vote
0answers
27 views

how do I remove the shipping from woocommerce thankyou page and from the email

I've been trying to remove the shipping completely from my woocommerce website. I was able to remove it only from the checkout page and the cart page BUT I want to remove also from the thank you page ...
1
vote
0answers
26 views

Incorporate small angular feature in my wordpress site

I want to add an angular feature in my wordpress site, but i m confused how to incorporate both. I m jus confused about folder structure for the same Or i can create a plugin?? My angular feature is ...
1
vote
0answers
50 views

wp_generate_attachment_metadata is creating an empty array

I'm making a custom wp plugin for image optimization. I'm at the point that you choose the image, the script starts to optimize and put the new image in the upload folder. The problem is that i can't ...
1
vote
0answers
86 views

custom payment gateway in woocommerce failed to connect to remote api server

its my first time to create wordpress plugin, my task is to create a payment gateway i study this sample and also did some code on php using cURL here is the code. and it works. now on wordpress when ...
1
vote
0answers
18 views

Custom post type adds time/date and author to the post?

I got a custom post type, which for some reason adds a line to the post itself (checked the database). The line looks like this: 1 sep. 2019 kl. 21:05 skrev Sitename : The weird part is my site is ...
1
vote
0answers
24 views

Show titles, date of all posts on single category page

So I am designing a page where I'm showing all the categories like this: I created a custom page template for this and added this code: <div class="timeline-post-categories"> ...
1
vote
0answers
50 views

How to delete all posts from a custom post type?

I want to delete all posts from a custom post type "TV-Serie". The number of all posts in this post type are 150,000. Moreover, when I try to delete them all manually while selecting more than 500 ...
1
vote
0answers
23 views

Control Content On Non-Blog Pages

I'm new to WordPress, trying to learn it's capabilities. My Goal My goal is to make a normal website but have it's content (text and images) be adjustable by the user / client, managed content. An ...
1
vote
0answers
22 views

Display encrypted content on my website

Good day I am new here and to wordpress as well, please can someone tell me how i can automatically hide email addresses displayed on the front page(dynamic Content), see example https://quickleads....
1
vote
0answers
21 views

need help with a user-specific custom page template

I created a custom page template that will show sales from a hotel. I have 3 users and I want each user to only see their hotel sales on a user profile specific page. The template calls data using the ...
1
vote
0answers
17 views

Woocommerce custom search

I want to build a search form on the homepage where people can search by Product Name Product Category Price range I have found a few results, but a lot of them are filters which display products. ...
1
vote
0answers
16 views

How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets

Background My site is about DIY and 'making' around the house (let's say). Current version 5.1.1 I use posts for the content on my site which isn't strictly in "blog" (chronological) format in that ...
1
vote
2answers
27 views

Show post page only if the user has bought a specific product

I'm having troubles with Woocommerce. I need to sell videos. I've created virtual products with a link to a different post for each (no download as I prefer to embed the video on my website and to use ...
1
vote
0answers
31 views

get search results from only specific page name in wordpress

I have created a page by using add_submenu_page: add_submenu_page( "pharma-plugin", // parent slug "All Trade Name", // page title "All Trade Name", // menu title "manage_options", // ...
1
vote
0answers
18 views

How can I use a Tiny MCE editor in my custom Gutenberg block?

I am building a custom block where I would like to use the Tiny MCE editor for content entry rather than the RichText component that ships with Gutenberg. I am making this choice because I can't see ...
1
vote
0answers
79 views

Query to get siblings and parent page

I would like to create a custom query ID (to use in Elementor) to get siblings pages of the current page + the parent page of the current page. For now I get only siblings pages (without the parent ...
1
vote
0answers
17 views

Always logged in even if remember me is unchecked?

I want to extend the login session so that I never ever get logged out. Even if Remember me is left unchecked. This is the code I have at the moment, but it doesn't seem to work with Remember me ...
1
vote
0answers
42 views

Add New User, extra fields which are required?

I use these two functions to be able to set the first and last name when I go to Add New User: // Add First and Last name to Add New User function add_new_user_name_fields($user) { ?> <...
1
vote
1answer
30 views

Add custom profile field only for site admins?

I am trying to add a custom field called Company to all site admins on my network. And disable this field for every role which hasn't got the capability to create_users. This is what I have come up ...
1
vote
0answers
17 views

How to add an extra variable to login and authenticate it?

I want to add an extra variable to my custom login and to authenticate it to then add it to an SQL database. My custom login: <?php require('wp-load.php'); require('site_config.php'); function ...
1
vote
0answers
90 views

user_profile_update_errors hook not executing

I'm trying to use the user_profile_update_errors hook, however it doesn't appear to be executing. I'm calling it like this: add_action('user_profile_update_errors', 'blm_register_result', 10, 3); ...
1
vote
0answers
43 views

Best practices to assert current_user_can() with guests

In WordPress, a guest can do a lot of things, such as reading posts. However, this always returns false for guests: add_action('wp', function() { global $post; /** @var WP_Post_Type $pto */ ...
1
vote
0answers
14 views

How to display all subpages and short by year

How can I display all child-pages and short by year in Wordpress For example: all subpages in 2016, 2017, 2018: • 2018: ----- Subpage A ----- Subpage B ----- Subpage C • 2017: ----- ...
1
vote
0answers
142 views

Can't create term for product attribute

Please help. I need to create product attribute term after I create a product attribute taxonomy. wc_create_attribute([ 'name' => 'Size', 'slug' => 'size' ]); // This will only work If I ...
1
vote
1answer
482 views

Multiple Tinymce/wp_editor in WordPress >4.8

I'm struggling for two days and started here with success: Why Can't wp_editor Be Used in a Custom Widget? I managed to have multiple TMCE on one page (displayed by a widget); all save data ...
1
vote
1answer
231 views

WooCommerce sort products by the actual product width(not the shipping width)

I have regular/simple products and products with variance in the database. Regular products and variations have a product width(_pm_width_inches) associated with them . I am trying to sort based the ...
1
vote
0answers
21 views

Show posts by a custom post author

I have a listing site and various authors create custom posts (job_listing) On the listing post itself, I would like to show the links to the last 5 NORMAL blog posts by that author Is this anywhere ...
1
vote
0answers
24 views

Post category with counts been display like a menu

It is possible to display a post category list and counts like a vertical menu with some images icon in each post category.
1
vote
0answers
2k views

Get product variation attribute titles - WooCommerce

Hi there so when I am on a product page and I loop through the variations, I want to list their attributes WITH their titles. I have my code at a point which lists the variations attribute values but ...
1
vote
0answers
24 views

Steps for custom data retrieval

I'm trying to create a data retrieval field within a page. This would be a single input text box, which would query a non-WordPress table and return the result. I have done custom retrieval in the ...
1
vote
0answers
46 views

Send reply with pre-prepared answers

Do you know the way to ask users' comments with pre-prepared answers? What i want is very simple and more like a comments section that only can select and remove emojis without typing and have 4 ...
1
vote
1answer
17 views

changing font size and font of a custom message added after comment

hi i have added a code in function file of the theme to show a default custom message after the user leaves a comment of the blogposts . it reads like this . add_filter('after_comment_text', '...
1
vote
1answer
34 views

Edit sticky header html - How to locate corresponding php file

I need to make my sticky header work a bit more smoothly. Right now, when you scroll down, the sticky header immediately loads which makes the website jump. It´s bumpy and leads to bad user ...
1
vote
0answers
168 views

Customizer: active_callback and sanitize_callback incompatibility?

Below are a few Customizer controls I have for my site logo - Display Logo, Logo File and Logo Size. As you can see, I'm using an active_callback so that when the display_logo checkbox is unchecked, ...
1
vote
0answers
19 views

Include custom JS without child theme

Is there a way to include custom JavaScript on a website, without using a child theme? I am currently working on a customers website. Unfortunately he somehow managed to make it kind of impossible to ...
1
vote
0answers
340 views

How to change Attribute Type

I have created an attribute product-pv like below. Using the following code, function proccess_add_attribute($attribute){ global $wpdb; //check_admin_referer( 'woocommerce-add-new_attribute' ); if (...
1
vote
0answers
37 views

Disabling Customizer Selective Refresh shortcut icons for selected controls

Sometimes, on using the selective refresh feature, the shortcut looks little meaningless when an element is sort of removed from the view. For example, if I remove the custom logo and replace it ...
1
vote
0answers
29 views

JavaScript stops working on selectively refreshed sections one inside the other

I have two sections, a header and a logo in my theme. The logo is inside the header. A control in the customizer is responsible to handle the alignment of the header through selective refreshing. I ...
1
vote
0answers
35 views

Remove add news page and posts from menu

I want remove add news page and posts from left menu I try to use remove_submenu_page('edit.php', 'post-new.php'); but it only remove add news from posts, I need to remove add news from pages too.
1
vote
0answers
38 views

Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?

I recently purchased a 3rd party WP plugin (and started a site) with a view to starting a business. The plugin was first released only a few months ago.This particular plugin provides essential ...
1
vote
0answers
22 views

Custom Status of Custom Post type need to EXCLUDE from Taxonomy pages

I have 400 custom post type posts saved as DRAFT which are no longer in use but it can be in future, So for SEO purpose i want now to have all those posts accessible with direct URL but not showing on ...
1
vote
0answers
14 views

Saving and Restoring a Canvas on A Individual User Basis

I’m a little lost and not sure where to begin. I’m not necessarily looking for a complete solution, just a guide to the right direction. I want to have: ⁃ a page with the drawing application ...
1
vote
1answer
125 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 ...