WordPress

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL for creating websites and blogs. Features include a plugin architecture, a template system and strong management, customization and search systems; through its dynamic presentation of content, webmasters have the flexibility to create websites easily.

Share tech news, updates, or what's on your mind.

Sign up to Post

I need to delete a block of text that is on 400 pages of my mysql db.  It is in wp_posts and the post_content section.

This is the block of code
<p><span class="heading">Product Label</span> - <span style="color: #909;"> Place your mouse cursor over the image to zoom in to read the label. </span></p> <p><img src="/Resources/labels/3538.jpg" alt="Product Label" /><br /><br /></p> 

Open in new window


This block is the same for all pages with the exception of the number specifying the .jpg

This is the sql I created but it isn't working even without the regex.

SELECT * FROM `wp_posts` WHERE (post_content LIKE '%<p><span class="heading">Product Label</span> - <span style="color: #909;"> Place your mouse cursor over the image to zoom in to read the label. </span></p> <p><img src="/Resources/labels/3538.jpg" alt="Product Label" /><br /><br /></p>%'); 

Open in new window


Please help me to create a query that will work for all numbered jpg's and just remove the block and replace it with nothing.

Thanks,
0
WordPress Version 4.9.8 - Text Editor. I do not see ANY buttons where I can switch from the visual editor to the text editor. I am in the footer area of the themes. Do not see it anywhere at all in the program itself.
0
Wordpress - a thin red line appears on the browser when one image moves to another. Is there a way to get rid of this?
0
I'm doing some SEO work on my own Wordpress website to improve my chances of it popping up in search results and recently posted a question here where I got some very useful tips and information.

Per the information I've been given, I'm currently looking at Categories vs Tags as suggested by an expert in my other question.

I suggest you change this in WP to use /tag/page or /category/page https://en.support.wordpress.com/posts/categories-vs-tags/ 

My problem is that I don't fully understand the help article that I've been pointed to.

Can anyone explain the differences between the two to me in layman's terms, as well as perhaps include a screenshot or two of what I'm supposed to be changing and where, in Wordpress?

My wordpress skills are fairly basic so please don't assume too much knowledge - what I'm after is specific directions as to what to change and in what areas of Wordpress I'm supposed to be making those changes.

Thanks in advance for any help.

Regards, Andrew
0
Hello,

We have 4 ESXi hosts with (2 socket x 4 cores per socket/256 GB RAM) for each, storage is running over a dedicated 1GbE network for iSCSI traffic to a Nimble Storage array.

I'm trying to convince my boss to virtualize our physical WordPress boxes running multiples of our client sites on CentOS 7. So we created 4 VM with 4 vCPU (4 socket/1 core) and 32GB of RAM per VM to fit in 1 NUMA node for optimal placement and performance. The underlying physical layers has 2 NUMA Nodes (4 cores and 128 GB of RAM per NUMA node). We did a load test and it failed miserably compared to the same load test to the physical boxes (2 boxes with 2 x 4cores and 64GB of ram w/ HT enabled in BIOS). During the load test on the VMs, it was pegging out the CPUs. The new VMs as well as the physical boxes are load balanced behind the F5. Could of questions:

1. If wordpress is a multi-threading application, how can I expose the HT to the VM, even thought I've set the numa.setcpu.preferHT=TRUE at the VM-level? Because when I run lscpu from linux I only see Thread(s) per core = 1, instead of 2.

2. Also, I know vNUMA automatically kicks in for VMs > 8 vCPU, however, I explicitly force it to use vNUMA by setting the numa.vcpu.min = 4 on the VM. But how can I confirm that it's working from the Guest OS?

