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

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
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.

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
In March last year due to Yoast Media Bug (which caused images being indexed as a page with nothing but one image without any additional text) the traffic on my website dropped 80%!
- https://yoast.com/media-attachment-urls/

The cause of this traffic loss was identified in the end of December last year which makes almost 10 months of low traffic and thousands of indexed pages (URLs which should never be indexed) instead of hundreds (real number).

Another problem was the "forgotten" phpBB board installed on the same domain which started to have a lot of spam posts which probably contributed to additional traffic loss later in the summer.

All this made a lot of first page search result URLs virtually non-existent - they do not appear up to 5th or 10th search result pages.

Now, everything is fixed (phpBB uninstalled, sitemap has only hundreds of high quality URLs, and the unwanted URLs respond with 410 and 404 error codes) but the traffic is the same low for 3 weeks after fix already.

How long do you think it will take to recover?

And is there anything more I could do?
0
I have a Wordpress webiste with Pay Per View plugin (https://wpmupremium.com/wordpress/pay-per-view-plugin/) which shows 500 words for non-subscribers for free.

However, I want Google to index the whole blog post not just those 500 words.

Google recommends using the JSON/Scheme for that purpose in order to avoid the cloaking penalty.

Would you be able to help me - write and explain the implementation of that code to my Wordpress blog?

Here are the recommendations from Google - https://developers.google.com/search/docs/data-types/paywalled-content
0
This short article aims to teach you how to create a Docker image, as well as set up a basic LAMP Stack.
0
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
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
I need to display and image on the single product page of Woo Commerce.  However, when I use this function nothing is displaying it seems my problem is how I am referencing the image.  The image is in the media library.

add_action ('woocommerce_after_add_to_cart_button', 'display_calif', 10);

function display_calif() {

if ( has_term( 'california', 'california_temp' ) ) {
echo '<img src="/wp-content/uploads/2019/01/california.gif" />';
        }
}

Open in new window


Please tell me how to reference this image.
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
Why Diversity in Tech Matters
LVL 12
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I have a javascript button at https://www.theherbsplace.com/rebate-program/ it is found at the bottom of the page.

Here is the code
<script>
document.getElementById("order_comments").innerHTML = "I want membership";
</script>

Open in new window


<p><a class="button exclusive biz-op-button" title="I Want Membership!" href="#" data-register="true">Get My Membership</a></p>
<p class="form-row notes" id="order_comments" data-priority="">
    <label for="order_comments" class="">Order notes&nbsp;<span class="optional">(optional)</span></label>
    <span class="woocommerce-input-wrapper">
        <textarea name="order_comments" class="input-text " id="order_comments" placeholder="Notes about your order, e.g. special notes for delivery." rows="2" cols="5"></textarea>
    </span>
</p>

Open in new window


The button works fine but I need it to change colors and text on click.  This is so the customer will know their request has been logged.

I am not very strong in javascript.  I see on the net some examples but I don't know enough to fold them into what I already have working.

Thanks,
0
Hello,

I need help modifying my WordPress XML feed.   Currently, I am using the WP Job Manager plugin, and have a custom rss feed for a client.

For one of the fields,  they require only the city, but it outputs as city, state, country. see below.

<cityHiring>
<![CDATA[ Wheatland, WY, United States ]]>
</cityHiring>

Changed to this:
<cityHiring>
<![CDATA[ Wheatland ]]>
</cityHiring>

So basically i need everything after and including the first, to be removed.

In the theme code, the field has this PHP
echo $the_job_location;
				?>
		</city>

Open in new window

0
We're using WordPress for our Extranet site which is stored on servers outside of our organization.  We usually upload files to the site that users can download by clicking on a link.   Problem is every time we update a document we need to upload it again.

Is there a way to create a WP link that references a local file on our servers. ?     The computers that are accessing this site are all on our network and would have access to this location.

Thanks ….

Joel
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
Hi there, I'm trying to put a theme shortcode in my wordpress template file.

I'm getting the following error "Parse error: syntax error, unexpected 'echo' (T_ECHO) in /www/wp-content/themes/enfold/includes/loop-big6.php on line 30"

test website here
<?php
global $avia_config, $post_loop_count;

$post_loop_count= 1;
$post_class 	= "post-entry-".avia_get_the_id();



// check if we got posts to display:
if (have_posts()) :

	while (have_posts()) : the_post();
?>

		<article class='post-entry post-entry-type-page <?php echo $post_class; ?>' <?php avia_markup_helper(array('context' => 'entry')); ?>>

			<div class="entry-content-wrapper clearfix">
				
				<img class="vv" src="https://idgiyn5kp0-flywheel.netdna-ssl.com/wp-content/uploads/2018/04/CreteCarrier_OfficeBlueShirt-1500x430.jpg" alt="rr" width="100%" height="230px" />
				
				<?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 )  );
					} ?>
				<?php endif; ?>
				
				 <?php echo do_shortcode('[av_one_third first margin="0px" padding="0px" radius="0px" mobile_breaking="" mobile_display="" av_uid="av-y5kp57"] 
					 <a class="application_button 

Open in new window

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 some reports that are generated from our WordPress sales app and I'm changing the way the room selections work.

I need to know what the code below is doing, or more specifically, layman's terms of the syntax - $selected_czar_room = ($_POST['czar_room'] == 'default') ? '' : $_POST['czar_room'];

I know it's getting room info from the post and then setting a cookie and expiration, but the behavior of the cookie is different with my new room selection code that pulls the rooms dynamically from the DB instead of being hard-coded in the page. With it hard coded, the cookie "resets" if I change the room. With it selected the new way, the cookie does not reset and the report will pull from the previously selected "room".

So what is the code "saying" here - > $selected_czar_room = ($_POST['czar_room'] == 'default') ? '' : $_POST['czar_room'];
As in, set this variable ($selected_czar_room) to equal the post value of 'czar_room' ,,  and then I'm lost
I don't know what == 'default') ? '' : $_POST['czar_room']; means.

Thank you!

if ($_POST['czar_room']) {
            setcookie("ROOM_TP", ($_POST['czar_room'] == 'default') ? '' : $_POST['czar_room'], time() + 365 * 24 * 60 * 60, "/");
            $selected_czar_room = ($_POST['czar_room'] == 'default') ? '' : $_POST['czar_room'];
        } else {
            $selected_czar_room = $_COOKIE["ROOM_TP"];
        }[code]

Open in new window

[/code]
0
I am having a problem with Woocommerce new categories not showing the products.  To test what is going on I created a new category called Promotions and put one product in it.  But as you can see I am getting this message.

https://gyazo.com/305a1237d267847a67a0df6cfae84f8a

Here is the product as you can see I have Promotions ticked

https://gyazo.com/7e725a8a3c16193de3af3877a7ce08f5

When I click on Chrome Console this is what is showing up.  Unfortunately, I don't know how to correct these issues.

https://gyazo.com/1a6efa8cc5d613472413ffbe3fbfbhttps://www.experts-exchange.com/askQuestion.jsp?headerLink=ask#1c8

This is an active site and I just discovered today that categories wasn't working.  I have disconnected any new plugins since the last time I checked out an individual category.

Please help me to solve this issue.

Thanks,

Randal
0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

My client has reported a website header display issue occurring only on iPad, but I don't have an iPad and can't replicate the issue using the iPad responsive mode in Chrome dev tools. I think the main navigation menu may be wrapping down below the logo and title.

Would someone with an iPad please try to view the site (landscape and portrait) at https://www.u3ahastingsnz.org.nz and see if you can replicate the issue?

Please share the model of your iPad, and if you can replicate the issue please provide a screenshot. Thanks very much!

The navigation menu should look like this (and the menu should collapse to a mobile menu on smaller screens):
Screenshot of how the header should look
0
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
I am having trouble finding out how to do routing with PHP.

I know WordPress and Laravel use it, but I was wondering how to code it.

I realize it would use Apache mod rewrite, but I'm having trouble figuring out how to do routing without a framework in PHP.
1
Does following a podcast normally require you to create a new podcast?

I host my podcast at PodBean, and generally feel like I made a good decision. I assume after I get some traffic, I could consider hosting on my WordPress site...we'll see.

For now, I have given my Podbean URL on a business card to over a hundred people who were really interested in following me. But, according to Podbean, none has shown up as a follower.

The thing abut Podbean, to follow a podcast, you need to create your own podcast. And I fear this is scaring away so many people that otherwise would follow my podcast.

What do you know about hosting my podcast differently so that to follow, you simply click follow. This lack of engagement may be seriously killing my podcast. I mean people tat were really engaged, who got scared away when they were forced to create a podcast.

I distribute on iTunes, Google Play, Youtube, and soon other sites as well.

Have you ever heard of this? I wold consider switching, simply over this requirement. I am stunned that no one has followed my podcast, considering I have given my business card to over a hundred people who saw my presentation and were amazed.

Thoughts?

Thanks
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

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.