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 have duplicate SKUs in my Woocommerce Wordpress product table. There are plugins that delete duplicates by title, but I can't use those, as I need to preserve duplicate titles. How can I find and delete the newer record that has a duplicate SKU?
0
http://makandainn2019.staging.wpengine.com/

The right section of the header: It seems like the first row of elements are somehow overlapping the second row so that the links for blog, gift certificates, etc can't be clicked.

I've not taken care of the responsiveness yet, so you need to view in your browser at least above 1210px width. If you also see quickly what css needs added for the logo and right section to stack at 1210px and below, that would also be great. I've been fighting with these two issues for so long I'm just not what what I'm missing.

Thanks for any help.
0
I'm having trouble with the alignment and width of the sub menus in the main navigation at the top below the main header: http://makandainn2019.staging.wpengine.com/

The menu items in them should be aligned to the left on the background and the background be behind all the words, but you can see right now the words are outside of it on the right. I'm sure I'm over looking something simple. Appreciate any help.
0
Making a custom Wordpress page and using the  while loop:
while ( have_posts() ) : the_post(); 

Open in new window


i want to make the output 2 colums

i use bootstrap grid in our code so i should be able to do
<div = row>
  <div = col-md-6>left
  <div = col-md-6>right
</div>

Open in new window

and the
%2 mod operator

Open in new window

but that doesn't seam to work

here is my current code
<div class="clearfix">&nbsp;</div>			 

<?php 
$counter = 1;
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
	<?php 
	$class = ($x%2 == 0)? 'RowWhiteBackground': 'RowGraybackground';
	?>
