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

Trying to embed a gif from giphy into a WordPress blog post. This is the iFrame embed code:
<div style="width:100%;height:0;padding-bottom:57%;position:relative;"><iframe src="https://giphy.com/embed/x5cF4iGNh0QA8" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p><a href="https://giphy.com/gifs/x5cF4iGNh0QA8">via GIPHY</a></p>

Whenever I add it to the draft and preview the blog post, it shows up as the code, not as the gif.

Also tried downloading the gif, but on giphy I can only download it as an HTML file that won't upload to WordPress, or an MP4 file and the progress bar of that diminishes the effect of the animation.

Attached photo shows the screen shot preview of the code and the MP4 file.
Capture.PNG
0
Cloud Class® Course: Microsoft Azure 2017
LVL 12
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

I need to upload a Wordpress theme and I am getting the message that I am exceeding the max_filesize.  I have change php.in, restarted Apache and still I get the same error.

These are the settings I have changed:

upload_max_filesize=122M
post_max_size=168M
memory_limit=512M
file_uploads = On
max_execution_time=290

Open in new window


Please tell me what to fix.

Thanks,

Randal
0
Hello, I have inherited a Wordpress website made by someone else. I'm more of a web designer, where my predecessor was most of a coder I guess.
Anyway, the guy is totally off the grid, so I thought I'd ask here.

There is a singular page causing an error, based on a particular template. There is a different template for every page and the only one not working is this one.

You can see the error on this test website (don't mind the missing images or anything else, just the php):

www.example.com [redacted original source]

So, the fatal error is:
 Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE) in /var/www/html/test.ilgufoblu/medusahotel/wp-content/themes/in4theme/page-personale.php on line 52

Open in new window


I can't understand how this can happen, since other templates have the very same structure and end with an endwhile too. The templates load header.php before anything else, then they have their own code, then they end like this.

This is the template giving the error:
<?php
/**
 * Template Name: Lista Personale
 * 
 * Personale
 *
 * @subpackage Template
 */
global $Site;
get_header();
?>
<div id="main" class="container" role="main">

    <section id="main-content" class="list-personale">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

            <div class="hero-head padded">
                <h2><?php the_title(); ?></h2>
                <?php echo get_field('descrizione') ?>
            </div>

            <div 

Open in new window

0
I've purchased a Wordpress plugin from a developer "Sprout Invoices".  The plugin features are supposed to integrate with WooCommerce by:

1.  Pulling in WooCommece products on the "Add Invoice" page to add to an invoice via line item.
2.  Allow the customer to view the invoice and checkout via WooCommerce.  However, I get this error in the WooCommerce Shopping Cart:
Sorry, this product cannot be purchased.


I've notified the developer in hopes for some solutions.  I was told my products must have some "restrictions" on them and that the cart error was a WooCommerce issue, not his plugin.  I know better than this, but I really just want the plugin to WORK properly.  I'm guessing they haven't updated it since the last WooCommerce update.

I've created a fresh new install of Wordpress in a new folder and installed WooCommerce and the Sprout Invoice plugin. The same issues are present.  Is there something I can check or is anyone willing to take a look for me...possibly look at the code/plugin?

Ty
0
I have a curl error 77
Update Failed: Download failed. cURL error 77: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

Open in new window

whenever I try to update my plugins in wordpress.

The site is www.thefrugallife.com

I have an Apache 2.4 instance running Linux 2 from Amazon.

I have recently moved the site and switched it to https.  My site certificate is showing it gets a B on SSL Labs using ipv4.

I can't update anything on the site till this error goes away.  Please let me know how to get rid of that error.

Thanks,
0
I need some help with the below code.  I have a custom XML feed. Originally the feed was showing the contents of <drivertype> as a html link.  So got the code below to strip out the the hyperlink.

A problem i'm noticing now though, is <drivertype> can in a few instances have 2 values (i.e Comapny and Team).  When they show up in the feed they are being displayed like this :

<drivertype>
<![CDATA[
Company<a href="https://cretecarrier.com/?taxonomy=job_listing_category&#038;term=team" rel="tag">Team
]]>
</drivertype>

Open in new window


how could i modify the below code, so that if the contents has 2 values, it will display like Comapny, Team. Or something similar, just so it's it's not broken. <ul><li>Company</li>li>Team</li></ul>


