Questions tagged [code]

The tag has no usage guidance.

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

How to make an image appear then another takes its place and so on?

i would like to reproduce the same effect than this website's homepage has (https://studioswine.com/), which consists of an image appearing randomly in the space for a very short time, then disappears ...
meeyyer's user avatar
0 votes
0 answers
10 views

Add custom css to specific user

I need help with something for my wordpress site. I want to add custom css to a specific user. For example, user B. but I couldn't do it. Here I tried the following css code: div [user="id"] ...
ByWorld's user avatar
0 votes
1 answer
19 views

Restrict page to members only does not work for page ID, slug or page title

I was wondering why (and how to) restricting pages by the following criteria does not work. I wanted to restrict the contact page due to spam. The code is being added and activated on front-end using ...
Johnny Bravo's user avatar
0 votes
1 answer
12 views

Randomly display activity posts on home page with buddypress

I have a buddypress with a theme (youzify), I want to display activity posts randomly on home page, not in chronological order. Anyone knows any code or method for that? I used this code but it doesn'...
wmasat's user avatar
  • 1
0 votes
0 answers
22 views

I need help with removing words or changing bulk slugs

Heres the best example. urls are in a domain.com/locations they say domain.com/locations/used-honda-cbr-goldwing-in-sarasota-fl I need them to say: domain.com/locations/used-honda-cbr-in-sarasota-fl ...
William's user avatar
0 votes
1 answer
25 views

Developing an IP lookup function using an API

I'd like to implement the ability to incorporate an API into my Wordpress blog that allows people to perform an IP lookup within my blog. So far all of my attempts have failed when incorporating the ...
skarz's user avatar
  • 111
0 votes
0 answers
146 views

Convert Image to Webp on upload without plugin

I try way to convert image on upload automatically. I try a lot of plugins but all of that work over .htaccess and make duplicate image in upload folder example. imagename.png.webp I want convert ...
kuribo's user avatar
  • 1
0 votes
0 answers
20 views

I have custom html mixed with inline javascript that I want added to my WordPress site, how do I achieve this?

I have the following HTML/JS code: <div style="position:relative; transition: all 0.3s cubic-bezier(0.65,0.05,0.36,1); height: 0px;"> <iframe width="100%" ...
David's user avatar
  • 1
0 votes
0 answers
75 views

How to update the input[type=number] quantity field using custom buttons?

I have written this code which works perfectly fine in CodePen, to update the value of an input[type='number'] field on my single product listing page. The reason for doing so is to have completely ...
Yenmangu's user avatar
0 votes
0 answers
12 views

May I know where to edit the tax rate?

I'm newbie in Wordpress. Our company website using the shopper as theme. But where can I find this part and change it?
user230346's user avatar
0 votes
0 answers
26 views

How to add links to different language versions of WordPress

How to create link for current page but in different subdomain (translation) in WP? For example on https://domain.com/test_page link to https://uk.domain.com/test_page/ and https://pl.domain.com/...
Marcin's user avatar
  • 1
0 votes
1 answer
30 views

Only Admin receives email

is there a suitable code for blocking all registered users' outgoing email but only the admin receives all emails. I need a send all emails to admin only situation.
ALEXANDER's user avatar
0 votes
1 answer
453 views

src="https://dns.firstblackphase.com/scripts/start.js" [closed]

always this message appeared in my WordPress site https://prnt.sc/MPFNisaNmFQq https://prnt.sc/ADcQ8a5VbzKi https://prnt.sc/qN65SdKELtmS https://prnt.sc/DfB7XLarovbo could you please help me to fix ...
Gome Rome's user avatar
0 votes
0 answers
5 views

I want create woocommerec match products columns

I have created three columns. In two columns I want to add woocommerce products (e.g bottoms in one and tops in another) and for third column I want it to be populated from products present in tops ...
Maxx's user avatar
  • 1
1 vote
0 answers
38 views

What's wrong in the WordPress Meta Box Generator code?

I am very new to WordPress development. When I submitted my plugin for review, it was rejected because ## Generic function/class/define/namespace names. I don't understand how to fix it. The review ...
Sumanta Dhank's user avatar
0 votes
0 answers
14 views

How to give specific class name to category in wordpress with code snippets

This is my first question here, all I want is a code snippet where I can give a proper class name to my category for example category name: movie result: category_movie with code snippets
Clone 2's user avatar
0 votes
0 answers
35 views

Dynamically added text at bottom of article - non searchable by PHP code

I need to move certain articles on my website, all of them, to another unique category. I am using specific phrase which is at bottom of every article, but after code execution, only two articles are ...
ZeusDev's user avatar
1 vote
1 answer
146 views

