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 am using WordPress and woocommerce which using PHP on a shared server (hosted server). I have a ton of pictures I am working on, to make the names more descriptive and to add SEO IPTC info to each picture. My question is primarily about PHP best practices when it comes to names--to use with or without spaces. Example?
Blaze-1-Fancy-Leaf-Caladium-Bulbs.jpg ("-" between each word)
or Blaze_1_Fancy_Leaf_Caladium_Bulbs.jpg ("_" between each word)
or simply Blaze 1 Fancy Leaf Caladium Bulbs.jpg  (" " between each word)

Then secondarily and much less important any recommendations for apps to mass rename pictures, adding SEO IPTC info and adding watermarks to pictures?

Thanks!
0
Become a Certified Penetration Testing Engineer
LVL 13
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

I have an error in my css that I am not sure how to fix.  It is the line that has all of the "#'s" beside it. Because of the error I can't save the css without a message that says it may break my site.  The site is https://www.henricomg.org

Here is the code

#logo {
margin-bottom:-157px;}

div#masthead {
	margin-top:-160px;
}
a{
	text-decoration:underline;
}
p{font-size:16px;}

#logo {
width: 1024px;
}
#logo img {
max-height: 198px;
}

 /* Style the buttons that are used to open and close the accordion panel */
.accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
  background-color: #ccc;
}

/* Style the accordion panel. Note: hidden by default */
.panel {
  padding: 0 18px;
  background-color: white;
  display: none;
  overflow: hidden;
} 
 .header-main {
    height: 296px;
}

/*Acco*/
.ac-container {
    max-width: 400px;
}

