All Questions

Filter by
Sorted by
Tagged with
0
votes
3answers
935 views

How to get full absolute url for post attachment?

I'm trying to manually fill the Open Graph tags and I'm having some troubles in setting the content for the og:image tag. In a single post page, I set it this way: <?php $thumbnailSrc = ...
0
votes
0answers
5 views

Collect customer billing info on product page

I'm looking for a way to add the following billing fields as product options in WooCommerce to pass along to the checkout page. billing_email billing_first_name billing_last_name billing_phone ...
0
votes
1answer
6 views

which plugin is this?

i want to know which plugin is this or similar types of plugin https://www.variyoshop.com/product/free-fire-diamond-direct-from-player-id-top-up/
3
votes
3answers
35k views

Forbidden 403 error, permission to access, unable to read htaccess

Recently clean-installed (with exception of themes and content/upload folders) an old wordpress to the latest Wordpress 4.2.2. I continue to get this error below whenever I load files such as style....
0
votes
1answer
7 views

WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?

WooCommerce has a special "account page" that customers get re-directed to instead of the WordPress admin backend. I'm trying to create a custom role that does NOT go to that page. When I clone "...
0
votes
0answers
16 views

Updatable theme developing

I made a wordpress theme and I want to sell it and support the theme for a time so I need update the theme.However I dont know how to do it? Also I wonder if I make new version as full theme, Will ...
2
votes
1answer
11 views

How does WordPress redirect without using .htaccess?

As explained here, WordPress has Automatic URL Redirects. However, it's not based on .htaccess which WordPress keeps to a minimum. Let's say your "siteurl" setting (in the GUI) contains "www.". If a ...
0
votes
3answers
1k views

Performance bug - slow DB query

Since 2017-09-26 I have terrible problems with performance on my website. Loading single post or any other page takes even 20s. I've been debugging it it found out, that the problems are DB queries. ...
0
votes
0answers
13 views

Close video stick - Single Post

I'm trying to fix this problem that I have with this sticky video but I can't seem to find a solution. I have video's on my page. I want the sticky video to leave the view after clicking the X. The ...
0
votes
0answers
8 views

Extending a Plugin, Having Some Trouble with an Array & Foreach

At the core, I feel like I'm missing something very simple. I have a variable set using another plugin's function. This variable needs to set data inside of an array, like so: $...
0
votes
1answer
712 views

Is it possible to add custom business logic to a Custom Post Admin Edit Page?

I have a custom post type that has a few fields that accept amounts. Each amount is editable. I would like to display the total of these amounts in another non-editable field on the same Custom Post ...
0
votes
1answer
24 views

Menu links URL with PHP GET method

Hello the community, I would like to know if is it possible to generate menu links using the PHP Get Method instead of the regural one used in Wordpress? e.g : www.mybeautifulwebsite.com/category/...
6
votes
2answers
5k views

How to remove /blog/ prefix for custom post types in permalinks?

I have a client that used to have a static website and a blog powered from WordPress under the /blog subdirectory. Now he decided to move everything into WordPress so that he can also create and edit ...
0
votes
1answer
550 views

woocommerce email template detect email recipient

in woocommerce email template is it possible to detect email recipient example if email recipient is admin or email email@domain.com or if recipient is customer tried if is_admin if is shop ...
0
votes
0answers
13 views

Is there a built-in function to generate multiple paragraph tags based on a string with new line separators?

Consider the following code <?php // The new line separated string $section_string = <<<EOL Sentence A1. Sentence A2. Sentence A3. Sentence B1. Sentence B2. Sentence B3. Sentence C1. ...
0
votes
1answer
13 views

Can we use a library under MIT license in a WooCommerce plugin?

I am in the process of developing a WooCommerce Plugin, and I plan to make two Free and premium versions. I want to join The Bootsrap library which is under the MIT lisence. In the WordPress officle ...
0
votes
3answers
28 views

Enqueue custom css file on specific page

So I've been messing with this for a while now and I don't understand how I'm unable to pull in my style file properly by registering and calling it at all. Here is my method: public static function ...
0
votes
2answers
782 views

