Questions tagged [customization]

Modifications to theme and plugin files to create new functionality.

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

Load my Inline js footer area

In WordPress we are used a editor that's name muffin builder. It's create dynamic google map script. I just put my Google Api key in this editor and apply it in my home page and its autonomic create a ...
0
votes
0answers
40 views

Custom Email based on User Role at Registration

I need to create a custom registration email for different roles that a user signs up to. Here's what I've done so far, a lot if it are copied as I'm still learning: /* * Plugin Name: Custom ...
0
votes
4answers
626 views

Cannot call function from Functions.php in template

I have a custom php file in wp-content/themes/xxxx/modules/custom.php and i want to call function from Functions.php. Right now all my functions (same function) everywhere in different files, because ...
0
votes
1answer
236 views

How can I capture Memberpress user info after signup

I'm currently working on a website where users can purchase subscriptions using memberpress, I want to capture the user data after the signup process is completed and the payment transaction is also ...
0
votes
0answers
33 views

Custom post status not working in REST API

I am trying to add a custom post status to my custom post types using thefollowing code: // Register new post status function my_custom_status_creation(){ register_post_status( 'approved', array( ...
2
votes
0answers
38 views

How to Replace Words with Hypertext Link But Ignore Previously Existed Links?

Auto-linking for "selected words" in the_content I am currently using the following code: function wp_affiliate_links($text){ $replace = array( '/ example /' => ' <a rel="nofollow" href="...
1
vote
1answer
22 views

My plugin wants to update another plugin

I am having issues when I view my installed plugin page, it's telling me there is a new version available. If I click the view version or view details links, it shows a completely different plugin ...
4
votes
1answer
315 views

Blocks: set a default value for a TextControl

I'm creating a block similar to the WP Core Table block, which first presents the user with a form to set the number of rows and columns. I'd like to set a default value in the TextControl for the ...
0
votes
1answer
30 views

How to have different background image based on post category

I have below piece of code in style.css file (website : https://askpuzzle.com) I am looking for option to have different background-image for different post/question category. .question-content-...
0
votes
2answers
352 views

How to order posts on each different category?

In wordpress, right now only on my main blog page, I managed to sort all posts with: <?php if ( is_active_sidebar( 'blog-category' ) ) : ?> <?php dynamic_sidebar( 'blog-...
1
vote
1answer
508 views

Display a selected custom product option in WooCommerce cart

I am using the code below to display a custom select field on WooCommerce single product pages: <?php $sizes = $product->get_attribute( 'size' ); $sizes = explode(", ",$sizes); ?> <?php ...
-1
votes
1answer
159 views

How to remove product attribute row woocommerce using code

I am trying to remove an attribute row in a product attribute tab using code. Woocommerce uses javascript to hide attribute row then uses ajax to save changes. I need this row to be disappeared and ...
0
votes
0answers
13 views

Listing variable products as individual products?

Is it possible to list variable products as individual products? If this is not clear. Same question but different phrase:- Split variable product into single products while listing it. Kinda hard to ...
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 ...
0
votes
0answers
56 views

Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?

I'm currently using a plugin that generates a PDF for customers but the URL is way too long. For eg - https://www.mywebsite.com/wp-content/uploads/pdfuploads/666666.pdf. Here's the specific code from ...
0
votes
1answer
20 views

Set custom banner image size with wp_customize

I've set the banner image of my site to be customizable through appearance -> customize. I'd like to adjust the image size and crop aspect ratio of the customizer, as it's still set to a thumbnail ...
0
votes
0answers
14 views

Create slideshow from default gallery

I have a question. Is there any way, it does not matter if it' s code or plugin, to create slideshow from default Wordpress gallery. E.g. I am working on a website that has 5000+ articles. They' ve ...
0
votes
2answers
20 views

multible shortcodes (for differnt values) with one function

I am trying to create a function whicht has different shortcodes as output. I have the post-type => womos and the field => personenzahl. The field has the values 1 up to 7. Now I need a shortcode for ...
0
votes
0answers
39 views

REQUIRED: The theme uses the register_post_type() function, which is plugin-territory

I am developing a car rental theme, but I encountered a big problem, when I upload the theme I get the "REQUIRED: The theme uses the register_post_type() function, which is plugin-territory" the ...
0
votes
1answer
27 views

Exclude posts with specific metadata from search?

I have created this searchfunction that looks like this: function search_data_fetch() { $search_query = new WP_Query( array( 'posts_per_page' => -1, 's' => esc_attr( $_POST['keyword'] ), '...
0
votes
0answers
10 views

WooCommerce : Create email for custom status, appear in backoffice

I need to create an email which would be sent to customer when switching to a custom status. Does anyone know a good and updated tutorial to do this? Thank you :)
1
vote
1answer
21 views

trying to modify colormag-fr_FR.po

How can I modify a translation in colormag-fr_FR.po? In fact the translation of "breaking news" is "Récents" in french. I went in the above mentionned file and changed "Récent" for "A la Une". But ...
0
votes
1answer
60 views

Duplicated content with custom shortcode

Preamble In my functions.php file I added a custom shortcode. This shortcode takes a query as a parameter and queries the wordpress database. From there it takes the posts content and returns it. ...
0
votes
0answers
29 views

Visual Composer css styles only working on standard post page?

I'm trying to integrate Visual Composer with a WooCommerce Multivendor site to enable vendors to design landing pages for themselves. Everything works fine until I'm trying to show a page created by ...
0
votes
0answers
22 views

Integrating e-commerce solution to my own developed theme

So I have developed my very own theme in WordPress for the first time. It was not really that hard until my customer wanted to add an e-commerce solution integrated on the site. The goal is to make a ...
0
votes
0answers
18 views

Why does a custom php code inside a custom template not get executed?

So in order to have some php code executed inside a page on wordpress there are 2 ways. One of them is to create a page template and when creating the new page in wordpress set the Page Attribute to ...
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 ...
0
votes
1answer
28 views

Where do I go to edit this area? [closed]

I need to edit the area shown in my photo. I am using a child theme. I am unable to ask the question to the theme's website as I don't have a proper subscription. I have tried looking at both the ...
0
votes
3answers
110 views

Featured Image not changing

Here is what the situation with my featured image. When I try to change the featured on my site. It doesn't change at all. Here is how I currently try to change the featured image on my page: I ...
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 ...
0
votes
1answer
85 views

Different Domains in Multisite Setup

I am using WordPress multisite setup to set the following structure example.com sub1.examples.com example.net Note that this is a single multisite setup, but it has two main domains and a subdomain. ...
0
votes
0answers
28 views

Create Schema in WordPress with PHP

I have a website that gets fed data from a local MLS. I put together PHP to grab the title of the page which contains the address & MLS # of the current property, and create schema for it. I ...
0
votes
0answers
39 views

If customizer drop down equals, hide option?

I have an option that is a dropdown menu which let's me select between 3 different themes. And I want to hide another options if theme-1 is selected. This is the Customizer controls: $wp_customize-...
2
votes
0answers
103 views

When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?

I am trying to extend the core/image block to add an option for a deferred image. I want to replace the src attribute of the image with an empty string and add the url as a data attribute to be loaded ...
0
votes
1answer
162 views

a weird attribute on every html tag

me and my friend working on a Wordpress site but we see it differently on our machines, He sees a weird attribute wfd-id="" on every html tag in google console when he inspect it, also I loaded ...
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) { ?> <...
0
votes
0answers
27 views

How to have differents sites share the same tables of DB?

I want to have multiple versions of my site that share the same database. I'm wondering if this is as simple as just cloning the site and then in the wp-config having them all use the same database? ...
-1
votes
3answers
49 views

Deleling wordpress posts permanently still have IDs

Example: Right now I have 100 posts. If I add a new post it will have ID 101. If I delete all the current 100 posts the new post will still have ID 101 when it should have 1 or 0. How can I delete ...
0
votes
1answer
32 views

I am trying to make a field show and save from quickedit screen

I have a select box with some options. It appears in the normal product edit screen with the following code. function we_skroutzxml_custom_availability() { woocommerce_wp_select( array( ...
0
votes
0answers
51 views

WP - WooCommerce - Widget Logic

I am trying out the plugin Widget Logic. This is what I want to do: I have a filter that I want to show only on specific categories in the shop. I can use: is_product_category( array( 'cat1', 'cat2' )...
0
votes
0answers
19 views

How to add particular attribute of product in shop as well as home page

How to add particular attribute of product in shop as well as in homepage
1
vote
1answer
42 views

Can I develop a WordPress site without a domain?

I currently have a wix.com website and want to make the switch to WordPress. I'm really confused about how I do this or whether I can? But in the meantime, I want to start building my site (as I am ...
0
votes
0answers
24 views

Can we execute a function when Gutenberg block is added?

I'm wondering if there is a way to execute a function when a certain block is added in the editor, but not each time we edit the block. As far as I know the only functions we can specify are edit and ...
0
votes
0answers
8 views

Is there a way to execute a function whenever Gutenberg Blocks are rearranged?

i'm having the following problem: I have created a grid component which uses a binary packing script (packery by metafizzy) to fit its child blocks depending on their size. To improve the editing ...
0
votes
1answer
23 views

How to add convenient buttons for new custom post statuses

I add new post status via this code in functions: function custom_post_status() { register_post_status( 'spam', array( 'label' => _x( 'Spam', 'post' ), 'public' => false, ...
0
votes
1answer
72 views

Hide or remove custom post status

I want to hide or remove a custom post status when it is set to a specific one. e.g. If I have a post set to status "pendingreviewf" I want to hide the option to change it to the status "shipedf" ...
0
votes
0answers
74 views

Disallowed Tag Present in AMP Wordpress (<comments></comments>)

We have a Wordpress blogging website with AMP (Accelerated Mobile Pages) Enabled into it. We are getting this error on Webmaster that the site (AMP Version) is not crawlable. It states that there is ...
0
votes
0answers
11 views

wordpress listing services with multi-service select search box

I am looking at various service listing themes for ex: https://preview.themeforest.net/item/citybook-directory-listing-wordpress-theme/full_screen_preview/21694727?_ga=2.103365952.1757685277....
0
votes
1answer
39 views

How replace theme styles?

I have some theme. I am running shortcode for my plugin in some page like this: [my_plugin_code atr="1"] But all styles is import from CSS theme. I want my custom CSS. How to do it without ...
0
votes
1answer
16 views

Template for displaying CPT / Taxonomy URL issues

I would like to create a template to display custom post's terms. First menu level page : (Drink - About / LOGO / Questions - Contact ) Section 1 (Drink Page) : (col-6) -> Image / (col-6) -> Page ...