link to the feed
<?php
	$mystr=get_the_term_list( $post->ID, 'job_listing_category');
	$temp=strpos($mystr,">");
	$drivertype=str_replace("</a>","",substr($mystr,$temp+1));
?>
    <drivertype><![CDATA[<?php echo $drivertype; ?>]]></drivertype>

Open in new window

0
I need to get into a test server that that has woocommerce on it.  Originally it had an ssl cert but now it doesn't.  I keep getting this error in Firefox 61.

https://gyazo.com/3b19eaf25cdab4273cfe1432217cce3a

I have tried this in other browsers too and get a similar result.  I have access to the db and I have removed the https from the site url and the home link.  I have deleted the cookies corresponding to the url I am using to access the dashboard.

Searching wp_options for ssl I get these rows - https://gyazo.com/7abe7622428cf1c648f5bab0a4d4773f

I did use Really Simple SSL as a plugin but don't know how to turn if off with access to the dashboard.

I just need to get into the dashboard and check some settings.  Can anyone help me get into my dashboard?
0
I need to center the language dropdown field in the footer over mobile on this site https://ccdenver.org/ but it's not working. Any ideas?
0
I'm trying to get the name of my custom taxonomy to display inside my RSS feed.


I've managed to display it, but it displays it as a hyperlink, i just want to output the name and that's it.

This is what is displaying
<drivertype>
<![CDATA[
<a href="http://cretecarrier-070618.local/blog/fleet-type/dedicated/" rel="tag">Dedicated</a>
]]>
</drivertype>

Open in new window


This is the code im using
<drivertype><![CDATA[<?php echo get_the_term_list( $post->ID, 'fleet_type') ?>]]></drivertype>

Open in new window


Just want it to display, "Dedicated" or "Regional" or "OTR".
0
I'm trying to get an xml feed to work.  The following code below works, but is pulling in normal posts.  I want to only pull a custom post type called "job_listings'. How would i modify this script, so it will only pull "job_listings" ?

<?php
/**
 * Template Name: Custom AllTruckJobs RSS Template - cretefeed
 */
 
$limitCount = 7; // The posts limit to show
$posts = query_posts('showposts=' . $limitCount);


// Setting up content type and charset headers 
header('Content-Type: '.feed_content_type('rss-http').';charset='.get_option('blog_charset'), true);

// Setting up valid XML encoding
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
?> 

<!-- Declaring XML Validators namespaces -->
<rss version="2.0"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:wfw="http://wellformedweb.org/CommentAPI/"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:atom="http://www.w3.org/2005/Atom"
        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
        xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
        <?php do_action('rss2_ns'); ?>>
