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

Hi there,
I have a custom XML feed, which displays all 2500 of our job posts.
for that, i have  a wordpress taxonomy created with PODS called Fleets (taxonomy=fleets)
I have 72 fleets, and all have descriptions.
How do I display the description of the current fleet?

I've tried :

Displays  -  Truck Driving Job
		
<title><![CDATA[<?php echo term_description( $post->ID, 'fleets'); ?> -  Truck Driving Job ]]></title>

Open in new window

Error:
		<title><![CDATA[<?php echo term_description( 'fleets'); ?> Truck Driving Job ]]></title>

Open in new window


Anybody know how to display correctly?

<?php
/**
* Template Name: Custom RSS Template - spthuntfeed
*/
$postCount = 500; // The number of posts to show in the feed
$cacheFile = "wp-content/themes/enfold/rsscache/spthuntfeed.rss";

if(!file_exists(dirname($cacheFile)))
{
  mkdir(dirname($cacheFile));
}

$posts_per_page = 50;
$paged = 0;
$theres_more = true;
$rss_items = array();
if(file_exists($cacheFile) && !isset($_GET["reset"]))
{
  $rss_items = json_decode(file_get_contents($cacheFile),true);
  if($rss_items == null) { $rss_items = array(); }
}

$charset = get_option( 'blog_charset' );
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . $charset, true );
?>
<?php echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>'; ?>
<source>
<title><?php bloginfo_rss( 'name' ); ?> - SmartPhoneTrucker - Hunt Transportation Job Feed</title>
<link><?php bloginfo_rss('url'); ?></link>
<description><?php 

Open in new window

0
Introduction to R
LVL 13
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Hi Experts,

I just installed reCapcha v3 on my WP site with Contact Form 7, and it in Chrome's Console I see JS Warnings, Why is this?

Until now I had Contact  Form 7 without validation, but get spam and decidedd to install reCapcha
0
Hi,

I struggle with css! There's a bit of my website layout that does not line up, and its not the end of the world, (its a minor annoyance). Ive looked a few time but never been able to work out where it's being set, this is the problem...

oops
Ref: https://www.petenetlive.com/KB/Article/0001604

where in the css is that width being set! And what do I need to change to make it line up!
0
I have a custom taxonomy which has about 3 levels, parent, child, grandchild which is visible in the URL when you drill down eg:

example.com/my-cagegory/parent/child/grandchild/

Open in new window


And then after grandchild you get to the actual post type. But, I was hoping the url would be:

example.com/my-cagegory/parent/child/grandchild/my-product

Open in new window

But instead it is:

example.com/products/my-product
So, I am losing that whole taxonomy path.

function my_post_types() {

        register_post_type('product', array(
        'supports'      => array('title', 'editor', 'thumbnail', 'excerpt'),
        'rewrite'       => array('slug' => 'products'),
        'has_archive'   => true,
        'public'        => true,
        'labels'        => array(
                'name'         => 'Products',
                'add_new_item' => 'Add New Product',
                'edit_item'    => 'Edit Product', 
                'all_items'    => 'All Products',
        ),
        'menu_icon'     => 'dashicons-cart'
    ));
}


add_action('init', 'my_post_types');