.ac-container label {
    height: 30px !important;
    line-height: 21px !important;
    font-size: 12px !important;
    font-family: 'Open Sans','Arial Narrow',Arial,sans-serif !important;
    padding: 5px 20px;
    position: relative;
    z-index: 20;
    display: block;
    height: 30px;
    cursor: pointer;
    color: #777;
    text-shadow: 1px 1px

Open in new window

0
I need to remove the hover effect on the menu item "Resources" the website is https://www.henricomg.org

I have tried this code

 
.nav-menu li#menu-item-50:hover > a
{
color: inherit;
}

Open in new window


but there is no change provided I am using the right menu number.
0
Hi Expers,

As I have done many times before, I just downloaded the latest version of WordPress (5.2.4) and  copied into a newly-created dev site folder, C:\inetpub\wwwroot\my-new-site.org

First, I got the following with PHP 7.1.10
WordPress database error Unknown column 'wp_' in 'field list' for query SELECT wp_

Open in new window


Again, this  is a new instasll.

I then changed my PHP version to 5.6.5, and i get
The site is experiencing technical difficulties.

Open in new window


With PHP 7.1.10 on this server, my previous WP websites are still functional.

Any advise would be appreciated.
0
Move a Wordpress site from wildwestdomains (Godaddy's Sister) Deluxe hosting to Godaddy Deluxe hosting CPanel site. The site won't load I get this from error log. I did not design this and I have never moved WP sites before so any help would be great.

[03-Oct-2019 08:11:45 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function site_url() in /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/includes/webapi/webapi.php:21
Stack trace:
#0 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/gravityforms.php(162): require_once()
#1 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-settings.php(305): include_once('/home/mivn8z69y...')
#2 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-config.php(179): require_once('/home/mivn8z69y...')
#3 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-load.php(37): require_once('/home/mivn8z69y...')
#4 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-blog-header.php(13): require_once('/home/mivn8z69y...')
#5 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/index.php(17): require('/home/mivn8z69y...')
#6 {main}
  thrown in /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/includes/webapi/webapi.php on line 21

Open in new window


Line 21 is:
define( 'GFWEBAPI_API_BASE_URL', site_url( GFWEBAPI_SLUG ) );

the PHP is:

Open in new window

0
I'm working with a small company that runs a website with an e-commerce system running in the Laravel framework with the rest of the site running in WordPress. Now I want to take a copy of all of this so that I can work on stuff without affecting the production site. Naturally there is no existing dev area. This was all set up for them by a 3rd party who have effectively run away and refuse to answer any calls or emails. I've created a VM running Ubuntu 18.04, Laravel (5.7 I think) MariaDB Apache2 and PHP7.2. I can (and have) taken a backup copy of the WordPress items that I can install onto the VM using the Duplicator Pro plugin. I've tested this on the VM and know that I can expand everything there and having done so I can at least rung the CMS side of WP although seeing the actual web pages is difficult.

I need to get this running partly because I may need to move from the existing hosting arrangement so want to use this as a sort of trial run in addition to creating a dev setup. My question is what do I need to do to get this working? Do I need to make changes in the Laravel set up? It's still got the "your-project" folder where I've put things like phpminiadmin.php (like phpMyAdmin but just one page) so I know that all the bits are running. Can I get away with just duplicating the file and folder structure of the production site and then run the Duplicator Pro installer script to set up the site? Am I being too naïve here? :-)
0
I have a login screen with user pro word press plugin.
after i enter username and password and press login button, nothing happens, it shows the same page.
please provide suggestions on why this is happening.
login-issues.jpg
0
.htaccess file in WordPress.  Is the following .htaccess file TO restrictive for a e-commerce site?  I am trying to keep the bots out of all files but the site and product files.

.htaccess

User-agent: *
Disallow: /cgi-bin/
Disallow: /info/
Disallow: /meta/
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/mu-plugins/
Disallow: /wp-content/plugins/
Disallow: /wp-content/updraft/
Disallow: /wp-content/upgrade/
Disallow: /wp-content/uploads/
Disallow: /wp-content/wflogs/
Allow: /wp-admin/admin-ajax.php

Open in new window

0
I'm hoping a WordPress WooCommerce guru can help me with this one:

We are running the Subscriptions add-on for an industry listings site.
There are two products: 'Featured Listing' and 'Super Featured Listing'. Each of them are identified by custom meta fields linked to their post_ids.

When a logged-in customer initiates or renews their subscription we want to run a function which updates the meta_values of those meta_keys for that post_id of their listing. (So our website knows how to prioritise their listing).

I have read about the woocommerce_subscription_renewal_payment_complete hook which runs on initiation or renewal of a subscription. We can add some code to our functions.php to run it.

However, can someone suggest the best way for us to bring the relevant post_id into a subscription record so the function knows which post_id to use in updating the wp_postmeta table?

I just don't know how to bring the post_id to the 'add-to-cart' button and the checkout page, and thus link it to the subscription.

Thanks
Tim
0
Dear Experts,

We are using Wordpress on Bluehost for our website, and using WP Mail SMTP plug-in to send out acknowledgement emails after we receive a request.  We are having issues because our client, who is receiving this request mails use Mimecast, and they see this as spoofing, because All email for Bluehost's shared hosting customers is routed through a pool of proxy email servers.  We cannot white list a range of IPs because they seem to change all the time.
We tried other plug-ins, but the issue always remains the same.  
Please advise.
0
OWASP: Threats Fundamentals
LVL 13
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

I am looking to build an alternative to Zapier "zap" using a digital ocean droplet. Can anybody recommend a technology? The first thing that comes to mind is Node.js or PHP. Zapier is great, and we love it, however we are now being asked to processes files with up to 10,000 lines per file per month. This brings our zapier bill from @20 per month to $300. I would like to have a webHook online with custom URL. (myDomain.com/myWebHook)

our zap is very simple:
* push FirstName, LastName, Email to a webook
* add the user to a mail chimp list
* add the user to a wordPress memberPress subscription
* send the user a custom welcome email from an office 365 account

There are a few reasons it might make sense to build our own integration tool:
1 ) if we are going to get 10,000 items to process every month or so, it it much nicer to just budget $50 per month for an AWS or Digital Ocean VM
2 ) During the memberpress user create, then add to the correct subscription, the smallest time pause that Zapier allows is 1 minute. When we are processing 10K of new users, this can extend out for quite some time. It might be easier to have the ability to control down to a 15 second wait time.
3 ) I am not sure how zapier runs each zap, but during the memberPress adds it might be nice to know they are all running in serial. I often wonder if zapier runs them in parallel. We frequently get DB timeout errors when the zaps are running.

What I am looking for is advice on the following:
1
Hello!

Is there any way to get the referrer page link in WordPress. Can I create a function and use it in a template?

