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'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
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
Hi,

I transfered a WordPress website from one provider to another using a backup/restore plugin.

Everything is working except some dropdown list buttons.

I checked the console and found some errors
Error.png
I am new to wordpress. any suggestions would be helpful
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
From a high level: I am trying to create a function in my child theme that replaces the one from the parent theme.

More details: In Wordpress, I am trying to replace this function:
if ( ! function_exists( 'presscore_get_category_list' ) ) :

Open in new window

from my theme's (The7 theme) helper.php file with a modified one that I am placing in the same location, just in the child theme:
 dt-the7-child\inc\helper.php

My function is being ignored when the page renders.  Inside my helpers.php file, I'm only including the function I am trying to overwrite.  Is there something special I need to do to get it to recognize my custom function?

Thank you!
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
Hi Experts

We are running two Wordpress Websites on a Windows Server 2012 with IIS Version 8 and the DIVI Builder in Wordpress.
Sadly i've two major Problems which i could not fix yet:

1.)
When i Switch the Wordpress Permalinks from "Plain" to "Post Name" or "Custom",  the Website is no longer available from outside (Error: "ERR_TO_MANY_REDIRECTS).
This Problem concerns only the Front Page, all other sites / sub-sites are displayed correctly.

I tried nearly everything:
- deactivated all plugins
- "Extension=openssl" in php.ini is ON (Need to enable that for plugin updates), tried also to switch that off again
- dns entry on domain Provider: "www.xyz.com -> our IP
- Wordpress URL: http:/www.xyz.com
- Here the web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
                  <rule name="WordPress: http://www.xyz.com" 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>


2.)
When i upload a new Image to the Wordpress media library, it shows me the picture inkl. thumbnail. When i then integrate the picture somewhere on a site, it doesnt Display the Image. After reassigning the rights to …
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
Hi Experts,
I am new to wordpress but I had someone built a site for me in which did a so so job and I need to fix the links that are wrong.
I am trying to fix some mistakes on the pictures on the main page and can't modify the links on Pages-> Element-> Image Frame--> Pick link URL--> change the URL and I can't save or cancel and I have to refresh to page to go back to the editor.I have tried in Chrome and Edge, and have the same issue. I am running Avada and I see Avada child as active.

Please advice
0
I have deploy wordpress multiple site on google app engine and now i want to change uploads folder of WP  as google bucket folder where i can upload media.

I have created google Bucket with name of media-wordpress

Assign All Users write permission

but the following error I am getting  .

Error : Unable to create directory gs://media-wordpress/. Is its parent directory writable by the server?

So what extra permission I have to give to google bucket for my WP website so can use the bucket for uploads.

IS there any solution where we can manage media of WP on app engine .

Note: google app engine files permission cant be change.


Sam
0
My Wordpress Admin pages are really slow,  Especially inside of my WooCommerce store when I search for a product.  It can take up to a minute and a half to return a product searched for.  The DB is pretty big but I think there is more going on here that can be fixed or at least be sped up.  Any suggestions?
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
hi
i have a woocommerce shop page with a price slider, and i have a materialize slider. there is a conflict between them that i do not know how to fix.
if i remove the price filter widget the materialize slider works just like it works in other pages.
but once the price filter widget is there, the materialize slider javascript doesn't work.
so i looked at the html and it seem that the price filter widget inject css classes and a span element.
this is the materialize slider html when the price widget is removed, this works:
correct materialize slider
this is the materialize slider with the price widget enabled:
materialize slider with the price widget
and this is the woocommerce price filter widget html:
woocommerce price filter widget
i have no idea why the there is a conflict and how to fix it.

best regards
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 want to create a shortcode with attributes for url and (link) text.

So the code

<a class="btn btn-lg btn-primary" role="button" href="http://example.com">Link Text</a>
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
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
hello together,

currently i try to implement a php formular to my wordpress site.

I want to build up a small movie database which is just available in my network.
The code worked fine if i open it up directly from my browser.
	<?php
// error_reporting(E_ALL);
error_reporting(0);
$db = new mysqli('localhost', 'xxxxxx', 'xxxx', 'filmdatenbank');
print_r ($db->connect_error);

if ($db->connect_errno) {
    die('Sorry - gerade gibt es ein Problem');
}
if (isset($_GET['aktion']) and $_GET['aktion']=='loeschen') {
    if (isset($_GET['filme_id'])) {
        $filme_id = (INT) $_GET['filme_id'];
        if ($filme_id > 0)
        {
            $loeschen = $db->prepare("DELETE FROM filme WHERE filme_id=(?) LIMIT 1");
            $loeschen->bind_param('i', $filme_id);
            if ($loeschen->execute()) {
                echo "<p>Datensatz wurde gelöscht</p>";
            }
        }       
    }
}
if (isset($_POST['aktion']) and $_POST['aktion']=='korrigieren') {
    echo "<h1>korrigieren der Daten";
    $upd_filme_id = "";
    if (isset($_POST['filme_id'])) {
        $upd_filme_id = (INT) trim($_POST['filme_id']);
    }
    $upd_filmname = "";
    if (isset($_POST['filmname'])) {
        $upd_filmname = trim($_POST['filmname']);
    }
    $upd_format = "";
    if (isset($_POST['format'])) {
        $upd_format = trim($_POST['format']);
    }
    $upd_trailer = "";
    if (isset($_POST['trailer'])) {
        $upd_trailer = trim($_POST['trailer']);
    }
    if ( 

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 need to confirm that whether my following website uses any cookies? It is developed in Wordpress.  I need to update the privacy policy according to the new laws.

http://fmtl.co.uk/

Open in new window


Please check it for both Logged-in(admin, editors etc) and normal users.

Waiting for some expert opinion.

Thanks
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

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.