function my_product_taxonomy() {

    $labels = array(
        'name' => _x( 'Product Categories', 'taxonomy general name' ),
        'singular_name' => _x( 'Product Category', 'taxonomy singular name' ),
        'search_items' =>  __( 'Search Categories' ),
        'all_items' => __( 'All Categories' ),
        'parent_item' => __( 'Parent Category' ),
        'parent_item_colon' => __( 'Parent Category:' ),
  

Open in new window

0
Hello,

I am generating a google map using advanced custom fields, it works great except that I have a lot of French text and they used single quotes all over the place, the single quotes are breaking my google map output..

I tried wrapping my field (   the_field('street_address')     ) in esc_html(), esc_html() and  esc_attr() with no luck..

var contentString<?php echo $post->ID; ?> = '<div id="content">'+

      '<div id="siteNotice">'+

      '</div>'+

     '<h3 id="firstHeading" class="firstHeading"><?php the_title(); ?></h3>'+

      '<div id="bodyContent">'+

      '<p><b>Address:</b> <br /><?php echo the_field('street_address'); ?>, <?php echo the_field('city'); ?><br /> ' +

      '<?php echo the_field('postal_code'); ?><br><br />' +

	  '<b><a href="<?php echo the_field('website'); ?>" target="_blank">Visit website</a></b><br />' +

       '<b><span>Distance: <?php echo get_the_distance(null, 1); ?> KM </span></b><br />' +
	   
	   '</p>'+

      '</div>'+

      '</div>';

Open in new window

0
WordPress logo size...

Where can I change it?
I have a site at http://sst.realinteresting.com and I need to change the logo size. Somewhere it has been setup at 200px !important and I can't see it anywhere.
I'm also running Avada theme, and havent been able to find it there either.
0
Hello,  I'm having an issue with a vendor,  regarding post titles in an XML feed we are sending them.

The majority of the post titles are like this below.
6-Day, Chocolate Dedicated Class A Driving Job – Hannibal, MO

They (vendors) want us to eliminate the city, state from the title.  so would be just
6-Day, Chocolate Dedicated Class A Driving Job

We have over 2500 jobs, with titles like that. So, is it possible to truncate the title in the feed, so it outputs everything up to the -

Below is the template i created, and the actual feed url is here
<?php
/**
* Template Name: Custom RSS Template - sptshafferfeed
*/
$postCount = 500; // The number of posts to show in the feed
$cacheFile = "wp-content/themes/enfold/rsscache/sptshafferfeed.rss";

if(!file_exists(dirname($cacheFile)))
{
  mkdir(dirname($cacheFile));
}

$posts_per_page = 50;
$paged = 0;
$theres_more = true;
$rss_items = array();
if(file_exists($cacheFile) && !isset($_GET["reset"]))
{
  $rss_items = json_decode(file_get_contents($cacheFile),true);
  if($rss_items == null) { $rss_items = array(); }
}

$charset = get_option( 'blog_charset' );
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . $charset, true );
?>
<?php echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>'; ?>
<source>
<title><?php bloginfo_rss( 'name' ); ?> - SmartPhoneTrucker - Shaffer Trucking Job Feed</title>
<link><?php bloginfo_rss('url'); ?></link>

Open in new window

0
Hi, http://146.66.113.175/~techgard/services/operation-maintenance-and-monitoring/  and  http://146.66.113.175/~techgard/services/implementation-and-integration/

On the header section, the blue part with wording, on the first page I've changed the Elementor section so the size of the image is set to cover.

I have a lot of pages; is there a global CSS I can use to ensure they are all set to cover? Thanks.
0
I've been working on a custom WordPress site that's using the Understrap theme development framework (which is based on Bootstrap 4).  

Here is the site URL: http://dev.movingpicture.com/

Right now I'm having a problem with some overlaid image captions that I've created using custom CSS (3 different styles).  

If you have a look at to the sections with these headings, these are the image captions that I'm referring to:

1) Check out our services. Then get a quote.
2) Used by hundreds of professionals. Like you.
3) Read the case studies

These overlaid captions are displaying properly in the latest versions of Firefox, Edge, and IE11 .. but are displaying very oddly in Chrome and Opera (with the captions consistently overlapping the bottoms of the images .. in some cases making them invisible).  

Why is this happening in only Chrome and Opera?  And how can I fix my custom CSS so that these captions display consistently across the different browsers (meaning the same way they display in Firefox, Edge and IE11)?    

Although you can simply inspect the underlying source code .. here are my custom CSS snippets for the sake of convenience:

#homepage-services .vc_figure-caption {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    padding: .25em .5em;
    z-index: 2;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color:#fff;
	font-weight:bold;
	font-size:26px!important;	
}

#homepage-professionals 

Open in new window

0
http://146.66.113.175/~techgard/  on some phones (iPhone with safari browser, screenshots attached) the header and footer are messed up in mobile. On my android phone, it seems as though the site is too wide and I have to scroll to see the content... or maybe it's too narrow? Anyway, I have the theme support people looking into it, but I thought maybe someone here would have an epiphany.

Latest wordpress, using Elementor pro, theme is Gridlabs.

Thanks.
0
Introduction to Web Design
LVL 13
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

http://146.66.113.175/~techgard/  the dropdowns in the menu aren't working. If I disable elementor pro, they come back. If I enable elementor pro, the whole menu disappears, so I built a template with Elementor pro and inserted it. But now the dropdowns won't work.

I disabled most of the plugins, and no change. I didn't disable the theme, because several people are working on the site, I didn't want to mess anyone up.

Most recent version of wordpress, plugins are all up to date, I've deleted any we are not using, and our theme is Gridlabs. Any ideas? Thanks.
0
I am on a Wordpress site and I need to know how to build an accordion without using javascript.
0
we have inherited a WordPress website for one of our partner organisations for keeping the basic content up to date etc, hosted by a 3rd party - and for company policy we need to determine if the site collects IP addresses of visitors, and if so ensure there is a disclaimer detailing for what purposes. The honest answer is we don't currently know if it captures that information or not, and I am unsure where exactly to begin to check to see if it is being captured or no? Do all WP sites collect visitor IP Addresses or would it require something custom, where and in what format is it likely IP addresses of visitors would actually reside if the site does collect them? Is there anything you can do as a visitor to determine if the site is capturing your IP address? Or where would you start if unsure.

Out of interest why exactly would you want to collect the IP addresses of your site visitors, e.g. what benefit do you get from doing so and is this fairly common practice?

I have a similar question really about cookies being used on a site. I am pretty sure we don't and can see nothing to indicate we do but again how could this be verified to be 100% sure.
0
I have an image on this website http://www.henricomg.org/garden-advice/ that I have created as the logo.  Underneath the image between the bottom of the butterfly image and the navigation bar there is a thin white line.

What is the css to get rid of that white line?

I have tried negative values on margin-bottom but it still didn't work.