<!-- Declaring channel with articles data --> 
<?php $dateTimeFormat = 'D, M d Y H:i:s'; ?>
<channel>
        <title><?php bloginfo_rss('name'); ?> - Feed</title>
        <link><?php bloginfo_rss('url') ?></link>
        <description><?php bloginfo_rss('description') ?></description>
        <lastBuildDate><?php echo mysql2date($dateTimeFormat, 

Open in new window

0
Cloud Class® Course: C++ 11 Fundamentals
LVL 12
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Hi
I like the dark net being a philosophy of specialized software to access secret functionality. My friends and I need a private document editing environment

Are most Darknet sites done in Wordpress, with secret logins? I read it's specialized software.
If the hegemon wanted to access my site, would they just use brute force?
If I make my own software, I can do multiple access attempts lockdowns. Can Wordpress restrict multiple access?
Would a PHP site fulfill this specialized software need?
We just need a login page that goes to a document editing/comment system. where I can give my friends unique login info for. It is for a project development colab
Ideas? Thanks
0
I had someone design the website and I needed to fix some issues, I don't much of wordpress design and I wanted to disable google maps from my website, I found where to disable it and I just noticed that my other pictures on all pages aren't loading and missing. How could I go back or check if some else made changes? and how to fix this issuenot loading picturesAs you can see on this picture there should be more pictures but aren't there.

Please advise
0
Hi Experts,

How to backup a wordpress website? Back up everything

Thanks
0
I have a category page for sales https://www.theherbsplace.com/product-category/on-sale/ and I need to have the sales listed via product name rather than alphabetical.  For example, I have $2 OFF Aloe Vera, Buy 5 Aloe Vera and a Buy 9 Aloe Vera all with unique sku's.  That's how I would like for them to be sorted but now they are being sorted between other products strictly by the first letter.

https://gyazo.com/debb7bb6186fed2ce3f32b1c0cbd941e

In the above screenshot the middle product Aloe Vera Gel should not be between the 2 Aloe Vera, Whole Leafs.
0
I have inherited a WrdPress web site that uses Yoast SEO.

I am unable (so far) to figure out how to add key words & phrases to increase our visibility to people looking for us, but not knowing us by name.

Is there full docs available on-line that covers this?

Thanks
0
Plugin wont activate.  I just moved a website from one host to another.  Same PHP version 7.  I have a plugin that worked on the old site but now does not want to activate on the new site.  Maybe I need a new license?  Does the following error give any clues on what might be the issue?

<?php

Fatal error: Uncaught Error: [] operator not supported for strings in/public_html/wp-content/plugins/revslider/includes/framework/base-admin.class.php:71
 Stack trace:
#0 public_html/wp-content/plugins/revslider/admin/revslider-admin.class.php(572): RevSliderBaseAdmin::addMetaBox('Revolution Slid...', '', Array, NULL) 
#1 /public_html/wp-content/plugins/revslider/admin/revslider-admin.class.php(73): RevSliderAdmin->addSliderMetaBox() 
#2 public_html/wp-content/plugins/revslider/admin/revslider-admin.class.php(44): RevSliderAdmin->init() 
#3 public_html/wp-content/plugins/revslider/revslider.php(164): RevSliderAdmin->__construct('/home/tlgwp/pub...') 
#4 /public_html/wp-admin/includes/plugin.php(1897): include('/home/tlgwp/pub...')
 #5 /public_html/wp-admin/plugins.php(172): plugin_sandbox_scrape('revslider/revsl...') 
#6 {main} thrown in/public_html/wp-content/plugins/revslider/includes/framework/base-admin.class.php on line 71

Open in new window


https://www.themepunch.com/ It is the Rev Slider
0
This is a continuation of question https://www.experts-exchange.com/questions/29106953/Need-Wordpress-jQuery-To-Load-After-Ajax.html

The routine works for the shipping value #_shipping_method_0_132643.  The problem is that UPS has different tiers and each time the rate number changes.  The next numbers are #shipping_method_0_132615, #shipping_method_0_132639, #shipping_method_0_132642, #shipping_method_0_132640 and #shipping_method_0_132641.

It seems the line of code to change is
function doPOCheck ()
  {
    // Only proceed if we UPS is checked
   if ($('#shipping_method_0_132643').is(':checked') ) {   ##################### Change this one

 if ($('#ship-to-different-address-checkbox').is(':checked')) {
        ad1 = $('#shipping_address_1').val();
        ad2 = $('#shipping_address_2').val();
      }
      else {
        ad1 = $('#billing_address_1').val();
        ad2 = $('#billing_address_2').val();
      }
      if (hasPOBox(ad1, ad2)) {


showPoError();

  }

      else {
        hidePoError();
      }
    }
        else {
          hidePoError();
        }
  }

Open in new window


I have tried what I thought would work and it didn't.
if ($('#shipping_method_0_132643').is(':checked') ) || ($('#shipping_method_0_132615').is(':checked') ){

Open in new window


Please tell me how to get the function to check all the shipping numbers listed.

Thanks,
0
I have a jquery that needs to be setup as a delegated event.  Or, in other words to load after ajax is finished.  This is beyond my abilities.  I did find this article but i don't know how to implement what they are suggesting since I am very new to jquery.  Here is the article - https://learn.jquery.com/events/event-delegation/

My site isn't live yet so I have restricted access to it.  If you need to see the site I will need your IP to whitelist you.  The more particulars and a screenshot of the site is on this question - https://www.experts-exchange.com/questions/29106720/Need-Jquery-Fixed-To-Post-Shipping-Message.html#a42609003

I understand if you don't want to give your IP just give me the code to test and I will insert it.  Because this is wordpress I don't; want to hack the wordpress core files.

<script>
jQuery(function($) {
  // CHECK FOR UPS OPTION CHANGE
  $('body').on('change', '[name="shipping_method[0]"]', doPOCheck);

  // CHECK FOR ANY CHANGES TO ADDRESS OR SHIPPING CHECKBOX
  $('#billing_address_1,#billing_address_2,#shipping_address_1,#shipping_address_2,#ship-to-different-address-checkbox').change(doPOCheck);

  // THIS IS THE WORKHORSE  
  function doPOCheck ()
  {
    // Only proceed if we UPS is checked
    if ($('#shipping_method_0_132643').is(':checked') ) {

      // IF THE SHIPPING CHECKBOX IS CHECKED WE WANT THE SHIPPING
      // ADDRESSES OTHERWISE THE BILLING ADDRESSES
      if ($('#ship-to-different-address-checkbox').is(':checked'))

Open in new window

0
I have a website that was built using GoDaddy's Website Builder.  I'm not a techie, and was always happy that when I had a problem editing my website I could call GoDaddy.  Last year they switched me over to WordPress, ostensibly because it's "easier and better".  Now when I have a problem I have nobody to call :(.  I followed the instructions for how to edit text on my website, but can't get anything to work.   How can I get technical support?

Thanks,

Phil
0
Get expert help—faster!
LVL 12
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

This is a screenshot of my site that isn't live yet.  Because it isn't live, I will need your IP number to be whitelisted before you can access the site.  Just pm me your ip number if you are interested.  Because the site isn't live and I pay by the hour it isn't on all the time.  So, if you can let me know when you can look at  it I will make sure the site is turned on.

https://gyazo.com/a01ccbb27bf6eb9a73e2127d01e505fb

This is my jquery that isn't producing the result it is supposed to produce.

<?php
/**
 * The template for displaying the footer.
 *
 * @package flatsome
 */

global $flatsome_opt;
?>

</main><!-- #main -->

<footer id="footer" class="footer-wrapper">

        <?php do_action('flatsome_footer'); ?>

</footer><!-- .footer-wrapper -->

</div><!-- #wrapper -->

<?php wp_footer(); ?>

<script>
jQuery(document).ready(function(){
        jQuery(document).on('click','#shipping_method_0_132643',function(){
                if(hasPobox()){
                        showPoError();
                }
        });

        jQuery(document).on('blur','#shipping_address_1',function(){
                if(hasPobox() && jQuery('#shipping_method_0_132643').is(':checked')){
                        showPoError();
                }else{
                        hidePoError();
                }
        });
 jQuery(document).on('blur','#shipping_address_2',function(){
                if(hasPobox() && jQuery('#shipping_method_0_132643').is(':checked')){
                    

Open in new window

0
Wordpress Options How to count the number a serialized data in a field?

I have an options field that contains a long list of UPC codes:
a:9998:{i:1;s:12:"704817558463";i:2;s:12:"704817558470";i:3;s:12:"704817558487";i:4;s:12:"704817558494";i:5;s:12:"704817558500";i:6;s:12:"704817558517";i:7;s:12:"704817558524";i:8;s:12:"704817558531";i:9;s:12: ETC.....

I want to query that field and count how many UPC's are in the serialized field but I'm not certain how to:
What I have but obviously does not work.  The i is obviously the count but I don't know how to get at it.
All I really need to grab is  the number after a because that is the count. (a:9998:)

 global $post, $wpdb;
     global $post, $wpdb;
  
        $query = $wpdb->get_results("SELECT option_value FROM wp_options WHERE option_name = 'tlg_upcs'");
         foreach($query as $row) {
             //echo $row['a'];
         }
           var_dump($row);
            

Open in new window


The var_dump returns:
object(stdClass)#6576 (1) { ["option_value"]=> string(268848) "a:9998:{i:1;s:12:"704817558463";i:2;s:12:"704817558470";i:3;s:12:"704817558487";i:4;s:12:"704817558494";i:5;s:12:"704817558500";i:6;s:12:"704817558517";i:7;s:12:"704817558524";i:8;s:12:"704817558531";i:9;s:12:"704817558548"
0
I am trying to get a jQuery autocomplete working in WordPress.

Here is the code to enque my scripts

function add_jquery() {
	wp_enqueue_script('jquery');
}

add_action( 'wp_enqueue_scripts', 'add_jquery' );

function add_jquery_ui() {
	wp_enqueue_script( 'jquery-ui-autocomplete' );
}

add_action('wp_enqueue_scripts', 'add_jquery_ui');

function theme_js() {

	wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'));
	wp_enqueue_script('rates', get_template_directory_uri() . '/js/rates.js', array('jquery', 'jquery-ui-autocomplete'));
	wp_localize_script( 'rates', 'rates', array(
		'autocomplete' => get_template_directory_uri() . '/selections.php'
	) );
}

add_action( 'wp_enqueue_scripts', 'theme_js');

Open in new window


Here is my selections.php, which populates the autocomplete values

<?php
	require 'db.php';
//streets
$term = $_GET['term'];
$query = "SELECT streets.street_name, grouping.grouping_name FROM streets INNER JOIN grouping ON streets.street_name LIKE '%$term%' AND streets.grouping_id = grouping.grouping_id ORDER BY streets.street_name ASC";
$street_set = $db->query($query);

//subdivisions
$query = "SELECT subdivisions.subdivision_name, grouping.grouping_name FROM subdivisions INNER JOIN grouping ON subdivisions.subdivision_name LIKE '%$term%' AND subdivisions.grouping_id = grouping.grouping_id ORDER BY subdivisions.subdivision_name ASC ";
$subdivision_set = $db->query($query);
$json_array = array();

//streets
while ($streets = $street_set->fetch_assoc()) {
	$array = array ('label' => $streets['street_name'], 'value' => $streets['grouping_name']);
	$json_array[] = $array;
}
//subdivisions
while ($subdivisions = $subdivision_set->fetch_assoc()) {
	$array = array('label' => $subdivisions['subdivision_name'], 'value' => $subdivisions['grouping_name']);
	$json_array[] = $array;
}

$json_data = json_encode($json_array);

echo $json_data;

Open in new window


Here is my jQuery

(function($) {
  let grouping;
  let disappear = {'border' : 'none'};
  $('#rates-input').autocomplete({
    source: rates.autocomplete,
    select: function( event, ui ) {
      grouping = ui.item.value;
      if (event.type === 'click')
        grouping = ui.item.value;
      grouping = encodeURIComponent(grouping);
      $.ajax({
        type: "GET",
        url: '../js/retrieve_html.php',
        data: 'grouping_name=' + grouping,
        success: function(data) {
          $('#rates').css(disappear).html(data);
        }

      });
    },

  });
})(jQuery);

Open in new window



In the console I am getting no errors. console.log(rates.autcomplete); gives me the url of the file (selections.php).
0
Current version of Wordpress and current version of WooCommerce.
At some point, our sub plugin was disabled and subs kept working on paypal.
Eventually, some have now become out of sync.
Is there some way of syncing WooCommerce subscriptions back up with Paypal?
0
I have this code that worked a few months back on a test site.  I am now bringing my live site up slowly and wanting to put this jquery in the woocommerce footer.php location it worked on before at the test site.  I can see the code in the source code but it doesn't seem to be firing.

The server isn't left on till the site goes live so if you need to see it in action pm me and I can turn it on for you to see.

Here is the entire code in footer.php which is in the child theme.

This code is supposed to produce a message if a PO Box is used and UPS is selected for shipping on the checkout page.

<?php
/**
 * The template for displaying the footer.
 *
 * @package flatsome
 */

global $flatsome_opt;
?>

</main><!-- #main -->

<footer id="footer" class="footer-wrapper">

        <?php do_action('flatsome_footer'); ?>

</footer><!-- .footer-wrapper -->

</div><!-- #wrapper -->

<?php wp_footer(); ?>

<script>
jQuery(document).ready(function(){
        jQuery(document).on('click','#shipping_method_0_132643',function(){
                if(hasPobox()){
                        showPoError();
                }
        });

        jQuery(document).on('blur','#shipping_address_1',function(){
                if(hasPobox() && jQuery('#shipping_method_0_132643').is(':checked')){
                        showPoError();
                }else{
                        hidePoError();
                }
        });
 jQuery(document).on('blur','#shipping_address_2',function(){
       

Open in new window

0
how can I secure my website so only my IP address can make any changes on the server, I was thinking with htacess file. It is a Wordpress site.

I have seen features like this on nexcess,net websites, but I am one bluehost which doesn't have it
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.