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 foolishly edited one of the plugins in my WordPress site and now I can't even log in to my admin account. When I do, this error message comes up on a white screen:

Parse error: syntax error, unexpected 'GitHub' (T_STRING) in /home/pilipian/public_html/tajanlangit.com/wp-content/plugins/bp-registration-options/includes/core.php on line 696

What do I do?
0
This code is in my archive.php page, however it is showing the entire article rather than an excerpt:

query_posts('showposts=10&post_status=future');
while ( have_posts() ) : the_post();
	get_template_part( 'template-parts/content', get_post_format() );
endwhile;

Open in new window


I assume the reason is that I am overriding the original loop? How can I make this code display the excerpt only?

Thanks.
0
I'm having trouble getting this to work here: http://jwilson.staging.wpengine.com/properties/2012-camelia-2/
When you click the green request info button on the right, a form pops up in the middle of the screen, but it's displaying behind the gallery slideshow so you can't fill out the form.
0
I am using the following code to run a query based on drop down selections from custom taxonomies in a custom post.

The query is sending correctly to the page, however, the results are not displaying and I cannot figure out how to change the line of code that is creating the conflict.  Here is the code.

<?php 

$list = array();

$item = array();

foreach($_POST as $key => $value){

if($value != ''){

$item['taxonomy'] = htmlspecialchars($key);

$item['terms'] = htmlspecialchars($value);

$item['field'] = 'slug';

$list[] = $item;

}

}

$cleanArray = array_merge(array('relation' => 'AND'), $list);


$args['post_type'] = 'small-groups';

$args['showposts'] = 9;

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

$args['paged'] = $paged;

$args['tax_query'] = $cleanArray;

$the_query = new WP_Query( $args );

 print_r($cleanArray);
?>
<?php echo ($the_query->found_posts > 0) ? '<h3 class="foundPosts">' . $the_query->found_posts. ' listings found</h3>' : '<h3 class="foundPosts">We found no results</h3>';?>

<?php while ( $the_query->have_posts() ) : $the_query->the_post();?>

<?php the_title(); ?><br />

<?php endwhile; wp_reset_postdata();?>

<div class="row page-navigation">

<?php next_posts_link('« Older Entries', $the_query->max_num_pages) ?>

<?php previous_posts_link('Newer Entries »') ?>

</div>

Open in new window


The line causing the conflict is:

$cleanArray = array_merge(array('relation' => 'AND'), $list);

Since i do not have posts that satisfy all the items in the selection.  I have changed "AND" to "OR" but that still doesn't work as desired.

Is there a way I can update that line of code to get posts that match any of the criteria listed?
0
I am creating a plugin to search custom posts.  I have everything working as I'd like it to build the posts, add Taxonomies, Create Dropdowns by Taxonomies and create a form to filter results.

I am using add_shortcode to allow the user to put the form where they'd like it on their site.

I'd like to add another shortcode to list the results on a page the user can create.  

My question is: What do i set as the form action on the search page to get the info to the results template file?

For Example, here's my plugin files:

main page -
plugin styles.css
plugin-functions.php
search-finder.php - creates the form and shortcode to display the form in theme [lg_search]
finder-results.php - this is the page that displays the results, where the form action should point. [lg_results]

any direction is appreciated!
0
Hi Experts,We are Using the_event calendar function free edition . But we need to customize the plugin as displaying the day only when the events occurred. How can we do that ?

Link: https://wordpress.org/plugins/the-events-calendar/
0
I thought that WordPress servers were forced to GMT, but when I execute

 $month = current_time( 'm' );
 $day = current_time( 'd' );
 $hour = current_time( 'H' );
 echo "<br />$month $day $hour";

Open in new window

in California Jan 8 at 7:05PM the echo displays  1 8 19, which is my time.  I expected 8 hours later, or  1 9 3.   Does anyone know what's going on?

Thanks
0
I have my site in wordpress, mysql and some php programming.
How to move it easily to another server ?
0
Hi Experts,

