Code is not executing, instead is showing on website

My client provided me with code from to place a seal on their website showing they are verified. When I add this code, instead of executing, it just displays the code on the website.

I’ve tried several things:

  • Added to the Footer widget as HTML code.
  • Added to a single page
  • Added to the Insert Headers and Footers plugin

Each time it displays the code instead of running it.

<!-- (c) 2005, 2021. Authorize.Net is a registered trademark of CyberSource Corporation --> <div class="AuthorizeNetSeal"> <script type="text/javascript" language="javascript">var ANS_customer_id="caa26252-4f62-466a-b951-026e00a3c1ed";</script> <script type="text/javascript" language="javascript" src="//"></script> </div> 

Do you see anything wrong with the code that may be preventing it to run properly? Is there somewhere else I should place this code for it to execute?

Screenshot shows how the website is displaying the code. The correct action is for it to only show the image as a link. When clicked it opens a popup showing verification.

enter image description here

How Discord picks the author name and the url from a WordPress post?

When I haven’t setup any Open Graph Meta Tags, how the Discord picks the author name (admin) and the author url from a post?

enter image description here

I have spent several hours to find this and nothing found. I inspected the code of the post and there is nothing about the author data in the source code.

Only one place found is in feed. But I don’t think that the Discord is picking this from feed.

Anyone have an idea about th

Installed WordPress without configuration screen

Is there a way install WordPress without configuring it manually on configuration screen?

For example, by providing configurations in configuration file?

I’m talking about configuration as code fashion. Once webserver and db is up, WordPress is already configured using configuration file settings.

So, WordPress admin page is immediately will be available after raising up the webserver.

How/where do I edit product box structure?

I am working on my custom woo theme, and i want to change the structure of the product box in the product loop. I found that the “

    ” and “

” are in loop -start and -end files, but how do I change the inside html?

I could find individual components like price, title, etc, but I want to move the add to cart button inside the “.woocommerce-LoopProduct-link”, now i have this structure:

<ul class="products columns-4"> <li class="product"> <a class="woocommerce-LoopProduct-link">...</a> <a class="add_to_cart_button">...</a> </li> </ul> 

I tried to search the documentation and couldn’t find anything useful.

My Custom Post Type AJAX Query is Returning no posts – why?

When I run this query on posts_type => "posts" it works just fine. But when I add my custom post type ‘post_type’ => ‘case-studies’, I get no results.

The custom post type has a custom taxonomy set up of ‘case_study_categories’. Can anyone spot what is wrong? I’ve been looking at this for 3 hours and just don’t understand why it isn’t working.