3. Anyone here running multiple WP VMs serving up sites in VMware? If so, how is it configured at the VMware level as well as the Guest OS and/or WP application level to get the best …
0
I will be using Beaver Builder to build a WordPress site.  When I have built pages using a shortcode theme (Divi) I have had to make a child theme.  Is a similar procedure necessary with the Beaver Builder?
0
I am building a new website using WordPress and I will be using Beaver Builder + templates rather than a shortcode theme like Divi (Thank you, David Favor!).  Here is my question: Does anyone have a reliable go-to 'checklist' they use to kickoff their web dev projects?  I am new to solo WP dev sites, and I feel like I come across something I hadn't considered at each step of the process.  I know I could google this, but I have quickly come to trust this community much more!  I would love to learn from someone who has this down to a 1-20 (50?) step process so that I can be sure I don't charge down any 'garden paths' unnecessarily.
0
I have a Wordpress premium account. I am interested in the WP-emembers widget.
To my surprise, I discovered after buying the widget that you must have a business account to install the widget.
That's another $204 USD a year. I was not expecting to upgrade my account just so that I
can install widgets.  :>(

Does anyone know of a list of free widgets that I can review?
Maybe one of those will suit my needs.
Thanks!
0
Looking for sql code to add items to a wordpress database and have them show without having to use the wordpress admin.  Looking to write code to execute inserts into the database mainly to add images into the media portion of wordpress but could be used to upload products/Categories as well.  Has anyone done or seen anything like this?
0
I have an Aveda wordpress website. How do I get this line-height to work? It's the word "NLP Physics Presuppositions" in the menu. I don't want them to be so spread apart.

It's on the site www.nlpphysics.com
0
I added my logo to the theme. I have the old logo "studio" on the website still. I tried to modify in the customizer. How can I remove this from the theme? The link to this problem is https://wireoo.com/2018/11/22/10-magento-templates/  It is easy to see when you scroll down then back up.
InkedStudio_LI.jpg
0
Trying to run INSERT INTO ... ON DUPLICATE KEY UPDATE - but its Inserting new records every time.
We're running with $wpdb because this is a Wordpress plugin and the data is in a custom table. One of the fields is a SPATIAL datatype for storing map location POINT data.

So the full code looks like this (apologies for the length)

$place_name = $_POST['place_name'];
$state = $_POST['state'];
$country = $_POST['country'];
$geocode = $_POST['geocode'];
$place_lat = $_POST['place_lat'];
$place_lng = $_POST['place_lng'];
$MX_id = $_POST['MX_id'];
$MX_title = $_POST['MX_title'];
$MX_artist = $_POST['MX_artist'];
$track_url = $_POST['track_url'];
$img_url = $_POST['img_url'];
$positive = $_POST['positive'];
$note = $_POST['note'];

//this is variable for the primary key
//this is variable for the primary key
	if ($_POST['ntpID']===NULL){
		$NTP_id = 0 ;
	}else{
		$NTP_id = $_POST['ntpID'];
	}
//$NTP_id = $_POST['ntpID'];
// if I uncomment this, the value returned is 0 and nothing is updated. 
// With it commented out, a new record is added even when the $NTP_id value exists in the ID field.

$t = time();
$usr = get_current_user_id();
$usrnm = get_user_by( 'id', $usr );
$usrlg = $usrnm->user_login;


$updateQuery = "INSERT INTO $table (`id`,`geocode`,
					`country`,`img_url`,`MX_artist`,`MX_id`,`MX_title`,`note`,
					`place_lat`,`place_lng`,`place_name`,`positive`,`state`,
					`track_url`,`user_id`,`user_login`,`geopoint`) 
				VALUES 
					

Open in new window

1
I am trying to import an index.html my generatepress theme.  I have tried the HTML importer 2 without any luck. Can someone guide me with this issue?
0
Hi All,
I am building a website in WordPress using Divi Theme.  Can someone help me to get rid of the gray area at the bottom of the page?  I have attached a screenshot, and the area I'd like to remove is marked in red.  Thank you so much in advance for any help/tips!!
Michael
SSC-Screen-shot.PNG
0
Gravity Forms layout:
In my Wordpress Gravity Forms layout I am getting this:Gravity forms imageInstead I would like to have the Date of Birth on one line and the Home Phone, Cell Phone, email and Preferred Contact all on the next line.
I have tried putting different commands in the Custom CSS Class for Date of Birth and gf_first_quarter, gf_second_quarter, etc for the contact fields but nothing has worked.

How do I do this?
Thanks
1
Hello,

I'm creating a flower shop and I ran into an issue.

The webshop is for a local company, with only one physical store. This means that we cannot ship fresh flowers across the entire country.

This means, that we only ship to a select region close to the store.

My question is:

How do make it so that people get a pop-up when they want to buy fresh flowers from a region (based on postal code) that we don't deliver too?

In psuedo code it would look something like this:

IF order HAS product category FRESH FLOWERS AND customer_address IS NOT WITHIN product category shipping range > customer can't buy
IF order HAS product category FRESH FLOWERS AND customer_address IS WITHIN product category shipping range > customer can buy

IF order DOES NOT HAVE product category FRESH FLOWERS AND customer_address IS WITHIN shipping_countries > customer can buy

Open in new window

0
This is a follow-on to this question https://www.experts-exchange.com/questions/29120630/How-To-Enable-Rewrite-On-Linux-2.html - I followed the advice but forgot that wordpress will overwrite what is within the wordpress block so I am now moving it out of the block.

# END W3TC Page Cache core

RewriteCond %{QUERY_STRING} controller=product [NC]
RewriteCond %{QUERY_STRING} id_product=26 [NC]
RewriteRule ^/?index\.php$ /product/geranium-15-ml-100-pure-essential-oil/ [NC,R=301]

RewriteCond %{QUERY_STRING} controller=cms [NC]
RewriteCond %{QUERY_STRING} id_cms=([0-9]+)\%3F [NC]
RewriteRule ^/?index\.php$ /index.php?controller=cms&id_cms=%1 [NC,R=301]

RewriteCond %{QUERY_STRING} controller=product [NC]
RewriteCond %{QUERY_STRING} id_product=([0-9]+)\%3F [NC]
RewriteRule ^/?index\.php$ /index.php?controller=product&id_product=%1 [NC,R=301]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Open in new window


The first re-write rule produces this error:  

