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

Hello,

I got a new website client today because they were hacked. It had all the usual base64 code on every index file. In addiction, I found a file replicated maybe 1000 times  msv.php and it contains something that create a new cron tab and this line

SNl  13:01   0:00 ./cnrig -a cryptonight-light --donate-level 1 --max-cpu-usage=40 -o pool.aeon.hashvault.pro:3333 -u

as well as some other code...

Aeon.hashvault.pro which appears to be some bitcoin mining thing. Anyone have any info on this?

Also, these files were below the public_html root... should i delete the entire cpanel account and start from scratch?
0
OWASP: Forgery and Phishing
LVL 12
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Hello,  I am having problems with a WordPress plugin call WP-Job Manager, particularly trying to create a custom template for single jobs.

I have customized the default template by copying "content-job_listing.php"  from the plugin directory to  /themes/enfold/job_manager/content-job_listing.php. This works great, and is my template for all jobs. See code below.

<?php
/**
 * Single job listing.
 *
 * This template can be overridden by copying it to yourtheme/job_manager/content-single-job_listing.php.
 *
 * @see         https://wpjobmanager.com/document/template-overrides/
 * @author      Automattic
 * @package     WP Job Manager
 * @category    Template
 * @since       1.0.0
 * @version     1.28.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>
<div class="single_job_listing">
	
	<h2><?php the_title(); ?></h2>
		
	<div class="hide_above_mobile">
		<?php display_job_phonenumber_data(); ?>
	</div>
	
	<?php if ( $apply = get_the_job_application_method() ) :
		if ( $apply->type === 'url' ) {
	    	$application_href = $apply->url;
		} elseif ( $apply->type === 'email' ) {
	    	$application_href = sprintf( 'mailto:%1$s%2$s', $apply->email, '?subject=' . rawurlencode( $apply->subject )  );
		}
	?>
	
	<div class="application">
		<a class="application_button button" href="<?php echo $application_href; ?>" target="_blank"><?php _e( 'Apply for job', 'wp-job-manager' ); ?></a>
	</div>

	<?php endif; ?>

	<?php the_content() ?>
	<?php 

Open in new window

0
A small real estate firm is looking to have a website that would display their property listings, blog, documents and other static information.
It needs to be mobile compatible as well.
They want to post the listings themselves.

Is there a company that produces these sites?  Something that runs under WordPress?

Thanks.
0
Friend transferred a wordpress site to a new VPS, the new host is displaying SOME pages but not all pages.

For example /category/mypage works
but category/mypage2 returns 500 server error

Wp-admin works, so i dont htink its a database issue, i re created the htaccess file, no luck.

When i inspect the  broken page it says <!-- html is corrupted -->

They are using the wordpress fastest cache plugin, not sure if that helps (even though i look into the cache folder and not all the pages are in here? is it permissions? i set 777 temporarily on those folders but look slike Fastest Cache isnt loading those pages into the cache)


Any ideas other than corrupted pages one one page would return 500 server error?
0
HI Experts,

I have a child theme based on Appointment Pro that I am using on www.atlas365.ca

As you can see, in mobile view I have a burger menu, but how can I make the burger menu appear in tablet view as well, in order to avoid the menu overlap the logo?

Thank you,
0
I am trying to add WooCommerce order number and order total to the head tag of thank you page. Here is my code I have in header.php

<?php if(is_wc_endpoint_url( 'order-received' )){ 
global $woocommerce;
$orderid = $woocommerce->order->get_id();
$ordertotal= $woocommerce->order->get_total();
?>
<!-- Google Code for Conversion Page -->
<script>
  gtag('event', 'conversion', {
      'send_to': 'AW-xxxxxxxxxx/abcdefgshig',
      'value': <?php echo $ordertotal; ?>,
      'currency': 'USD',
      'transaction_id': <?php echo $orderid; ?>
  });
</script>
	
<?php } ?>

Open in new window


And when I place an order just displays a blank page and if I view source it stops at  'value': ,

What am I doing wrong. Any advice is appreciated

Thanks
0
I have a client who i developed a single page static HTML/CSS landing page for. These landing pages are for real estate properties, so all pages are identical, except they all live on their own domain (www.myproperty.com) and have different images and information. So far to manage its been super simple, i point my godaddy domains to Digital ocean, apply LetsEncrypty, copy the template over and fill in the blanks and i have a super light performant website all done within 30 minutes.

The client has now sent me a few new "designs" from a theme they want to use, the problem is, this theme is WordPress. Ideally i want to avoid wordpress because i am maintaining the site and its unnecessary for me, also the themes use page builders and are bloated with html and css, i know i can tweak it heavily to make it close to as performant as a static page but again i feel this is unecessary. I go the wordpress route im going to have to charge them setup costs + an additional security and maintenance fee (monthly) on top of hosting because i will have to actually manage wordpress itself (updates, plugins, all that fun crap that breaks when you run updates, etc).

My options:

1. Charge them to convert the theme to raw HTML/CSS and continue deploying the sites as i already do. This will cost them more upfront as it will take 20-40 hours to do but i can keep my existing workflow (all pages have their domain name, and SSL) and wont have to charge them any additional monthly costs

2.  …
1
I have set 2 custom cookies to be saved when user clicks a button that runs the script to save the cookies.

The issue is that I need these to be saved through HTTPS because I am using them on a store locator page, and need a secured connection to allow for location detection to happen properly.

When I do not add TRUE for secure connection and leave code as shown below, the cookies save just fine when running through HTTP.

setcookie('lat', $_POST['lat'], time()+62208000, '/', $_SERVER['HTTP_HOST']);
setcookie('lng', $_POST['lng'], time()+62208000, '/', $_SERVER['HTTP_HOST']);

Open in new window

However, when I try to add TRUE for secure connection as shown below, it does not work properly with HTTPS running:

setcookie('lat', $_POST['lat'], time()+62208000, '/', $_SERVER['HTTP_HOST'], TRUE);
setcookie('lng', $_POST['lng'], time()+62208000, '/', $_SERVER['HTTP_HOST'], TRUE);

Open in new window


I have tried including httponly as either TRUE or FALSE as well, but nothing seems to have worked.

If anyone could give any tip about getting this resolved, I would appreciate it!

Thank you!
0
I have a Wordpress site that I need to disable the hyperlinks for a specific section on the homepage. Basically, I do not want to show the detail page.

The site: https://www.secc-chicago.org/
The section: Neighborhood Business Development Center area on the home page

Links I need disabled:
City Services
Business Operations
Consumer Outreach
Sourcing Suppliers
Business Workshops
Marketing Assistance
Financial Resources
Special Events

If its relevant, the section is created by Services within Wordpress
Screen-Shot-2018-12-31-at-8.04.22-PM.png
Screen-Shot-2018-12-31-at-8.09.58-PM.png
0
We are using LayerSlider WP (Word Press site). See attached. Is there a way to make a part (like using HTML map) to be a link to another page?

I assume the field URL will link the WHOLE slide. Or can I link a part/
2019_sa_slide.JPG
0
Become a Certified Penetration Testing Engineer
LVL 12
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.

Hi Guys, we have a Google tag in place thats supposed to be displaying a page takeover here on https://nova.ie its not displaying correctly so i am trying to add a static image (attached ) so it can appear properly for now, i was wondering what is the best way to add it?
0
I managed to run docker and install wordpress on ubuntu linux but can't seem to get the handle how I can edit the files within the dock as I get permission issues.
I think I am looking at it the wrong way about,
Could somone get me thinking the right way because  I love the performance for local development :).
(PHP ,Wordpress,MYSQL on NGINX).
0
I would like to update fields in an existing group the custom fields in WordPress more quickly  in a "BATCH form" did anyone here mange to do it without messing up.
for example I want to start with adding extra text fields to an existing group,
Maybe MYSQL request ?
Maybe JSON request.
has anyone done this ?
0
Having trouble with some basic WP queries. Basically i have a custom taxonomy for a custom post type.

Custom Taxonomy Slug = service-tax
Custom Post Type = service
Custom Categories (slugs) = construction, landscaping

I am trying to query wp to return all posts from 'landscaping' category (making a landscaping only page). I can return the posts from the category, but how can i loop over the results so i can actually use the data? When i foreach($latests_posts as $posts) and try to access some array items my page keeps showing blank.

<?php

$args = array(
    'post_type' => 'service',
    'posts_per_page' => -1,
    'order_by' => 'ID',
    'post_status' => 'publish',
    'tax_query' => array(
        array(
            'taxonomy' => 'service-tax',
            'terms' => 'landscaping',
            'field' => 'slug'
        ),
   ),
    
    
 );

 $latest_posts = new wp_query($args);

 foreach($latest_posts as $posts){
    $post_id = $posts->ID;
    $thumbnail = get_field('service_featured_image', $post_id);
    $title = $posts->post_title();
    $url = $posts->post_name();

    echo "$post_id \n";
    echo "$thumnail \n";
    echo "$title \n";
    echo "$url \n";

//or ive trie

$title = $posts['title']; //this shows blank as well


}



?>

Open in new window



Here is my WP dump
WP_Query Object ( [query] => Array ( [post_type] => service [posts_per_page] => -1 [order_by] => ID [post_status] => publish [tax_query] => Array ( [0] => Array ( [taxonomy] => 

Open in new window

0
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
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
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
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
JavaScript Best Practices
LVL 12
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

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
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
I have a WordPress site on my domain mydomain.com.  It works fine.
I have a simple ASP.NET project that I want to publish on the same domain, but in a sub-folder: mydomain.com/data.
How do I do this?  Each of the sections of the site (the WordPress section and the ASP.NET section) has their own web.config file.  So they have to coexist properly.
If I just transfer the published files for the ASP.NET section to mydomain.com/data and I go to  mydomain.com/data/WebForm1.aspx I just get Server error 404 page not found.  
Help!
0
WORDPRESS
Genesis Child Theme: Executive Pro (ExPro)
Plugin: Design Palette Pro (DPP)
Hosting: Unix (Hostgator Shared Server)
Vocabulary Terms: Page, Slug, Category, Post (Specific meanings according to Wordpress)

BACKGROUND
My site has been using Wordpress "Pages" mostly (as opposed to Posts with their corresponding Category pages). So the navigation menu consists of only Page names (and their "slugs") as the menu links.

Now, however, I am replacing the News Page with the News Category for one of those menu items. So, I want the menu link, News, to land on the Category page by that name, not the previous Page page by that name.

Previously, the News menu item was pointing to a Page called "News" and whose "slug" (or permalink) was, "/news/".
Currently, I have renamed those slugs. The News Category "slug" is simply, "news", and I renamed the News Page slug to, "/news-page/".

QUESTION
Is it possible to insert the News Category page into the main navigation menu instead of the News Page page? Please provide instructions how to do it using DPP if possible. Otherwise, I will accept child theme code modification if necessary.

I attempted to redirect the "/news-page/" slug to "/news/" in the .htaccess, but it  does not work if the category page contains too many posts that you must go to page 2 and page 3 etc. It breaks that mechanism.

In the DPP plugin, I can't find an option to do what I want. …
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.