How to display the number articles with the same tag inside specific category

I am trying to display the tags that are inside of a specific category. I have this working properly but now I want to show the count next to each tag showing how many articles are in that tag. i.e


I have something that is very close but the problem is that if I have two tags inside a category let’s say apples and oranges, both will show (2), because there are 2 tags in that category in general. I want it to show how many of each tag, like Apples(1), Oranges(2) Here is my code:

 <?php   query_posts('category_name=Health');    if (have_posts()) : while (have_posts()) : the_post();     if( get_the_tag_list() ){         echo get_the_tag_list(); echo"(";echo $  wp_query->found_posts;echo")"; echo '<br>';     }     endwhile; endif;     wp_reset_query(); ?> 

Many thanks in advance.

peace of code hidden inside stegano image [closed]

I’m trying to decipher a stegano file, a jpg image. I am new to so pleace dont get mad if my question seems to be a simple one.

I friend of mine send me a jpg image. I have tried steghide to unhide the hidden file without any luck. My password guesses seem to keep failing.

An other approach was one I found on youtube.

Here I do not seem to get further then the first few steps where this man finds the (binairy) string he uses to decypher. In my case there is a large string at the end of the file but its hidden, which means I can not see the characters used but still seem to be able to copy and paste this peace. When I use python to decypher this string it says that there is a "^" placed inside it. Now I can not follow the method in the youtube clip either.

Can somebody help me out here?

Shortcodes not processing inside post content

I have shortcodes inside my post_content in a custom post type wordpress. But when I echo the post content, all the shortcodes are not getting applied.

What I’ve tried so far:

$  post = get_post(post_id, OBJECT); echo apply_filters('the_content', $  post->post_content); 

I’ve also applied the do_shortcode() function but that also doesn’t process the shortcodes. I’ve already applied most of the solutions present on this platform but no luck. Any help would be highly appreciated.

Thanks & Regards

Call procedure inside procedure using dynamic sql modifying the parameters getting passed

I have to call a procedure inside a procedure and replace all single quotes inside the parameter to double quotes. Ex: When i call my original proc begin data(10,’"push’s the data"’);end; It throws error due to single quote and i cannot change the string manually at runtime by adding double quote like push”s. I tried replacing inside procedure but probably because the string is passed first it wont take changes.

I wish to call this procedure inside another and using maybe dynamic sql replace single quotes with double.

Something like this:

create procedure dynamic_proc begin execute immediate ‘begin data(id,’||’replace(string,CHR39,CHR39||CHR39)’ AS string)’||’ end;’ end;

So basically the parameter string which is being passed in procedure data needs to have all single quote replace with double at run time.

issue with if/elseif in_array inside foreach loop display only one post

I try to attribute a specific background-color to each post if one of categories of post corresponding to one category. My function works but is restricted to display only one post in result. If I delete this function, all post are displayed.

More informations : On my page I have buttons to filter posts by category. if I click on once I display all post for this category. But each post contains several categories. I have selected some categories to attribute a background colors for each posts, but theses categories are different of the filters buttons.

WordPress display this error "a critical error has occurred on your site, Learn more about debugging WordPress." after the first post displayed.

here is my entire code :

<?php  add_action('wp_ajax_nopriv_filter', 'filter_ajax'); add_action('wp_ajax_filter','filter_ajax');  function filter_ajax(){  $  category = $  _POST['category'];  $  argsf = array(     'post_type' => 'post',     'posts_per_page' => -1,     'order' => 'ASC' );  if(isset($  category)){     $  argsf['category__in'] = array($  category); }  $  postsf = get_posts($  argsf);      if (!empty($  postsf)) {     foreach ($  postsf as $  post) {                  $  link_post = get_permalink( $  post->ID );         $  image_post = get_the_post_thumbnail_url( $  post->ID, $  size = 'large' );         $  item1 = get_post_meta($  post->ID, 'item1', true);         $  item2 = get_post_meta($  post->ID, 'item2', true);         $  item3 = get_post_meta($  post->ID, 'item3', true);         $  item4 = get_post_meta($  post->ID, 'item4', true);         $  title = get_the_title($  post->ID);          $  post_slug = $  post->post_name;         $  cats_post = wp_get_post_categories( $  post->ID );                  function test($  cats_post){             if (in_array("14", $  cats_post)){ echo'#710000';}             elseif(in_array("5", $  cats_post)){ echo'#0a005d';}             elseif(in_array("16", $  cats_post)){ echo'#65a0e8';}             elseif(in_array("13", $  cats_post)){ echo'#90744b';}         }      ?>   <div class="shop w-24 pb-1" style="height:320px; min-width:320px;">     <div class="w-100 h-100 p-2">                      <div class=" " style="background-color:<?php test($  cats_post); ?>">             <div class="">                 <!--<div class="" title="Locer">                 <a href="<?= $  item2; ?>"><i class="icofont-opposite "></i></a>                 </div>-->                 <div class="" title="something">                     <a href="tel:<?= $  item3; ?>"><i class="im im-phone"></i> </a>                 </div>                 <div class="">                     <span><?= $  item1; ?></span>                 </div>              </div>             <span class="text-uppercase col-white tsh332 fwlr text-center" style="font-size:2rem;">                 <?= $  title; ?>             </span>             <?php if ( metadata_exists( 'post', $  post->ID , 'item4' ) ){ ?>                  <div class="">                     <div class="b-yellow b-100">                         <span><?= $  item4; ?> </span>                     </div>                 </div>             <?php } ?>         </div>                      </div> </div> <?php  }  /* fin foreach */     }  /* fin if  */ wp_reset_postdata(); die(); } 


I tried that but it doesn’t work :

  • get_the_category instead of wp_get_post_categories
  • has_item instead of in_array

I don’t know If I must use an other foreach loop and how !


Virus / malware stored inside database

I have a small network of several Windows 10 machines (all protected by BitDefender 2020 Total Security), one of which acts as server with Firebird database.

For some time the database is deteriorating – in some random records some fields have altered values. I completly changed the server machine for a brand new with fresh Windows 10 installation and antivirus, on which the database was recreated from GBK archive. The primary machine was carefully check for RAM errors (with MemTest86) and SSD errors (CrystalDiskInfo and ADATA SSD ToolBox) – everything was in 100% fine.

I don’t have no suspicions other than that the server was hacked, but it looks like an alleged malware / virus must move inside database (even packed GBK archive), because only GBK file was moved to new machine (on verified pendrive).

Is it even possible that the virus is stored inside the database (e.g. in the form of stored procedures, etc.) and it transfers with GBK archive? If so, how to detect and remove it from database?

(Firebird database is stored in the form of single FDB file, which was scanned by BitDefender without any results)

Can malicious applications running inside a docker container still be harmful?

I am very new to docker (and don’t usually program at a ‘systems’ level). I will be working on an open source project with complete strangers over the web over the next couple of months. I trust them, but I like to not have to trust people (meant in the best possible way).

I would like to know, if I download various repositories from github or elsewhere, and run them inside a docker container, is it possible for them to cause harm to my laptop in any way?

In case it’s relevant, the repositories will mostly be web applications (think django, node), and will likely use databases (postgres etc), and otherwise operate as regular locally hosted web applications. It is possible (like anything from github or the world wide web), that some apps could contain malicious code. I am curious to know if running such an app (containing malicious code) inside a docker container prevents that code from harming anything outside of the docker container (i.e. my laptop)?