https://gyazo.com/9741f64223879ee3f42407f1985e4d5e

The other 2 rules work fine so why is this rule not working and producing this error?
0
Hello, I have a WordPress site that is giving me an error ( Fatal error: Call to undefined function wp_doing_cron() in  on line 126) I tried to login to wp-admin and get the same error. Any suggestions on a direction to fix this?
0
I need to search for an order in my WooCommerce back office by email address.  I can see the email address in wp_users but don't know how to put a name to the email address.  Is there a plugin or mysql code that will accomplish that?

Thanks,
0
I installed Wordpress on IIS 10 on windows server 2016. Everything works fine. Now I need to make sure the wordpress is secure, I can make all the core files read only which is what i did, but  in doing so I have to manually update wordpress or change the rights update and change it back.
Wordpress has a bunch of methods to secure it https://codex.wordpress.org/Hardening_WordPress, but do I set these security measures on IIS.

Thanks
Manoj
0
So i have a site. www.lifewalktravels.com

Its a wordpress site. Its a travel site.

So i am trying to embed a flight booking search form on this page.

http://lifewalktravels.com/test

The Feeds site has given me the codes and instructions but i cant get it to work.

They gave me a wordpress version and a non wordpress version.

I tried both but the form wont display in the page.

I have followed the instructions, created a .js file and called it on the page with the given code yet nothing.

The feed site manager is unwilling to to help.

I have attached both codes here.

Can someone help me, i can also provide a login to wordpress, if needed.


=======================
Lifewalktravels-wordpress.txt
Lifewalktravels-non-wordpress.txt
0
Pagespeed has indicated I need to change my images from png and jpeg to a next-gen format.  I found a place online that converted my png to jpeg 2000.  Now I need to know how to load both files rather than just the one for my images to be optimized.

I am using Wordpress and I don't see a means to include both files when I want to insert the image in a page.

https://gyazo.com/7c1b5f47001351ce8f82845ef05d07bc

Please tell me how to do this or tell me another means to get my images in next-gen formats.

Thanks,
0
WordPress site getting SPAMMED, not sure how to stop it.

My website, FortressHarvard.com

has a Download button, and when you fill your Name and Email, then click the button, you get an email with the URL to my book's Preface and Chapter 1. Also, I get an email to my "info@" email's inbox with the name and email of the person requesting the downloading.

I am getting spammed there, by some sort of robot, and do not know how to stop it.

This started yesterday morning, and continued every few minutes, non-stop. I even added a CAPTA requirements this morning, but that had no impact.

How do I stop this SPAM?

Thanks
0
Hi Experts,

I'm after recommendations for someone or a company that can go through my Wordpress created website for Google Seach Engine Optimization and do the optimization for me at a reasonable price. I know very little about SEO apart from the purpose and importance of it. How to implement it on my site though, is beyond my own technical skills and experience.

I know that "reasonable price" is a subjective term and can't give a price that I'm willing to spend at this stage, except to say that I'd like to spend as little as possible :)

I'm open to all offers from both Experts Exchange members who have personal experience with doing this sort of thing, as well as recommendations from members who have personally used the services any companies they recommend I contact.

Thanks in advance for any offers and/or suggestions.

Regards, Andrew
0
Hi,
I need to make some changes to a plugins js file and I want to do it so that it's not overwritten on any plugin updates

The file I am trying to override is  wp_enqueue_script( 'dokan-script' );

// store and my account page
        if ( dokan_is_store_page() || dokan_is_store_review_page() || is_account_page() || is_product() ) {

            if ( DOKAN_LOAD_STYLE ) {
                wp_enqueue_style( 'dokan-select2-css' );
            }

            if ( DOKAN_LOAD_SCRIPTS ) {

                self::load_form_validate_script();
                $this->load_gmap_script();

                wp_enqueue_script( 'jquery-ui-sortable' );
                wp_enqueue_script( 'jquery-ui-datepicker' );
                wp_enqueue_script( 'dokan-tooltip' );
                wp_enqueue_script( 'dokan-chosen' );
                wp_enqueue_script( 'dokan-form-validate' );
                wp_enqueue_script( 'speaking-url' );
                wp_enqueue_script( 'dokan-vendor-registration' );
                wp_enqueue_script( 'dokan-script' );
                wp_enqueue_script( 'dokan-select2-js' );
            }
        }

        do_action( 'dokan_enqueue_scripts' );
    }

Open in new window


Then further down in that file its calling the dokan.js file I want to override...

'dokan-script' => array(
                'src'       => $asset_url . '/js/dokan.js',
                'deps'      => array( 'imgareaselect', 'customize-base', 'customize-model', 'dokan-i18n-jed' ),
                'version'   => filemtime( $asset_path . '/js/dokan.js' ),
            ),

Open in new window


Can someone help me as I'm not sure where to start or where to place my code?

Many Thanks,

Andrew
0

WordPress

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL for creating websites and blogs. Features include a plugin architecture, a template system and strong management, customization and search systems; through its dynamic presentation of content, webmasters have the flexibility to create websites easily.