<?php 
       if ($counter == 1)
        {
               echo '<div  id="'.$counter.'" class="'.$class.'">';
		               echo  '<div class="col-md-4">';
					   ?>
					   	<div class="panel panel-primary">
							<div class="panel-heading"><h5><a href="<?php the_permalink(); ?>" style="color: #fff;" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h5></div>
							<div class="panel-body">
							<img height="150" width="150" style="padding : 0px 10px 0px 10px;"  vspace="10" class="alignleft" alt="<?php the_title_attribute(); ?>" src="<?php echo catch_that_image()?>" />
							<?php echo get_the_excerpt(); ?> 
							</div>
						</div>
						<?php 
					    $counter++;
					   echo  '</div>';
        } else if ($counter == 2) {
		                echo  '<div class="col-md-4">';
					   ?>
					   	<div class="panel panel-primary">
				

Open in new window

0
Hi,

I am having trouble figuring out how to have modified css applied to an existing WordPress site.

Spec:
- WordPress 4.9.9
- Apache

I would like to know:
- How to change the looks of the website

Issues:
- I don't know which scss files are loaded by web browser. There is no scss files under application directories. You can actually find multiple scss files are loaded from the developper console.
- I have 'main.css' that seems relevant to scss files used to style the website. CSS properties can be found in 'main.css' but browser does not use 'main.css' to rendering purpose. Instead, it seems to use .scss files since look of the site does not change by modifying 'main.css'.

Other note:
- There seems no SCSS related plugins are installed.
- This WordPress website was developed by freelancers who I am not in touch anymore.

Live preview site: http://54.178.243.12/

I have been googling for long time, but not successful so far :(
Any advises are welcome. Looking forward to hearing from you.
0
Installed new Microsoft Server 2012 R2 with new MySQL 8.0, PHP 7.2 and wordpress 5.1.
Server is functioning correctly however when I download a plugin I get this error:
cURL error 60: SSL certificate problem: self signed certificate in certificate chain

I downloaded the newest cacert.pem file and placed it on the server in this directory:
C:\php\cacert.pem

I edited the php.ini file in this path C:\Program Files\PHP\v7.2 to this:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
curl.cainfo = "C:\php\cacert.pem";

However, I'm still getting the same error "cURL error 60: SSL certificate problem: self signed certificate in certificate chain" when I download a plugin.
Can you provide any suggestions on how to fix or bypass this?
0
Hi WordPress Experts,

I'm wanting a way to retain a change to a theme function file, even if I update the theme.

I’m using WordPress 5.1 with the AccessPress Store 2.3.6 theme and the WooCommerce 3.5.5 plugin, and the (free) theme provider told me that if I want to increase the number of products which show on a page, I should edit wp-content/themes/accesspress-store/inc/accesspress-function.php, modifying line 624, as follows:
623: function accesspress_store_loop_shop_per_page($cols){
624:	    return 999;   # Changed from 12 to 999 to show 999 products per page
625: }

Open in new window

The change worked, but when I asked them how I can make it so that change is not overwritten every time I update the theme to a new version, they couldn't help.
I assume this involves making a child theme, and somehow including that function (or one like it) in it?
How could this be done, please?

Attached is the entire accesspress-function.php file, in case you need it.

BTW, what is the point in the theme coming with it's own functions.php file, and a inc/accesspress-function.php file?

I’m reasonably new to WordPress, but I’ve done programming and know a little PHP.

Thanks.
tel2
accesspress-function.php
0
We are using the Word Press theme BEE. We need to edit a few pages. When we go into wp-admin & select a page, it no longer has the "page Builder" option, so we can no longer make any changes.

Can someone provide a link to tech support on Bee to ask them a question, or, if one of you knows....?

Thanks
0
Hey there, I'm having a problem with a string replace not working as it should.

Basically, I've got a button link on my home page - https://cretecarrier.com/ - (Hunt Flatbed APPLY)
The link is https://intelliapp2.driverapponline.com/c/hunt?r=CreteCarrier-Homepage-HUNT-APPLY

Now, I also have a tracking function which stores UTM codes as cookies. I also use it to append it to url's.  

So an example, i click a google add which takes me to our websites.  https://cretecarrier.com/?utm_source=the-big-test

In theory, what should happen is the link - https://intelliapp2.driverapponline.com/c/hunt?r=CreteCarrier-Homepage-HUNT-APPLY . should change to https://intelliapp2.driverapponline.com/c/hunt?utm_source=the-big-test . BUT it is changing to https://intelliapp2.driverapponline.com/c/hunt?utm_source=the-big-test?r=CreteCarrier-Homepage-HUNT-APPLY

How can i, if i come into the site through an add with a UTM code, change the url from
- https://intelliapp2.driverapponline.com/c/hunt?r=CreteCarrier-Homepage-HUNT-APPLY 
TO
- https://intelliapp2.driverapponline.com/c/hunt?utm_source=the-big-test

Here is my current code.
function set_ad_cookies() {
	
  $vars = array('utm_source', 'utm_campaign', 'utm_media');
  foreach ($vars as $k) {
      if (isset($_GET[$k]) && !isset($_COOKIE['orig_'.$k])) {
          setcookie('orig_'.$k, $_GET[$k], 0, '/', $domains['cookie_domain']);
      }
  }
  
    if (!isset($_COOKIE['orig_utmsource'])) {
	  

Open in new window

0
I have very infrequent needs to create or edit websites.  
In the past I've used Dreamweaver but it's really too old to install on Windows 10 so I'm stuck with it on Windows 7.  I'd like to replace it.
Also in the past, I've used tools that the hosting company provided.  That turned out to be most unfortunate as the tool I had used was, one day, just gone.  And gone for good I might add.  So I'm very leery of using tools hosted by the hosting company and would like to stick with a local app.

Suggestions?  I don't want to spend much money on this because I rarely need it.
I looked at WordPress but it seemed too "bloggy" ... if that makes sense?
0
This is the original image
https://gyazo.com/5ca0bca647edb139b85bf623c71d873b


This image is in the media section of Wordpress and I went in and edited the picture in the form of downsizing and cropping.

Here it is after the editing
https://gyazo.com/2d5102e93b597b2234767a8b3649fc69

Yet when I go back into the media section or if I use the image on a webpage it shows up like the original.

I have deleted browser cache, I closed the admin section and re-logged in.  I reloaded the image into the page by deleting the old copy and then selecting the new image but it still shows the unedited version.

I am on Wordpress 5.03.

Please tell me how I can get the edited image on my webpage.  You can see the web page at http://www.thenewyou.live just scroll down to see the image in question.

Thanks,
0
Hello,

I am develop a website in wordpress which is like instagram. I need to develop a desktop app so to hundle it. Can I use .Net C# or UWP for this?
or what else can I do for that?

thank you
0
Hi all

I'm currently restricting access to a intranet site using a LDAP lookup and requiring a valid user, ip or host name. For some reason a wordpress site running on this cannot loopback and is coming up with a 401 error saying

"Unauthorized, This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required"

If I remove the code below all works fine so I'm asking for some guru help please how I can still use the below, but allow the machine to talk to itself (I guess) without authentication?
 
<Directory "D:/htdocs/intranet">

    Options Indexes FollowSymLinks
    AllowOverride All
    
    AuthType Basic
    AuthName ""
    
    AuthBasicProvider ldap  
    
    AuthLDAPURL "ldap://1.2.3.4:567/ou=#,dc=#,dc=#,dc=#?sAmaccountName"  
    AuthLDAPBindDN "cn=#,cn=#,dc=#,dc=#,dc=#"
    AuthLDAPBindPassword ####
    
    Require valid-user 

    Require ip ####
    Require host localhost
    
</Directory>

Open in new window

0
need help in choosing the right theme for a word press site with the following features :

1. slide show - carousel
2. tour tracker
3. page counter
4. subscription of news letter
5. voting on certain choices
6.gallery with slide show
7.social media integ
8. form submission
0
I'm quite frustrated by wordpress. The biggest thorn in my side at the moment is that wordpress presents an iFrame with a gray border that's ~40px all around the actual content of the iFrame. No matter what I try, I can't get rid of the damn thing!

Below is some typical iFrame code as wordpress demands:
[iframe style="frameBorder:0;" margin=0 name=3 src="https://experts-exchange.com" 650 777 ]

Open in new window

Can anybody help?
Sas
0
Hello,

I am trying to check if an advanced custom field date field is past today. So far it works for my wp_query no problem, but if i try to check it in an IF statement, the first result is broken.
see my page https://fasdinfotsaf.ca/en/live-events-feed/ when i display my dates in an echo.

Basically i am scrolling though events, and if it is a past event I want to put a "past events" heading

so query works great..

but if you look at my live page, the very first post has a date of 01/01/1970 12:00:00 AM UTC which is triggering my title display, every other date following it is correct, it is just the first result

<?php  
	$showonce = 0;
	$the_query = new WP_Query( array('posts_per_page'=>10,
                                 'post_type'=>'live_events',
								 
								 'meta_key'          => 'start_date',
    'post_status'       => 'publish',
    'orderby'           => 'meta_value',
    'meta_type'         => 'DATE',
    'order'             => 'DESC',
	
                                 'paged' => get_query_var('paged') ? get_query_var('paged') : 1) 
                            ); 
                            ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); 
?>
<div class="col-xs-12 file">



<?php
if($showonce == 0){
$datetime = strtotime( get_field('start_date') ); // Convert to + seconds since unix epoch
$yesterday = strtotime("-1 days"); // Convert today -1 day to seconds since unix epoch
if ( $datetime >= $yesterday ) { // if 

Open in new window

0
Turning OFF my WordPress Site?

I have the Admin login to my WordPress site, but I need to turn it off.

I do not care where the domain points afterwards.

How do I "unpublish" the site?

Thanks
0
This is a follow on from this question.

https://www.experts-exchange.com/questions/29132557/Javascript-Button-Need-OnClick-To-Reset.html

I need the message from this php snippet to post in the order notes box on WooCommerce.  I am using Wordpress 4.9.8 and WooCommerce 3.5.4.  This code isn't working.

add_action ('woocommerce_before_order_notes', 'display_member');
//echo '<pre class="ee_debug" style="display: none">' . print_r($_COOKIE, true) . '</pre>';
function display_member($order_id) {
echo '<pre class="ee_debug" style="display: none">' . print_r($_COOKIE, true) . '</pre>';
	if (isset($_COOKIE['wantmembership'])) {
   //if ($_COOKIE['wantmembership'] = 1) {
    echo 'YES!';
//if (isset($_COOKIE['wantmembership:1'])) {
    // The user wants membership
//echo "I want membership2";
$order = wc_get_order(  $order_id );

// The text for the note
$note = __("I Want Membership");

// Add the note
$order->add_order_note( $note );

// Save the data
$order->save();
  }
}

Open in new window


It is giving this error

	<pre class="ee_debug" style="display: none">Array
(
    [wp-settings-69338] => editor=html
    [wp-settings-time-69338] => 1548795169
    [wp_woocommerce_session_ec34ebe84fc325c20ff14f13d4d89876] => 69338||1548967975||1548964375||773934e5a3140d57836d39966a61c48f
    [of_current_opt] => #of-option-globalsettings
    [wordpress_test_cookie] => WP Cookie check
    [wordpress_logged_in_ec34ebe84fc325c20ff14f13d4d89876] => 

Open in new window

0
This is a follow on from this question.
https://www.experts-exchange.com/questions/29132557/Javascript-Button-Need-OnClick-To-Reset.html

Open in new window



This is the current error

	<pre class="ee_debug" style="display: none">Array
(
    [__stripe_mid] => 64c96aca-233e-4091-a8a5-2eef8b3ffc06
    [wp-settings-69338] => editor=html
    [wp-settings-time-69338] => 1548774822
    [of_current_opt] => #of-option-globalsettings
    [wp_woocommerce_session_ec34ebe84fc325c20ff14f13d4d89876] => ce0f477d8bf01c601d8f3113b3fcc354||1548969520||1548965920||2173822770d04d88ad3a9bfb8abc8cdb
    [wordpress_test_cookie] => WP Cookie check
    [woocommerce_items_in_cart] => 1
    [woocommerce_cart_hash] => f1e39a061842b8f884c91f54c2ab6fba
    [wordpress_logged_in_ec34ebe84fc325c20ff14f13d4d89876] => sharingsunshine|1548972461|sXqfvPjiY96SFwZJOXNyUKODb2YZtd8Vr1h6JHJkCrA|c4b2f47b2eead8b4f23032764afe3babd9932be9183650096fcd334a2d25e95d
    [wantmembership] => 1
    [__stripe_sid] => 43c996d1-f787-45db-b38e-74a122d96ec5
)
</pre>YES!<br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function add_order_note() on boolean in C:\xampp\htdocs\tfl\wp-content\themes\flatsome-child\functions.php:285
Stack trace:
#0 C:\xampp\htdocs\tfl\wp-includes\class-wp-hook.php(286): display_member(Object(WC_Checkout))
#1 C:\xampp\htdocs\tfl\wp-includes\class-wp-hook.php(310): WP_Hook-&gt;apply_filters('', Array)
#2 C:\xampp\htdocs\tfl\wp-includes\plugin.php(453): WP_Hook-&gt;do_action(Array)
#3 

Open in new window

0
Dear Experts,

I have the following codes used to work in PHP 5.0 and suddenly it stop working after I upgraded to PHP 7.2
 
$query_sql = "SELECT * FROM wp_posts WHERE post_title = %s ORDER BY post_title;";
$query = sprintf($query_sql, mysql_real_escape_string($name));
$postquery = $wpdb->get_results("{$wpdb->prepare($query)}");

echo 'Rows: ' . count($postquery);

The row count return 0.

Please help. Thank you in advance.
0
I have a website created with Wordpress and I need to delete a link on it.  I know nothing about this stuff.  Our website creation company is not getting back to me but I do have access (I THINK) to being able to do what I need to do.  Take a look at the screenshot.  There is a link when you hover over company (in green) that says company meeting question.  I need to find where this is in wordpress editor and delete it.  The link brings you to an online suggestion box website.
0
Hi There,

I'm having a little problem with a JS snippet I have on my website, which blocks a search of California.
We don't currently hire in California and have no listings, but we have a sticky job that comes up whatever state or location is entered.
I got the below snippet code, which if you type in ('ca', 'cal', 'cali', 'california', 'california ', 'los angeles', 'san fransisco', 'san diego', '90210', ) it will block the ability to select a freight type, and thus shows no listings, plus an alert.  

This is great for that part,  but if you search for something in say new york, it will bring listings up as intended, but say you then try to enter California again, it will give you the alert, but will also load the sticky job.  

How could i modify the code, so if listings are already there, and you try to search for California jobs, the listing hide?  I was thinking something like the ul.job_listings div is set to display none if it matches criteria, and then display if not California.

Hope this makes sense.  ...  Basically want ZERO jobs to show if you enter California, or CA, or Los Angeles.  ie post 19672 to not appear for California searches.

Website - Job Search.
		<script>
			$(function() {
			$('body').on('blur', '#search_location', function() {
				var excluded_cities = ['ca', 'cal', 'cali', 'california', 'california ', 'los angeles', 'san fransisco', 'san diego', '90210',  ];
					if 

Open in new window

1
I am using Xampp 3.2.2 wanting to build a test site that is running Wordpress 4.9.8 (used bitnami module).  The site worked and I could login to the dashboard but I needed to change the mysql database and now I can't login to the dashboard.  Instead it goes to my-account.

I have setup a new user following the guidelines on the net on how to create an admin account via phpmyadmin.
https://www.godaddy.com/help/create-a-new-wordpress-admin-user-in-the-database-27023

Open in new window



I have cleared all cookies and I made the changes in wp_options (see screenshot).

https://gyazo.com/b603e50437b5481a521322e0ca43a6f8

my host file is pointing 127.0.0.1 to http://www.test-tfl.com in this manner
127.0.0.1 www.test-tfl.com

Open in new window


Please help me to be able to login to the wordpress dashboard.
0
For my wordpress blog (hosted at wordpress.com / business plan /  my domain ),  I create custom ads which are basically  a .JPG image linked to the advertiser.
 
These are not Google Adsense or jetpack ads.  

What's the most popular /well-supported plugin/solution for me to create an ad (picture w/ link) , have them automatically interspersed between posts, and permit me to specifically place them in certain locations on the left & right?

I don't know if Wordpress.com as a hosting company has any restrictions.

The guy who ported my site to wordpress.com wrote a custom plugin but I don't want to be tied to this guy forever.

Thanks for any suggestions,
Mike
1
So, I have been reading about this for a long time and there's never a conclusive answer to be found anywhere.

I have a Centos 6 LAMP web server which mostly hosts websites created by yours truly and the occasional website created by someone else.

Which is the most secure way to configure Wordpress folders ownership AND keep all the automatic features (updating, uploading and so on) without the need to insert ftp or sftp credentials each time?

Aside from permissions (which I always set to 755 for folder, 644 for files and 600 for special files, as suggested everywhere), there's a lot of different ideas about ownership.

Somebody says apache should be the owner of the whole folder. Somebody says that the owner should be your server user (root for instance, or a dedicated user) and never apache.

But if the owner is not apache, you have to use your ftp credentials to upload, update and so on.

So is there a way to actually have it all? What's the safest and smartest way to configure ownership for Wordpress?

Thanks guys.
1

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.