<?php  function ajax_filter_posts_scripts() {   // Enqueue script   wp_enqueue_script('afp_script', get_template_directory_uri() . '/js/ajax/filter-posts.js', array('jquery'), null, false);    wp_localize_script( 'afp_script', 'afp_vars', array(         'afp_nonce' => wp_create_nonce( 'afp_nonce' ), // Create nonce which we later will use to verify AJAX request         'afp_ajax_url' => admin_url( 'admin-ajax.php' ),       )   ); } add_action('wp_enqueue_scripts', 'ajax_filter_posts_scripts', 100);  // Script for getting posts function ajax_filter_get_posts() {    // Verify nonce   if( !isset( $  _POST['afp_nonce'] ) || !wp_verify_nonce( $  _POST['afp_nonce'], 'afp_nonce' ) )     die('Permission denied');    $  data = $  _POST['data'];   $  taxonomy = $  data['taxonomy'];   $  posts_per_page = $  data['posts_per_page'];      $  args = array(     'post_type' => 'case-studies',     'posts_per_page' => $  posts_per_page, );    // If taxonomy is not set, remove key from array and get all posts   if( $  taxonomy ) {     $  args['category_name'] = $  taxonomy;   }    $  query = new WP_Query( $  args );   $  max = $  query->max_num_pages;?>    <?php if ( $  query->have_posts() ) :      // Used to count the posts and compare to max to hide and show load more button;     $  index = 1;      while ( $  query->have_posts() ) : $  query->the_post();       $  index++;       $  featured_img_url_medium = get_the_post_thumbnail_url(get_the_ID(),'medium_large');       $  id = get_the_ID();       $  category = get_the_category();       $  category_name = $  category[0]->cat_name;?>       <a href="<?= get_permalink(); ?>" title="Read - <?php the_title(); ?>" class="dynamic-blogs__card card">         <div class="news-image-container">           <div class="hover-read-more">             <div class="text">               <i class="fal fa-chevron-circle-right"></i>               <p>Read Now</p>             </div>           </div>           <img class="card-image lazy" src="<?= $  featured_img_url_medium; ?>" alt="<?php the_title(); ?>" loading="lazy">         </div>          <div class="card-text-container">           <?php if( $  category_name ) {             echo '<p class="card-category">' . $  category_name . '</p>';           } ?>           <?= the_title('<h3 class="">', '</h3>'); ?>         </div>       </a><!-- Card END -->      <?php endwhile; ?>     <?php if($  index <= $  max ): ?>       <div class="dynamic-blogs__load-more py">         <div class="btn -ghost js-tax-filter" number="12">Load More</div>       </div>     <?php endif;  ?>   <?php else: ?>     <h2>No posts found</h2>   <?php endif;    die(); }  add_action('wp_ajax_filter_posts', 'ajax_filter_get_posts'); add_action('wp_ajax_nopriv_filter_posts', 'ajax_filter_get_posts');  ?>  

Filter orders by modify date

I’m trying to add a new filter that will sort orders by modification date. Below is the code I found and modified. Unfortunately, filtering doesn’t work, returns zero results.I think the problem is with $ filter_id

function get_filter_shop_order_meta( $  domain = 'woocommerce' ){     // Add below the metakey / label pairs to filter orders     return [         'last_modified' => __('Recently updated', $  domain)     ]; }   add_action( 'restrict_manage_posts', 'display_admin_shop_order_by_meta_filter' ); function display_admin_shop_order_by_meta_filter(){     global $  pagenow, $  typenow;      if( 'shop_order' === $  typenow && 'edit.php' === $  pagenow ) {         $  domain    = 'woocommerce';         $  filter_id = 'filter_shop_order_by_meta';         $  current   = isset($  _GET[$  filter_id])? $  _GET[$  filter_id] : '';          echo '<select name="'.$  filter_id.'">         <option value="">' . __('Sort by…', $  domain) . '</option>';          $  options = get_filter_shop_order_meta( $  domain );          foreach ( $  options as $  key => $  label ) {             printf( '<option value="%s"%s>%s</option>', $  key,                  $  key === $  current ? '" selected="selected"' : '', $  label );         }         echo '</select>';     } }   add_filter( 'request', 'process_admin_shop_order_marketing_by_meta', 99 ); function process_admin_shop_order_marketing_by_meta( $  vars ) {     global $  pagenow, $  typenow;          $  filter_id = 'filter_shop_order_by_meta';      if ( $  pagenow == 'edit.php' && 'shop_order' === $  typenow      && isset( $  _GET[$  filter_id] ) && ! empty($  _GET[$  filter_id]) ) {         $  vars['meta_key']   = $  _GET[$  filter_id];         $  vars['orderby']    = 'ASC';     }     return $  vars; }   add_filter( 'woocommerce_shop_order_search_fields', 'shop_order_meta_search_fields', 10, 1 ); function shop_order_meta_search_fields( $  meta_keys ){     foreach ( get_filter_shop_order_meta() as $  meta_key => $  label ) {         $  meta_keys[] = $  meta_key;     }     return $  meta_keys; } 

I will be grateful for your help.

Automatically Add Tags Taxonomy in Post from Custom field’s value

I want to automatically add my ACF custom fields value as a tags when i publish/save the post.

First Tag:

My ACF Custom field’s id is: app_name

I want to add "Download Free app_name Latest Version" as a tags automatically after publishing the post.

Second Tag:

My ACF Custom field’s id is: app_dev

I want to add "Get app_name By app_dev from Here" as a tags automatically after publishing the post.

Styling a category link

I am still learning but I wasnt able to style a category link. I was able to create the following so only 1 category link is displayed. But I was unsure how I can modify this so I can add a class and style it. Is anyone able to help?

            <?php               // category link    $  categories = get_the_category();         if ( ! empty( $  categories ) ) { echo '<a href="' . esc_url( get_category_link( $  categories[0]->term_id )        ) . '">' . esc_html( $  categories[0]->name ) . '</a>';       }     // category link          ?> 

Change Header Image on Blog Post for Mobile View

I need to use a different header image for a specific blog post.

I have tried different CSS variations, but to no avail.

@media (max-width: 767px) {   .post-id-41012 .page-banner bg {     background-image: url('') !important;   } } 

Thank you in advance for any suggestions.