I'd like to have the link on the account page after logging in. I'm using Memberpress and I can't redirect to the page that the user was viewing before logging in. The default is to redirect to account page. So, this is my hack.
0
Here's this old chestnut again.

I've got this to work: Most recent 10 posts have term "Free". Whenever a new post is added eleventh post gets term "Premium", the term with id 174 is excluded from this dynamic term naming.

/*Add terms to posts */

add_action( 'save_post', 'total_set_default_object_terms', 11, 2 );
function total_set_default_object_terms( $post_id, $post ) {
  if ( 'publish' === $post->post_status) {
    $position = 1;
    $args = [
      'numberposts' => -1,
      'order' 			=> 'DESC',
      'orderby' 		=> 'date',
      'post_type' 	=> 'post',
      //'taxonomy' => 'episode_type',
      'tax_query' => array(
					array(
					'taxonomy' => 'episode_type',
					'field' => 'id',
					'terms' => array( '174' ),
					'operator' => 'NOT IN',
					),
					),
						];
						
						
    $posts = get_posts( $args );// query posts that are episodes in descending publish date order
    foreach($posts as $post) {
      if ($position > 10) {
        wp_set_object_terms($post->ID, 'premium', 'episode_type', false);
      }
             
      $taxonomies = get_object_taxonomies( $post->post_type );
      
      $position++;
     }
  }
}

Open in new window


However, when I trash any of the 10 most recent posts and update any post, I don't get 10 Free posts, just the number remaining after the trashing/deletions.

Only 7 posts with term "Free" when there should be 10.
How do I remedy that in the code above?
0
A company has asked me to build them a new Wordpress website and they want to host it on their own servers. My concern has to do with how to create a website in a privately hosted environment, since I have only built websites using hosting company environments like Bluehost or Network Solutions, for example. I am comfortable logging in to an administrative environment and utilizing Cpanel tools but can’t visualize what it would be like in a self hosted situation?  Nor have I installed Wordpress using anything but a self-installer. Can someone give me an idea of what I am up against here, if it would be wise to self host a Wordpress site, and if there is anywhere on the net I could see visual examples of a self hosted environment?  Thank you much. I hope you understand my concerns here.
0
What does it mean when you get an error in the console that looks like this:
Starts with a red X above the DOCTYPE
X
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en-US" style="font-size: 15.7466px;">

AND the error:
Failed to set referrer policy: The value '' is not one of 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', or 'unsafe-url'. The referrer policy has been left unchanged.
0
Hello. A client has a website built in WIX, the mobile experience and forms are far from great. They are not willing to change the website technology.

They are wanting to advertise on Google Ads and send the traffic to a landing page, but I am going to need to optimize the page for traffic and all relevant SEO on page etc.

Should I use a subdomain and create a landing experience? Wordpress subdomain site? Should I use another page on Wix formatted for mobile? Should I use a / subdirectory re-direct?

What I am concerned about is all the SEO factors that google uses when sending ad traffic to subdomain etc

thanks all for the time
0
Is it possible for Wordpress to add it's own folders?

I have noticed that it keeps adding a 'News' folder into the root of the domain, not in any of the wp-content folders or plugin folders etc. and then when I go to the blog page it stops working until I either rename or delete the folder. I don't know if it is possible for a plugin to do this or my permalink structure but it seems to be random.

Permalink structure:

http://mysite.com/news/%postname%/

Open in new window

0
I am trying to add a captcha to my registration form template for WordPress.

When I fill out the form and select the Submit button, without checking the captcha box, the user is still created.  It does not matter if the Captcha box is checked or not, the new user is always created.  Can someone please take a look and show me what I am missing?

<?php 
/*
Template Name: Login Page
*/
 
the_post()
?>
<?php get_header(); ?>
 