I cant understand the function the_post  in WordPress documentation . The document states that function used  for
Iterate the post index in the loop.

. But the_title() function also retrieve the title . Is title and index are different and I hope index here refers to Array index . I.e that rite ?

if (have_posts()) :
   while (have_posts()) :
      the_post();
the_title();
         the_content();
   endwhile;
endif;

Open in new window

0
I'd like to put a printer icon on one of my pages and have it bring up the normal Ctrl-P Windows dialog, or the equivalent if your on a Mac, when it's clicked.  Does anyone know how to do that?

Thanks
0
I tried to edit a few websites in bulk using CMS Commander, but now all the sites are down, and i cannot seem to get them back up. All sites have the same error in the log

http://truckingjobsnebraska.com/
http://cretepaysdrivers.com/

i get the following in var/log/httpd/v2.4/error-log
Thu Jan 05 16:38:16.464804 2017] [:error] [pid 30886:tid 140133861459712] [client 64.74.98.118:32988] PHP Warning:  array_keys() expects parameter 1 to be array, string given in /data01/httpd/v2.4/htdocs/truckingjobsnebraska.com/wp-includes/class-wp-roles.php on line 126, referer: http://truckingjobsnebraska.com/wp-cron.php?doing_wp_cron=1483634296.3119308948516845703125
[Thu Jan 05 16:38:16.464825 2017] [:error] [pid 30886:tid 140133861459712] [client 64.74.98.118:32988] PHP Warning:  Invalid argument supplied for foreach() in /data01/httpd/v2.4/htdocs/truckingjobsnebraska.com/wp-includes/class-wp-roles.php on line 126, referer: http://truckingjobsnebraska.com/wp-cron.php?doing_wp_cron=1483634296.3119308948516845703125
[Thu Jan 05 16:38:16.473892 2017] [:error] [pid 30886:tid 140133861459712] [client 64.74.98.118:32988] PHP Fatal error:  Cannot unset string offsets in /data01/httpd/v2.4/htdocs/truckingjobsnebraska.com/wp-includes/widgets.php on line 1141, referer: http://truckingjobsnebraska.com/wp-cron.php?doing_wp_cron=1483634296.3119308948516845703125
[Thu Jan 05 16:38:16.487235 2017] [:error] [pid 30886:tid 140133735053056] [client 162.40.73.2:58546] PHP Fatal error:  Cannot 

Open in new window

0
I have two pages, these are custom pages in a WordPress app, I don;t think that matter for this issue.

Code for page 1:
<form method="POST" action="https://www.rain1.com/review-and-pay/" name="st">
								<input type="hidden" name="recommend" value="<? print $_GET['recommend']; ?>">
								<input type="hidden" name="basic" value="<? print $_GET['basic']; ?>">
								<input type="hidden" name="lawna" value="<? print $_GET['lawna']; ?>">
								<input type="hidden" name="zip" value="<? print $_GET['zip']; ?>">
                            We offer two service plans that provide you with hassle-free maintenance of your system all season long:
							<br><br>
							<ul>
								<li><b>Bronze Plus plan:</b>  includes system start-up, mid-summer check-up and winterization. Cost for Season <b> $<? print number_format($_GET['recommend'],2); ?></b>&nbsp;&nbsp;<b><span style="font-size: 18px;">Choose Plan</span></b>&nbsp;<input type="radio" name="plan" value="r" checked><br><br></li>
								<li><b>Bronze plan:</b>  includes system start-up, and winterization.  Cost for Season <b>$<? print number_format($_GET['basic'],2); ?></b>&nbsp;&nbsp;<b><span style="font-size: 18px;">Choose Plan</span></b>&nbsp;<input type="radio" name="plan" value="b"><br><br></li>  
							</ul>
							<h5><b>Description of Services Available</b></h5><br>	
							<b>Backflow testing / certification.</b>   Annually required backflow inspection to ensure the device is up to code, submit form and 

