Questions tagged [wordpress]

This tag is for programming-specific questions about the WordPress content management system. Off-topic questions include those about theme development, WordPress administration, management best practices, server configuration, etc. These are best asked on the dedicated WordPress Development Stack Exchange site (https://wordpress.stackexchange.com).

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

How to remove name in WooCommerce customer emails

for some reason the emails being sent to customers after they create a WooCommerce account displays a random name (see attached). WooCommerce username error I think because users can create an account ...
0
votes
0answers
6 views

How do I get post thumbnail url from other subsite?

I wanted to get the post thumbnail from the main site while currently in subsite. Here's my code: switch_to_blog(1); // main site. $url = get_the_post_thumbnail_url( $post_id ); restore_current_blog();...
-1
votes
0answers
7 views

301 redirect for non exists pages using htaccess

How to redirect number of no-exist pages using 301 redirects in htaaccess, Options +SymLinksIfOwnerMatch RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} !-d &...
0
votes
0answers
11 views

Wordpress not showing 404 for wrong category names

I have set the permalinks for the posts to /%category%/%postname%/. But the issue is, for the URL where the post name is right but the category name is wrong, it still shows the post instead of ...
-1
votes
0answers
15 views

JavaScript kodum wordpress te çalışmıyor [closed]

I want to prepare a quiz on my wordpress site. I got a code. This code works everywhere but not in my wordpress post. Please can you help with this <form> <fieldset> <legend&...
0
votes
1answer
31 views

How to insert a shortcode to an existing html elements (wordpress)?

I need to insert a shortcode [ajaxdomainchecker] into an existing html code. I tried the following code but it shows error. Would you please let me know how to add the shortcode? I'm a newbie, any ...
0
votes
0answers
16 views

Styling Loop Marquee into Archives look

I am designing my marquee with cursor control in my custom theme wordpress. my goal is to style my marquee into archives looks. can anyone help me how I put style inside my marquee? I tried so many ...
2
votes
0answers
13 views

Keep background image animation going between pages

I have a background image that's hues rotate using a css animation. When clicking to a new page on my website that has the same background image it starts again from the first hue, is there a way that ...
1
vote
0answers
15 views

Python to wordpress

i've write this code for sending a cpt with metadata from python to wordpress, it`s one of 4 diffent scenario that i have prove, practicaly i need to send a post with some meta field from python to ...
0
votes
0answers
22 views

How to insert custom php into a specific html code (acf field / wordpress)?

I need to insert the following custom php code inside the existing HTML code (under the p tag). Would you please let me know how to add it? I'm a newbie, any comments would be a big help. PHP code: $...
0
votes
0answers
13 views

LaTeX code not working after processing the data from a PHP file

I have a WordPress website and it supports LaTeX code via the LaTeX plugin (Simple Mathjax). When I use code like $\vec{V}$ it responds very well in the WordPress editor and prints my LaTeX code. But ...
0
votes
0answers
12 views

How to add a shorcode in an acf field for frontend (wordpress)?

I need to implement a shortcode (domain checker) in a acf field. So that users can check a domain on frontend. I tried the following code but it shows a text [ajaxdomainchecker] in the textarea, ...
0
votes
1answer
19 views

Migrate Typo3 user with pbkdf2 hashed pw to Wordpress phpass hash method

Basically, I want to mirgrate a list of users with a pw that is hashed with pbkdf2-sha256 to a cms which uses phpass. In order to accomplish this I try to check the entered pw by the user and generate ...
0
votes
1answer
11 views

How do I sort custom taxonomy using an ACF number field?

I'm working on a site right now that requires a list of contacts broken up into departments. I've created a custom post type (team_members) with custom taxonomy (team_category), which contains ...
0
votes
0answers
5 views

How to display posts in blog page in 2 or 3 columns in Wordpress?

I am beginner in wordpress and I use the sparkling theme for my website. I want to display my posts in blog page in 2 or 3 columns, but I don't know how. Currently, my blogs are displayed in a full ...
0
votes
0answers
18 views

</div> shows up red with < operator not working

