All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
8 views

How to pass conditional array to wp_localize_script

I'm trying to generate a custom array from a PHP function to pass on wp_localize_script but I seem to not be able to set page conditionals. I have the following function: function ...
1
vote
1answer
8 views

How to use offset in WP_Query

Where do I put the offset function? <?php $args = array( 'post_type' => 'post', 'category_name' => 'category', 'orderby' =&...
1
vote
0answers
7 views

There any way to get de percentage of number of post by user and category?

This is the thing, Id like to get the % of number of posts from a specific user and category, additionally choosing from 'n' last days, or get for 'n' posts. Example: A: User 2 have a 10% of total ...
1
vote
0answers
13 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
7 views

WordPress menu link not working

My website menu link clickable, but its not loading. please give me an idea to fix it. This is my website link https://newbiz.design/ristoranti/ something blocking to to load this link, but ...
1
vote
0answers
14 views

Cannot get $post object in name_save_pre hook

class BaiDu_Translate { function __construct() { add_filter( 'name_save_pre', array( $this, 'name_save_pre' ) ); } public function name_save_pre($name) { global $...
1
vote
0answers
9 views

Possible to add different google analytics in custom post type?

I am creating custom dashboards for customer, and every dashboard is a custom post type, I would like to integrate google analytics information specific to each customer...ideas on how I can do it?
0
votes
0answers
5 views

wordpress multisite menu options missing

i have a fresh wordpress install and im trying to setup subdirectory multisite. ive followed a dozen tutorials on how to set it up and wordpress installs fine, no problems there, but when i try and ...
1
vote
1answer
9 views

Blocking access to wp-login via htaccess not working

Some time ago I installed the Limit Login Attempts Reloaded plugin and it's working fine. However because I was getting SO many unauthorized login attempts I also implemented an .htaccess password ...
1
vote
1answer
9 views

Change the site tagline (or similar) based on current page

I have a client with 4 very specific areas of service and they want so show the service name under the site logo but only the pages related to that service. E.G. the Real Estate page and ALL of its ...
0
votes
0answers
11 views

WP-CLI regex - search-replace match specific tags and any characters in between

I am using WP-CLI regex to replace specific tags and the content within the tags. Note that the content between the tags is dynamic so can change. I want to replace everything between [vc_row ...
0
votes
0answers
8 views

How to display all stock statuses including back orders?

I would like to be able to show all stock statuses. I found a free plugin that does this feature, however it's not fully customizable. My theme has a section that pulls my WooCommerce products via ...
0
votes
0answers
8 views

Materialize.css - override provided style

I have an icon on my wordpress page which uses materialize css, more specifically, it uses the font-size class Tiny for mobile devices, which is tiny: 1rem. <div class="row"> <div class="...
0
votes
1answer
15 views

Use esc_attr() to print month name in French

I am working on a PHP code in which I want to display month name in French. <?php if (false !== strpos($translated_tz['diff'], '-')) { $ts = date_sub($altered_timestamp, ...
0
votes
0answers
15 views

Free Quotation plugin, CSS modification

I would like to have a widget in my footer that displays a quotation from the day/week/... from my own quote database. For each quote there would be a display date assigned. A good solution would seem ...
1
vote
0answers
19 views

Applying A Category to Existing Posts Where Page Title Matches Regex

I have a whole bunch of posts that I need to add a category to (too many to do via Bulk Actions). They all follow a predictable/consistent post title naming structure that could be matched via regex. ...
1
vote
0answers
8 views

Dynamically loaded Theme components based on Customizer Settings values : changes not appearing in Customizer preview

I'm trying to create a WP theme (for personal learning purposes, still pretty new to wp) where Header/Container/Footer are each chosen based on a dedicated customizer setting (still plain text, ...
0
votes
0answers
6 views

Best way to paginate? [on hold]

There are a hundred ways to do proper pagination ... what's your favorite and most performant?
0
votes
0answers
10 views

Customized Blog/Latest Posts Page

This question is sparked by some issues I'm running into using Elementor, but it's not an Elementor-only question. I'm trying to create a customized static blog page/latest posts page. I currently ...
0
votes
0answers
15 views

Change user_nickname for author page link

I have a page where user can change their personal info. Now I want to give them a possibility to change their personal page link by changing theire user nickname. So I want to create simple form with ...
-2
votes
0answers
17 views

Why my website loads slow although it has good pagespeed score?

Here is my website link . I have a pagespeed score of 97(desktop) and 86(mobile) but I just can't understand why the page rendering is slow on my website as shown below : As you can see nothing is ...
0
votes
1answer
9 views

How to make a redirection that fired a script before redirecting?

To objection is simple: I want to redirec a page in my site to an external site, but before redirecting the Google Analytics script should be fired, so that I get the report. The Redirection plugin ...
1
vote
1answer
16 views

Why is the post meta[] empty when I make a call to the wordpress rest api?

I am getting posts with a certain term by using /wp-json/wp/v2/my_post_type?my_categorie=43 but upon inspecting the JSON object I noticed that the meta is empty? I am using Advanced Custom Fields and ...
0
votes
0answers
15 views

Simple/light text slider, main CSS inheritance

It would seem to be easy, but I'm not doing well. I need a simple/light text slider. There are four widgets in the footer of the page and one of them is supposed to be a text slider (only text). I ...
0
votes
0answers
10 views

Basic wpdb update question

I can't get this to work and I don't really know how to debug it. In the URL I'm getting this added: ?candidat=41&selectCandidate=selectCandidate global $wpdb; if(isset($_POST['...
0
votes
0answers
13 views

Is there a better way to resize and compress/optimize images without using a plugin?

Images resized through Wordpress' add_image_size function seem to be notoriously blurry and too heavy (file-size-wise): When I compare the outcome of manual resizing of a JPG image with OS X's Preview ...
1
vote
0answers
11 views

Change Search url slug for each site in a multisite network

As per the title, how would you change the search url for different sites in a multisite network. eg: testsite.co.uk/search testsite.de/suchen testsite.fr/recherche I can change the search term for ...
0
votes
0answers
10 views

Problems with sending email

I am having a problem with sending emails from my website. The fact is that yesterday was working but apparently not today. I use the POST SMTP plugin. When you launch a new email the result is "...
0
votes
0answers
5 views

Create an sold-out archive with WooCommerce [on hold]

I have a site where my client sells paintings (individual). We mark them sold out upon sale, but I would like users to still be able to see the sold paintings -- not on the main /shop page, but on a ...
0
votes
0answers
15 views

Trying to add an action to a custom post type

I have a custom post-type that I need to add a two state style button (Complete or Completed) The custom post type is a video so I want the client to be able to complete a workout. I am not super ...
0
votes
1answer
7 views

If ACF Post Object post has custom taxonomy term…

I’m trying to conditionally display a div if a post object post has a specific custom taxonomy term. The custom taxonomy is called ‘room_vacancy’ and the term is called ‘booked’ I’m using the ...
0
votes
0answers
5 views

Using the admin media modal (wp.media) in custom meta box to grab external photos

I am looking to plug into the admin media modal for a custom meta box that I have created for my site. However, instead of having the admin media modal box display images from my local wordpress ...
0
votes
0answers
4 views

Why click event is fired first time only? [migrated]

I have a Bootstrap 4 input group with a dropdown button. I need to change the href attribute value of links in dropdown depending on value inserted in the input text field. I'd to change the href(s) ...
0
votes
0answers
10 views

Having multi content on Wordpress depend on user choice [on hold]

I want to work with Woocommerce with sitting a city for each vendor, the customer when open the website will show all products from all vendors But I need to give the customer option to choice his ...
0
votes
0answers
10 views

Wordpress url customization

I want my url structure to looks like- mydomain.com/%articles%/%postname%-%post_ID.html anybody help me? In first image you can see how my permalink structure looks like, after domain name there is ...
0
votes
0answers
16 views

WordPress URL redirect and replace ? question mark

Following is example of what we are looking for. We're trying this in wordpress and we require all parameters as a variable Example 1 : http://example.com/tno/?parent=abc Need this : http://example....
0
votes
0answers
15 views

How can i edit all posts slug in bulk keeping WP native redirect?

When i edit a single post slug the old url redirects to the new one automatically. I need to do this in bulk. There is a text that appears on thousands of permalinks and i want to remove it from ...
0
votes
1answer
13 views

Warning in WordPress for Declaration of SplitMenuWalker::walk($elements, $max_depth) [duplicate]

I started receiving the following error on a WordPress site: Warning: Declaration of SplitMenuWalker::walk($elements, $max_depth) should be compatible with Walker::walk($elements, $max_depth, ...$...
0
votes
1answer
22 views

Redirect per shortcode if user is logged in

I want to put the wordpress login screen on my homepage. If a user is not logged in I want them to have to enter their username and password into the box (or sign up).. and if they are logged in, I ...
0
votes
0answers
13 views

Two content editors (gutenberg blocks) on the same page

Can I have an extra content-editor for blocks on the same post/page? I need to have two sections of blocks to realize the design I'm working with.
0
votes
0answers
10 views

How to get ordered fields from repeateble fields group added via Toolset wordpress plugin?

I got 2 fields in group ordered by toolset-post-sortorder meta_key: youtube_id: TeBW-WByzlw 144 163 youtube_id: CEdYPEKDD2E 255 270 This it how it look in DB: This is how I try to get fields: $...
0
votes
0answers
6 views

Custom Gutenberg block incorrectly rendering dynamic fields

I have three "sections" of my Gutenberg block, two of which are working fine (basic text input fields). The third, I'm assuming the issue is with rerendering edit/save states. Number of options ...
0
votes
0answers
10 views

Ordering simple elements within the CMS

I have a set of elements all using a piece of code as a template; $elements = array ('element1', 'element2', ... 'element n'); And then foreach ($elements as $element) { <div class="template"&...
0
votes
0answers
14 views

How do I cleanup my database with data that is no longer being used?

I am working with Advanced Custom Fields and I noticed that once I delete a field for a custom post type it will stay in the database. Is there a way that Wordpress can do a cleanup for everything ...
0
votes
0answers
25 views

Wordpress search not able to find the category

I have 3 to 4 categories on my website. I am using WordPress search but when I am searching my category then I am getting Nothing Found also, I tried to search the subcategory then also I am ...
0
votes
0answers
10 views

Slider plugin suggestion [on hold]

I am searching for who commerce(i know the spelling is incorrect) product slider plugin that displays detail of the product on hover.
0
votes
1answer
14 views

Copy files from main to child theme (after designing website)

Have a new website and want to install Google Tag Manager (GTM). The GTM code requires a (second) tag. According to this site (https://www.wpexplorer.com/google-tag-manager-wordpress/) you can copy ...
0
votes
0answers
34 views

Include a page's “category” in its URL

My site is for landing pages, not a blog - so it contains pages, not posts. I want URLs like this: https://www.example.com/shoes/nike-sport-super-red https://www.example.com/shoes/adidas-...
0
votes
0answers
15 views

Query not ordering items correctly due to non existent values

I am trying to pre_get_posts and set a custom orderby. From searching through other Stackoverflow, WordPress Development questions and answers I managed to build this so far. This works 99% correctly,...
1
vote
0answers
25 views

How to remove specific category from URL in Wordpress

My custom structure permalink is set as shown below and category base is set to . /%category%/%postname%/ My current URL structure is this: http://example.com/aaa/slug http://example.com/bbb/slug ...

15 30 50 per page