Open in new window

0
Hi there. I am running a WordPress Multi-site and need to change the url on a logo on only 1 site. I am using the following but I think I have it wrong:

<?php 
					
					 if (isset($_GET['url']) && $_GET['url'] === 'http://domain.org')
{
echo "<a href="https://otherdomain.org"><?php FLTheme::logo(); ?></a>";
{
	
	else
	
echo "<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php FLTheme::logo(); ?></a>";
		
}
}

?>

Open in new window


Any ideas experts?
0
I am trying to build a custom form design to look like the form at the url below:

https://lifegroups.life.church/

I am using Wordpress and created a custom post type that we'd like to query by.

I think I understand how to get the information populated into the drop down items, but I am a bit lost at how to get everything to layout like the example below.

Any advice or direction is appreciated!
0
Hi Experts,


We have created a customized WordPress signup form in a page template. But when I hit the submission button the form is not submitting and I can't confirm the form submission is working. whenever I echoed back it's not showing. please see the below code


<?php

 /* Template Name:  signup-couple*/
global $current_user;
get_currentuserinfo();

  if (isset($_POST['submit']) {
    # code...
  
echo "am here";
$name = $_POST['name'];
$password = $_POST['password'];
$email = $_POST['email'];
$date = $_POST['date'];

echo $name;

if (($name != '') && ($password != '') && ($email != '')) {
    // TODO: Do more rigorous validation on the submitted data

    // TODO: Generate a better login (or ask the user for it)
    //$login = $firstname . $lastname;

    // TODO: Generate a better password (or ask the user for it)
    //$password = '123';

    // TODO: Ask the user for an e-mail address
    //$email = 'test@example.com';

    // Create the WordPress User object with the basic required information
    $user_id = wp_create_user($name, $password, $email);

    if (!$user_id || is_wp_error($user_id)) {
       // TODO: Display an error message and don't proceed.
      echo "<Script>alert('something went wrong');</script>";
    }

    // $userinfo = array(
    //    'ID' => $user_id,
    //    'date' => $firstname,
    //    'last_name' => $lastname,
    // );

    // Update the WordPress User object with first and last name.
    //wp_update_user($userinfo);

Open in new window

0
I have a website in which I use the Cherry Framework wordpress carousel slider.  When I change the size of the resolution of my screen, my carousel gets squished and only shows 2 posts instead of 3. The website is www.lakecountywebsites.com/thebarbery. I just want the carousel to look the same on any resolution of screen. I have attached what the website looks like in 1920x1080 and 1280x720 screenshots. I also use the static area builder with cherry. I have the slider set at 300x200 but it keeps making the slider 500+ px.
website1.PNG
Website2.PNG
0
I have this web.config for wordpress in Windos 2008 R2 server:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules><rule name="Main Rule" stopProcessing="true"><match url=".*"/><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/></conditions><action type="Rewrite" url="index.php"/></rule>
			<rule name="WordPress: http://www.mysite.com/blog" patternSyntax="Wildcard">
				<match url="*"/>
					<conditions>
						<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
					</conditions>
				<action type="Rewrite" url="index.php"/>
			</rule></rules>
    </rewrite>
  </system.webServer>
</configuration>

Open in new window


However if I call a PNG file for example or JPG like http://www.mysite.com/blog/test.png 
I have the error "is currently unable to handle this request." If I delete the web.config works perfect what can be modified to that web.config to accept that or not block files needlessly? Of course the www.mysite.com is an example is not real.
0
Learning more about managing Wordpress and websites as we go along.  Finding something new that we are concerned is hampering us with SERP rankings.  Analytics reports are listing many 301 redirects for pages that somehow are rooted to our websites, but certainly are not our pages.  Here is a sample of the 1300+ pages in the list;

tps://cqcash.com/mytracker-2.2.0.​1       301      7
https://cqcash.com/qda-miner-3.2.4       301      7
https://cqcash.com/skatour-0.1.2       301      7
https://cqcash.com/twedge-2.4.1.152​89       301      7
https://cqcash.com/barcode-scanner-​1.0       301      6
https://cqcash.com/stealthmailmaste​r-5.2       301      6
https://cqcash.com/visual-hindsight​-home-edition-2.2.0.421       301      6
https://cqcash.com/ypops-0.9.7.3       301      6
http://cqcash.com/namegenerator       301      5
https://cqcash.com/a-pdf-ppt-to-vid​eo-1.5       301      5
https://cqcash.com/ant-advanced-net​-tools-professional-edition-2.7       301      5
https://cqcash.com/bsp-map-compiler​-0.4       301      5
https://cqcash.com/frosty       301      5
https://cqcash.com/ganymede3d-regul​ar-2       301      5
https://cqcash.com/glamourgirl       301      5
https://cqcash.com/googletoolbar-5.​1       301      5
https://cqcash.com/minmaxextender-1​.0.1.0 

If I paste just the page desciption (ex-minmaxextender) into my address bar, usually seems to go to search results page of sites that wants you to download something.   These usually end up being 404 pages.  We do employ a 404 to 301 redirect plugin that lands back to our site, so we don't lose the user (right?), but do the popular search engines …
0
Hi Experts,

We need to create a WordPress login function based on the html template . I tried with the wp_login function . But i cant customize  html structure  to match it for template
0
Greetings. I am trying to make a link go from one page to the next, in WordPress. This should be simple, right? But instead, the link (see below) tries unsuccessfully to open a popup window. And I don't want a popup window, I just want it to go to a new page!

The page URL is: http://www.tildet.com/free-webinar-clarity-key-three-alignments-optimal-well-being-success

There is a plugin installed on this site called "PopupAlly", but it is not Activated (I checked that). Is it possibly a bug causing a popup? Or is there some default behavior that can cause a popup to occur automatically without coding it? Someone else has a popup coded on another page, in case we want to activate the popup feature in the future, so I don't want to uninstall the plugin unless that is essential.

Here is the link code that is causing the popup: <a href="http://www.tildet.com/free-webinar-signup-form"><img src="http://www.tildet.com/wp-content/uploads/2017/01/Register-Now-Button.jpg" style="border:none"></a>

Thanks.
0
I have a WordPress website with custom tables that I store data into that was entered by customers. The site owner wants to develop a barcode app that can  access this data.  When I need the data from these fields to display within the site,  I request it from a PHP script running on the server that make calls like
get_post_meta()

Open in new window

The owner has hired a mobile app consultant who believes that, if he just has the password to the account where the site is hosted,  he can access all of these database fields from the app.

 I'm not seeing how this is possible. My understanding is that a mobile app can only access a site by making HTTP requests to it. It has no way of running on the server and executing things  like
get_post_meta()

Open in new window

  Am I missing something?

Thanks
0
I have created a test Wordpress  (v4.7) site on a local PC via WAMP Server 3.0.6.

I want to share the site with the other devices on the LAN.
From what I can gather, there are 2 steps to this (1. changing in WP, 2. Changing in WAMP Server).

First part is changing in WP. I have assigned a static IP on my local PC & changed the site path from http://localhost/wordpress to http://new static ip address/wordpress.

after doing this, I am unable to access the site via either new or old path (until I change it back to localhost in phpmyadmin).
0
Hi,

I´ve a wordpress  blog we´d like to move to office 365 sharepoint.

Is there any tool to do this?

regards
0
I know you can disable certain Main Menu items through the Appearance option but I want to disable the entire Main Menu for a certain page: no links at all.  Is there a simple way to do  this?

Thanks
0
Hi Experts,

Am Developing a WordPress theme and some jquery code throws the error when the page loads and the same code works when copy paste in a console window. Any reason on this

Jquery Error
Error
Same code Works on console
Working code
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.