For some reason my .php file is showing the </div> tag in red. <div class="self-center tab__number p-12 xl:text-18 font-semibold "> @if( $tab_counter < 10 ){{0}}@endif{...
0
votes
0answers
5 views

Adding the “Design Options” tab to a custom shortcode in Wordpress/WPBakery

My goal I'm trying to create a custom shortcode for Wordpress and to integrate it with WPBakery. I need such shortcode to wrap any WPBakery element inside an <a> HTML element and to manage it ...
0
votes
0answers
8 views

How to get rid of random code on WordPress website

Our website has this random line of code at the top of our website. No matter which page you go to, it's always there. I'm not sure how to remove it/if I should. I believe it's from a plugin that a ...
0
votes
0answers
8 views

Adding the order currency to the order note woocommerce

I'm trying to write a function which adds the currency the customer paid for the online order to the customer's order notes in woocommerce. The function I've written looks like this: add_action( '...
-1
votes
0answers
9 views

Do not have the write permissions on files |directories after wordpress migration from hostgator to lightsail

After migrating all the files in the public_html folder which i get from Hostgator to AWS Lightsail (bitnami wordpress pre-installed), even I still can login into /wp-admin with the old user name and ...
0
votes
0answers
8 views

How to fix a specific 500 internal server error on multilingual site?

On several moments users get a 500 internal server error after switching a language. It seems that the .htaccess will be overwritten every time with a . /nl/index.php [L] directory. I contacted the ...
0
votes
0answers
9 views

WP_Query infinite loop when no meta_query applied

I'm trying to create a post filter in WordPress, using three buttons, one should show all posts, the other two should select posts based on a meta_query. However, when the 'all' button is clicked, ...
0
votes
0answers
17 views

How Can I get term/ category name wordpress

I am using WordPress plugin Taxonomy images. I'm using it to get images for taxonomies. From the below code I am getting the images and link. I want to get category name with these images. Here is my ...
0
votes
0answers
15 views

WooCommerce: Getting price and description of a single product

I'm creating custom buttons (rather than the default select dropdown) for my WooCommerce site. To do this, I've cloned the file for a single-product page into my theme. This file is called variable....
0
votes
1answer
32 views

Show products by retrieving a piece of url (with $php variable from JS variable)

I'm looking for how to show products from their brand category. My ULR is in the format www.mywebsite/brand1 or www.mywebsite/brand2 ... My JS script with the Regex allows me to get brand1 or brand2, ...
0
votes
0answers
12 views

How to clear/delete cache in NextJs?

I have a product page at /products/[slug].js and I use Incremental Static Generation for a wordpress/graphql site: export async function getStaticProps(context) { const {params: { slug }} = ...
0
votes
0answers
7 views

combine users table on wordpress

I have to combine two tables on users search in wordpress: I need to add to normal search results the results from another table. I have tested: function get_extra_users($query) { $query =...
1
vote
1answer
15 views

Wordpress Query Posts with Multiple Filters

I'm using AJAX to filter posts by category, which is working fine. But when I try to add another filter to filter by a custom field called album date my original category filter doesn't work. Each ...
0
votes
0answers
9 views

Wordpress load function on specific page

I'm trying to load some functions only on WooCommerce pages. I've done that if ( is_woocommerce() || is_cart() || is_checkout() || is_account_page() ) { require get_template_directory() . '...
0
votes
1answer
5 views

How to install plugin in wordpress after following error?

I am trying to install the wordpress plugin in my localhost wordpress. I am getting the following error whenever I try to install a new plugin. Installation failed: Could not create directory.
0
votes
1answer
15 views

Add single custom field and its static value to all Woocommerce product variations

I am trying to add a custom field and a static value to all of my variable products in Woocommerce. I have gone through other questions but they relate to creating whole new variations. I just need to ...
-1
votes
0answers
12 views

Why is PDO connection not working on Wordpress

I'm currently trying to move out of wordpress but before doing so, I must convert my API from $wpdb to PDO But it seems I can't run PDO in Wordpress since I get this {"outcome": false, "...
0
votes
1answer
19 views

Cant update table wp_options for wordpress in mariadb

Im trying to update wp_options table with a new url and the command just wont work. UPDATE TABLE wp_options SET option_value = "http://34.66.147.230" WHERE option_name = "siteurl"...
-1
votes
0answers
9 views

Applying “coming soon” page on wordpress site

I am having a problem in activating the coming soon page made with the Seedprod plugin, I ended up changing the wordpress site url from general settings and my website and the wordpress editor got ...
-1
votes
1answer
8 views

WP How to display a field with a list of all assigned posts of this category in the admin panel of a category?

Please tell me how to display a list of posts to which the same category is assigned in the WordPress admin part of a custom category? I used this code, but it's work wrong // Show posts for some ...
1
vote
0answers
12 views

List of checkboxes not saving in WordPress widget

I try to get the names of the pages in a loop. In the widget, the page titles are displayed correctly, but the values are not saved. How I can save the checked inputs? Below Full Widget Code: class ...
0
votes
1answer
8 views

GTM: Click tracking when class is in containing div instead of on clickable element (Elementor)

I am trying to add analytics to a site built in Wordpress with Elementor. Our web designer built a mega nav that uses pictures and buttons and our leadership team wants to track clicks on the nav. My ...
0
votes
0answers
7 views

Wordpress behind a Reverse Proxy: Trailing Slash and Search Engine Access

Looking for some help with using Wordpress behind a reverse proxy. Got two issues. The setup is like this. We host the Wordpress site at: www.myblog.com The Wordpress version is 5.6.4. The client ...
0
votes
0answers
15 views

Why does the default WordPress configuration file have comments like /**#@+ [duplicate]

Just looking at the WordPress sample config file and it includes a comment block starting with: /**#@+ With a similar comment after the code block: /**#@-*/ Full context: /**#@+ * Authentication ...
-3
votes
0answers
16 views

is_user_logged_in() not work in PHP Script

I had the next code, days ago worked perfeclly but 3 days ago not work, return "Else". <?php require('../wp-load.php'); if ( is_user_logged_in() ) { global $current_user; ...
0
votes
0answers
4 views

Styling disappears when creating child theme

I am creating a child theme for a website as it was never created before by the previous web designer. Whenever I create the child theme and activate it, some of the styling disappears or gets messed ...
1
vote
0answers
10 views

WPBakery replacing image URLs in shortcode

I have a wordpress site migrated to azure recently, I have transferred all the media to azure blob storage and changed URLs in the database. I am using WPBakery Page Builder plugin to build the site. ...
0
votes
0answers
12 views

Separate Wordpress backend and frontend using htaccess to deploy a JS framework

How can we separate Wordpress backend and frontend using .htaacess when we are using JS frameworks like ReactJS or Svelekit? Our website address is : https://www.example.com . Backend address is : ...
0
votes
1answer
25 views

Detect screen width to render appropriate images for breakpoints

So I know it's not possible to grab the screen width using PHP, but I wanted to see what would be the cleanest way that I can "Check breakpoints" and then pass in the appropriate call? So I ...
0
votes
1answer
12 views

Worpress file permisions and ownership after migration

I am using wordpress on mac and I did a migration to a new macbook, since then I have been having loads of problems with file permision and ownership. First I was having the: 'Upload folder is not ...
0
votes
0answers
14 views

How do I solve 404 prolem in wordpress using hostinger

I was trying to make my Url Seo friendly after I attach my page keyword to my Url in the premier link section, I came across this. I try to fix it by going back and removing the keyword that I attach ...
0
votes
0answers
15 views

How to configure apache main DocumentRoot correclty?

I am new with linux and VPS servers in general but I am now learning through building a website that runs in VPS server. Everything else goes smoothly but when I am trying to access my site from my ...
0
votes
0answers
7 views

How do I Install multiple WordPress instances? | Ubuntu Focal

I've installed WordPress, along with the LAMP stack, from the Ubuntu repositories using apt-get, however now I want to add a second site to my server. I know how to add a second WordPress site using ...
0
votes
0answers
11 views

How to display only members of a specific group?

Can someone please help me? I have this code: function jwa_get_top_dino_users( $post ){ global $wpdb; $post_id = $post->ID; $results = $wpdb->get_results( "SELECT * FROM " . ...
0
votes
1answer
11 views

Changing the input value after ajax response with jQuery not working well

On my WordPress web site I want to change the search input value after AJAX response. After the RESPONSE when I right click inspect element the value of input is changed, but in the browser the ...

1
2 3 4 5
3562