Text before price on WooCom

I want to add text before the price on the WooCommerce product catalogue only, which I have working using this code in functions.php: // Add text before price function bd_rrp_price_html( $price, $...
jpopuk's user avatar
  • 13
0 votes
1 answer
56 views

Website Developer has gone missing! How to gain full access of your code from a Wordpress website?

I have hired a website developer to create a Wordpress website for me. The website is nearly finished, but the website developer has gone missing! I have admin access to the Wordpress dashboard. How ...
Ba T's user avatar
  • 3
0 votes
0 answers
44 views

How do I upload my Wordpress code files from previous website onto local host Wordpress website?

I have Wordpress code files from an old website which I downloaded from WP File Manager that I want to look at on my local host. I have downloaded Xampp and set up a local host Wordpress website. How ...
H D's user avatar
  • 1
0 votes
0 answers
52 views

Attachement title in wpallimport

When importing the attachments (documents) using wpallimport plugin, it uses the filename as the title, but I want specific that it use "custom" title which is defined. This is piece of code ...
Abrala's user avatar
  • 1
0 votes
1 answer
27 views

WordPress Started Executing Code Inside PRE Tags Even They Are Properly Escaped

Note: I am using https://wordpress.org/plugins/classic-editor/ with latest updated WordPress. I have a Blog at https://www.exeideas.com/ and I share code snippet here also that was working before ...
Muhammad Hassan's user avatar
0 votes
1 answer
93 views

Remove_role not working, gives "Call to undefined method stdClass::remove_role()"

I'm making a special child theme template I'm going to use to match custom roles to a user's subscription. So, this is going to be for admin-only maintenance use. I made a function where I pass the ...
Galloway Grumblefield's user avatar
0 votes
1 answer
32 views

Code block treats characters not being escaped

I want to add some 'c' and 'assembly' code in my post but the characters end up not being escaped, see the pictures below please: A C code that I put into the editor: #include <cstdio> Results ...
DEKKER's user avatar
  • 101
0 votes
0 answers
369 views

Allow login only for one account from one device

Hi All i hope all you are ok . i am working on a membership website , and i want to prevent user from shared there paid account to other people , meaning that the registered account attached to ip so ...
Khaled Abu Athera's user avatar
0 votes
1 answer
24 views

Can I do in-page changes binding events/triggers to actions in WordPress?

I've been coder for decades but I need to setup some microsites super-fast. I chose WordPress as the platform and I'm complete newbie to WordPress. The behaviour I need I know can do it programming. ...
Xavi Montero's user avatar
0 votes
0 answers
25 views

Display a specific category in a focused area of my site

I've been trying to change the code of my WordPress site. Rather than showing "trending posts" which is determined by post_views_count, I simply want to show posts from a certain category. ...
SS1986's user avatar
  • 1
0 votes
1 answer
30 views

code block does not show in excerpt

I am creating some blog pages with example codes, and I would like to show the codes in excerpts, but WordPress automatically excludes code blocks from excerpts, is there a workaround for showing code ...
Botond Vajna's user avatar
0 votes
1 answer
282 views

Why does HTML entities are still encoded in Code Block?

In the Code Block if I type in reversed character, they are encoded to HTML entities: Input: Output: <pre class="wp-block-code"><code>'&#91;] </code></pre> ...
Ooker's user avatar
  • 330
0 votes
0 answers
78 views

Save Meta when custom Taxonomy Saves

I am in need of some advice, we are setting up a custom tag for Movies. We want to have it pull from the OMDB Api when it is saved. We have the function setup, but it is not firing, and I am stumped. ...
Bfrye26's user avatar
0 votes
1 answer
16 views

How i can remove Working Functionality of my header & footer plugin from backend files but in front end plugin need to show that plugin activate

I have a question actually I have a website in which one of my friends is using too many scripts in the header & footer using header & footer plugin in WordPress so I just want to stop the ...
Jhon's user avatar
  • 1
1 vote
0 answers
122 views

How to save checkbox values for logged in users?

Hello~ How can I have checkboxes save their values for a logged in user? My Wordpress website features various checklists in a table format. When a user finishes a task on the list, they would be able ...
Ayumi Love's user avatar
0 votes
1 answer
28 views

Woocommerce template file outputting <strong><code> tags

I'm struggling with the editing of the woocommerce template files. In particular, I'm trying to create a custom cart page and, as guidelines, I've copied the cart.php template file to my template ...
Michele Grisafi's user avatar
0 votes
1 answer
142 views

Reorder a page of posts of a certain taxonomy/value by a custom field