<div class="wrapper">
	
	<?php
	$error= '';
	$success = '';
 
	global $wpdb, $PasswordHash, $current_user, $user_ID;
 
	if(isset($_POST['task']) && $_POST['task'] == 'register' ) {
 
		
		$password1 = $wpdb->escape(trim($_POST['password1']));
		$password2 = $wpdb->escape(trim($_POST['password2']));
		$first_name = $wpdb->escape(trim($_POST['first_name']));
		$last_name = $wpdb->escape(trim($_POST['last_name']));
		$email = $wpdb->escape(trim($_POST['email']));
		$username = $wpdb->escape(trim($_POST['username']));
		
		if( $email == "" || $password1 == "" || $password2 == "" || $username == "" || $first_name == "" || $last_name == "") {
			$error= 'Please don\'t leave the required fields.';
		} else if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
			$error= 'Invalid email address.';
		} else if(email_exists($email) ) {
			$error= 'Email already exist.';
		} else if($password1 <> $password2 ){
			$error= 'Password do not match.';		
		} else {
 
			$user_id = wp_insert_user( array ('first_name' => apply_filters('pre_user_first_name', $first_name),

Open in new window

0
Okay,

I have a client who's putting his podcast behind a paywall. He wants all post except for the 10 most recent and anything with a category called "Bonus Episode" to be free.

I've got code working to add a taxonomy term "Premium" to any custom post type (episode) older than the first 10. However, I need to exclude have episodes with the category (not taxonomy) "Bonus Episode".

Here's what I have so far:

add_action( 'save_post_episode', 'total_set_default_object_terms', 11, 2 );
function total_set_default_object_terms( $post_id, $post ) {
  if ( 'publish' === $post->post_status) {
    $position = 1;
    $args = [
      'numberposts' => -1,
      'order' => 'DESC',
      'orderby' => 'date',
      'post_type' => 'episode',
      'tax_query'      => array(
      						'taxonomy' => 'episode_type'),
      						array(
                'taxonomy'  => 'post_tag',
                'tag_not_in' => array(45)
            ),
    ];
    $posts = get_posts( $args );// query posts that are chapters in descending publish date order
    foreach($posts as $post) {
      if ($position > 10) {
        wp_set_object_terms($post->ID, 'premium', 'episode_type', false);
      }
             
      $taxonomies = get_object_taxonomies( $post->post_type );
      
      $position++;
     }
  }
}

Open in new window


Obviously, something's wrong since I still see the Premium tag on the Bonus Episodes
0
Build an E-Commerce Site with Angular 5
LVL 13
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Hi, I would like to add a conditional dropdown list to my registration page.

There shall be a dropdown list having 5 entries.

There shall be a second dropdown list, the value of which shall depend on the value in the first dropdown list

Then a third dropdown list which shall depend on the value in the second dropdown.

The second and third dropdowns should have the capability to accept typing out, thus narrowing down the list as the lists are expected to have hundreds of entries.


I am using Ultimate Member plugin. I would like to know how to do this. Or if there is any other/better/simpler way to achieve what I want.
0
Hi, I would like to add a custom validation field to my registration page.

The number shall be of the format

#####-#######-#

My intention is to let the user type the numbers and let the hyphens fit in themselves.

I am using Ultimate Member plugin.
1
We build WordPress plugins that are widely distributed, of course.  Within our plugins, we need to make a call to a service that we have setup, which includes our own API credentials for this service.  These credentials need to stay protected.

We're at a loss at how we can distribute a plugin making calls to a service with our credentials, yet protect those credentials..??

First thought was encryption, but then the encrypted value would have to be included in the plugin, and if we're decryption in our service then all anybody would need is that encrypted value, so that won't work.

I'm struggling to think of another way around this.  Any ideas for me?  Any information on this would be greatly appreciated.  Thanks!
0
Hi,

Need help with our site a popular news platform in our country.  Our featured images are not appearing right on desktop and the positioning is off.. please look at: https://mwebantu.com/2019/06/27/standard-chartered-launches-first-ever-digital-bank-in-zambia/19908/

On this link cannot view the full photo and need help with styling it (css) so it appears right on desktop.  On Mobile it is fine.  

Thanks!
1
Hi Experts,

Need help with our african stock photo site, we are preparing to launch it soon.  We have an issue with loading, it takes forevert to load the images for the categories, and need a better way to load the images ..one by one, and not like now where it loads everything then loads the images... it is using a infinity scroll. See:  https://www.stockimagesafrica.com/downloads/category/southern-africa

We want it to load like pexels.com

Thanks again
0
i'm building investment site by wordpress i want to add invest option to it i'm finding PLUGIN with all of that features like DASHBOARD , WHERE TO INVEST , TOTAL INVESTMENT , MONTHLY INVESTMENT ETC please help
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.