Thanks,
0
I don't know PHP and a website I manage is a WordPress site which has a custom made contact form that is being brute force attacked. I know how to add a captcha in ColdFusion but don't know how to do that in PHP. Does anyone know how to add a captcha in PHP that would be easy for me to implement?
0
Hi, we are redesigning https://techgardens.com at http://146.66.113.175/~techgard/

The marketer in charge is changing the site structure slightly, and I would like to know if there's a tool that, once the new site goes live, can tell us what we need to do with 301 redirects,

I have the sitemap for the old site, I'll have the structure of the new site, and I can do it by hand if need be, but is there a handy tool out there? Both site are in wordpress. We also have thousands of products on the old site that I've transferred over, but did I get them all? Unknown.

Thanks.
0
What's it called when you have you have a background picture with a transparant color with text on top? Similar to the top of this site? https://charlottediscountproperties.com/charlotte-off-market-deals
0
I had this working for custom post type called episode. But had to switch to posts.

I no longer have the term id of 173 which is why it's commented out.

Right now I'm not getting the term premium swapped out for Free once I hit the 11th post. It still says Free for the last 11 posts and if I add a new one it just keeps the Free term and not Premium.

/*Add terms to chapters */

add_action( 'save_post_episode', 'total_set_default_object_terms', 11, 2 );
function total_set_default_object_terms( $post_id, $post ) {
  if ( 'publish' === $post->post_status) {
    $position = 1;
    $args = [
      'numberposts' => -1,
      'order' 			=> 'DESC',
      'orderby' 		=> 'date',
      'post_type' 	=> 'post',
      'taxonomy' => 'episode_type',
      //'tax_query' => array(
					//array(
					//'taxonomy' => 'episode_type',
					//'field' => 'id',
					//'terms' => array( '173' ),
					//'operator' => 'NOT IN',
					//),
					//),
						];
						
						
    $posts = get_posts( $args );// query posts that are episodes in descending publish date order
    foreach($posts as $post) {
      if ($position > 10) {
        wp_set_object_terms($post->ID, 'premium', 'episode_type', false);
      }
             
      $taxonomies = get_object_taxonomies( $post->post_type );
      
      $position++;
     }
  }
}

Open in new window


Halp!
0
How would I go about hiding only the word "by" in the following block of HTML using CSS ?

<p class="author-info">

	<span> 
	
		by <span class="blue">Joe Schmoe</span> 
		
	</span>

</p>

Open in new window


I've tried the following, .. but I can't seem to get it to work:

p.author-info span { display:none; }
p.author-info span span.blue { display:block!important; }

Open in new window


What's the trick?  Is this even possible?  

Thanks,
- Yvan

p.s. Note that this is dynamically generated code within a commercial WordPress theme, .. so modifying the HTML code directly isn't really an option .. at least not without creating problems.  That's why I'm trying to use a simpler CSS based approach.
0
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 13
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

New site: http://146.66.113.175/~techgard/

Blog page listing categories: http://146.66.113.175/~techgard/blog/

Category page: http://146.66.113.175/~techgard/category/cyber-security/

Single post page: http://146.66.113.175/~techgard/capital-one-whats-in-your-network/

I want to be able to style the category page and the single post page without buying Elementor pro. We're using template Gridlabs with elementor.

Are there any great tutorials out there? Or is there a plugin that will allow me to do this easily? Thanks.
0
This portfolio plugin here is fine, but I want to customize the link on the detail button.  http://146.66.113.175/~techgard/products/

For instance, on the IX details button, instead of going to http://146.66.113.175/~techgard/portfolio/ix-systems/, I would like it to go to http://146.66.113.175/~techgard/ix-storage 

1. Can I update that in the database?
2. Or can I just do a permanent redirect with htaccess?
3. If I do, will it get overwritten if I update the plugin?
4. Any other way to do this?

Plugin is: https://wordpress.org/plugins/filterable-portfolio/ on WP 5.2.3. Thanks!
0
Hi, My boss wants this:  http://146.66.113.175/~techgard/products/  A few rows of logos, filterable by category, with a details button that leads to another page.

The problem is, all the plugins I find that do the filterable option don't allow a link to a separate page. So instead of going to:  http://146.66.113.175/~techgard/portfolio/ix-systems/ on the IX logo, she wants to go to a page of her own making: http://146.66.113.175/~techgard/ix-storage/

Maybe I'm not looking for the right kind of plugin, so I thought I'd ask the experts. Thanks,
0
http://146.66.113.175/~techgard/ix-storage/ What is the simplest way to make the bullets a black disc instead of these checkmarks? I see that it seems to be using an icon. Thanks!
0
Hi Experts,

When you go to https://www.aces-project.com/ you will get a SSL Mixed Content warning for the ".../2018/05/IWSC-certified-....jpg" image, but under the source I search and cannot find any image references to "http://"

Can any one spot what's going on?

Thanks.
0
Hi, I want to add an image box, with image to the left, then under the text have a button. But I want the button within the box, so it is aligned to the right of the photo.

What I have is this, two sections:
two-sections.JPG
But I want this, with the button in the same section:

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