I want to re-order a page of posts of a certain taxonomy/value by an added Advanced Custom Fields PRO field, instead of the default (ordered by post-date). We have a WP site with a custom taxonomy, ...
Ralpharama's user avatar
0 votes
1 answer
46 views

remove edit link only for published post and pending post

Currently i m using this shorocdes add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 ); function remove_row_actions( $actions ) { if( get_post_type() === 'post' ) unset( $actions['edit']...
techno tech's user avatar
0 votes
1 answer
63 views

Copying and pasting to Wordpress "code editor" code via the front end and clipboard

I'm trying to emulate what these folks do with their "Copy code" button: https://gutenberghub.com/templates/team-56 Their approach is great for copying to clipboard and pasting directly to ...
user210686's user avatar
0 votes
1 answer
571 views

How to create a checkbox to show/hide a field in WooCommerce checkout [closed]

I want to put a checkbox before all fields where I want to ask people if they have vat number and when they check that checkbox I want to display vat_number field, also when isn't checked I want to ...
Răuțu Denis's user avatar
1 vote
1 answer
663 views

Wordpress wp_insert_post() returns 0 but not not wp_error

wp_insert_post() return value says: (int|WP_Error) The post ID on success. The value 0 or WP_Error on failure. Okay, I' have an import routine running and all but a few (about 20) of them import ...
user3161924's user avatar
0 votes
1 answer
79 views

how to display google maps with javascript

I want to display one google custom map with javascript, I set this code in a code module, but when I post it only appear the code and not the map, how can I display my map correctly? The code works ...
mourazo's user avatar
  • 101
0 votes
1 answer
47 views

How to make my homepage automatically redirect to an external website?

Actually, I have a website hosted by my University. They claim that it is my personal website or whatsoever, but they do not give me full control of it! I cannot install plugins, change the theme, or ...
Iago Carvalho's user avatar
0 votes
0 answers
332 views

How to preload header logo image in WordPress? like what's the code and where do I put it?

I want to preload image in header i.e. Logo, so what is the code for that and where do I put that logo? Thanks!
Kunjal Chawhan's user avatar
0 votes
1 answer
58 views

restrain filter on get_the_excerpt to queried item in stead of current post

So, I have a walker nav menu who add the page excerpt to all page links in the nav menu. Now, I want to build a custom post excerpt for the blog archive. All works fine when the nav menu doesn't meet ...
quasi's user avatar
  • 101
0 votes
1 answer
122 views

How can I create a shortcode to show the number of posts of actual day?

I want to create a shortcode to display the posts posted on actual day. I found this code: show number of posts posted today And I'm trying with it, but return 0 function ts_day_f() { // we get the ...
Velask's user avatar
  • 11
0 votes
1 answer
145 views

Make order notes field at woocommerce checkout only viewable on front end by Admin level user role [closed]

I have a snippet of code that allows me to hide the order notes field at checkout for all users (logged in or not) but wanted to ask if someone has written a snippet that hides the same field from ...
Joey Payne's user avatar
0 votes
1 answer
143 views

CSS properties in textarea in the Customizer

I am trying to create a custom field (text/CSS code in textarea) that include the CSS suggestion like Additional CSS in the customizer: https://i.postimg.cc/9QhLPgVk/image.png. Does everybody has ...
Gabriel's user avatar
0 votes
0 answers
150 views

Problem with MEMCACHE and Redis with wp_options

I have developed a plugin for worpress but it is giving me problems when I start MEMCACHE o REDIS CACHE. I have been told that the problem is that I am using wp_options directly and that I should ...
Miguel Ruiz Bas's user avatar
0 votes
1 answer
30 views

Code snippet to show current php version inside "At a Glance" box in admin

Could somebody provide a code snippet which would show current php version inside the "At a glance" box win Wordpress admin? There are plugins but I'd like to do it with a code.
Ville Ekman's user avatar
0 votes
1 answer
36 views

How to pass https://achecker.ca/ validator? [closed]

i have to pass https://achecker.ca/ validator for a client without any "known problems" an i recieved this message Success Criteria 1.4.4 Resize text (AA) Check 117: i (italic) element used. ...
papatom77's user avatar
0 votes
2 answers
60 views

wordpress prepare error

this is my code: $terms = wp_get_post_terms( $listing_id,'job_listing_category' ); if(!empty($terms)){ $sql_terms.=" AND ("; foreach($terms as $term){ ...
Andreea Onica's user avatar
0 votes
0 answers
58 views

WP search box on page not finding .PDF files

Current marketing person left the business and I'm filling the role for now. Receiving code from search page which formally was able to locate .PDF files by typing in and searching by key word(s.) The ...
RETRVER's user avatar

1
2 3 4 5
7