Set Default Category to Username

I installed a plugin called "Symbiosis" which creates categories automatically copying a user's username upon them signing up. Whenever any user creates a post on the site, I am trying to figure out ...
10
votes
2answers
16k views

Wordpress Permalinks not working in Apache2 Ubuntu 14.04

In my local machine, wordpress permalinks not working. After research I found that wordpress not creating .htaccess file. For this I followed below steps. Manually create a ".htaccess" file and ...
0
votes
0answers
10 views

Selecting An image from Media LIbrary in a custom page

I'm using Wordpress to create a research tool where archival documents are transcribed into a relational database. Part of this is a transcription interface, a custom page. What I'm trying to do (...
1
vote
0answers
16 views

Unset actions for terms parent only

I'm trying to unseting actions for Parent terms only but unsetting the action "view" doesn't work. Terms is always clickable. Here is what i'm trying to do : add_filter( 'tag_row_actions', '...
0
votes
1answer
888 views

Remove Captions from Custom Gallery function.php

I like to prevent captions from being outputted in my custom gallery function. I could easily just hide it using CSS but it doesn't feel right. The caption is being sent from media.php this line. ...
-1
votes
0answers
11 views

How to display error on attribute buttons if not selected as a red outline on them?

I am working on a woo-commerce theme. On the product page when user doesn't select any attribute and tries to add product to the cart, it shows error on the alert box like this I want to make red ...
1
vote
1answer
24 views

Gutenberg – How to prevent block from being deleted and reordered/moved

I have a post type which is prepopulated with a Gutenberg block: function blog_block_template() { $post_type_event = get_post_type_object( 'event' ); $post_type_event->template = array( ...
1
vote
1answer
666 views

Redirecting deleted posts url to another WordPress install

On a WordPress site http://www.example.com/ (MAIN SITE) there are 540000+ posts. I want to reduce number of posts to enhance site speed. I've installed new WordPress at http://www.example.com/...
0
votes
0answers
13 views

Admin search for custom post type shows results for everything but my post type

I've added a custom post type with this: <?php if ( ! function_exists('ordinances') ) { function ordinances() { $args = array( 'label' => __( 'Ordinance',...
0
votes
0answers
9 views

Cannot access wp-admin after migration to another place

I've been working in my blog. Yesterday I made all back-ups (files and DB), i´ve changed the wp-config.php with the new user, DB name and password and I publised everything at my actual URL. http://...
0
votes
2answers
38 views

List just subcategory and products of active category page in Woocommerce

Working on a category page - taxonomy-product_cat.php - I want to list all the subcategories of that category page, with all its products. I would think it is simple enough but I cant get it to work. ...
1
vote
1answer
380 views

How to pass external variables to the wp_new_user_notification_email filter?

We're trying to customize the default e-mail new users receive when registering on our website. For this, we are using the wp_new_user_notification_email filter added in WP4.9.0 For our functions.php ...
0
votes
1answer
2k views

How to execute a SQL-query which contains multiple queries using $wpdb->query?

I want to execute the following Query-String, which contains 2 separate queries using $wpdb->query: CREATE TABLE `foobar` ( `id` int(2) NOT NULL AUTO_INCREMENT, `foo` varchar(22) COLLATE ...
0
votes
0answers
15 views

How to force a page to use the theme options/template even though it is related to a plugin?

I have a Zakra theme which allow me to choose a compact view without sidebar on a page. It works fine unless the page is somehow linked to a plugin or wordpress (the blog page for example as it is set ...
0
votes
2answers
93 views

How to display comment meta under each comment content

I'm trying to display comment meta under each comment, but I couldn't find which action should I hook in.
0
votes
1answer
16 views

Issue with custom loop in Archive page

I customized my loop in archive.php to display 8 posts per page. However I have an issue passing the args: the loop displays all my posts from all my categories. Here is my PHP code for the loop: &...
0
votes
2answers
2k views

Menus not visible in Appearance after being registered

The menus have been registered in functions.php, but they don't appear within the Appearance > Menus section in Admin and the pages, posts etc options are greyed out. The menus are saved, as you can ...
0
votes
0answers
14 views

Update WooCommerce stock status with SQL query if stock value is greater than 0

I'm attempting to update a large product catalogue using a SQL query via phpMyAdmin if: the _stock_status = onbackorder the _stock > 0 Queries attempted: Update wp_postmeta Set meta_value = '...
4
votes
3answers
4k views

Sanitizing integer input for update_post_meta

When updating a post meta where the input will be always an integer, should I use (int) or is there a WordPress function for that (eg. sanitize_text_field)? For example: if(isset($_POST['category_id'...
0
votes
0answers
9 views

Theme Development | WC_Product_Query | WooCommerce | Help me create a working custom product query! [closed]

I am having difficulty creating my own custom WooCommerce product loop. Along the way I have encountered a few questions that would be really helpful if they could be answered. I am currently ...
0
votes
0answers
12 views

Adding Preloader & Loading Effect

I want to add preloader and loading effect to my website exactly like the one used in masoudrostami[dot]com... Is there any plugin for this or I have to use Javascript and Coding?
0
votes
0answers
8 views

Wordpress multisite share media across sites without a plugin?

I have googled this for couple times and went over all links, all I could find is plugin solution. I am using multsite for manual translation, however all images that are used are same. I want to ...
2
votes
1answer
831 views

execute function in wordpress plugin using crontab

So, I want to run a function on my plugin from crontab. For the example, I want to run it every day at 1:10am function my_cronjob_action () { //this function is in my plugin // code to ...
0
votes
2answers
921 views

How to lock Wordpress front-end with login and password?

I would like to lock whole WordPress site (all pages, all posts, whatever content I will add in the future) with login page same as for example it is made here (clear your cookies) http://facebook.com....
0
votes
0answers
7 views

Centralise convertkit forms? [closed]

I can't seem to centralise the convertkit form in my theme (Daze) however this doesn't work via CSS. Can anyone advise what to do here?
2
votes
1answer
152 views

Under which circumstances is the .maintenance file not deleted?

When WordPress does plugin/theme/core updates, it creates a .maintenance file which temporarily puts the site in maintenance mode. Sometimes this file does not get deleted and users are locked out of ...
0
votes
0answers
14 views

How to update a row in a table in Wordpress

I have a table of data rows. Now I want to click on the Update button then that row of data will be Updated based on the ID Here is my demo: These are my commands: <?php foreach ($...
0
votes
0answers
126 views

Issue with mysqli_set_charset

Every once in a while I get this error on my site. I currently have Debug mode enabled. I notice it more when I click on many links or make many updates to the website within a short time frame. Then ...
2
votes
2answers
5k views

How to redirect to a passworded page based on password entered on login screen

So I'm looking for something like peter's login redirect, but slightly different. I want to build a client portal for a photography website, and I figured the best way would be to add a custom post ...
0
votes
1answer
18 views

How to display SQL query that ran in WC_Order_Query?

Using WP_Query you can do: (new WP_Query($arguments))->request to get the raw SQL code that was executed. But how can you do this with WooCommerces WC_Order_Query or wc_get_orders?
0
votes
0answers
24 views
+50

Replicate value of one ACF field into another

I have a CPT that uses custom fields [created via ACF]. One of them is a repeater type. It works. Among subfields, I have an input field called party_time. In many cases party_time values has format ...
0
votes
1answer
13 views

How do we update a custom file upload field with the Advanced Custom Field plugin?

... $filename = mt_rand( 100,999 ) . '.pdf'; $post_id = wp_insert_post( $post_data ); if ( $post_id ) { $pdf_field = get_field_object( $fields['pdf'], $post_id, false, true ); $fields = ...
0
votes
2answers
18 views

When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?

the_author() filter hook can be used to modify the output of the_author(). When using the hook, is it possible to know which PHP file generates which call to the_author()? For example, say I have ...

15 30 50 per page