exclude post according to assigned category WordPress

I have this code that shows the most viewed publications, I would like to exclude the entries assigned to a specific category, for example the ID of the category I want to exclude is "4"

  <div style="text-align:center;margin-top:4px">          <?php $  my_query = new WP_Query('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=6&ignore_sticky_posts=1'); while ($  my_query->have_posts()) : $  my_query->the_post(); $  do_not_duplicate = $  post->ID; ?>         <div class="recomend-posts">         <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?> (<?php $  values = get_post_custom_values("Year"); echo $  values[0]; ?>) online">             <?php if ( has_post_thumbnail() ) {?>                 <?php the_post_thumbnail('index-thumbnail');?>             <?php }else{ ?>                 <img src="<?php bloginfo('template_url');?>/images/no-image.jpg" alt="<?php the_title();?>" />             <?php }?>         </a>     </div>         <?php endwhile; wp_reset_query(); ?>         </div> 

any ideas? thanks

H2 On Blog/Article Page Gets Assigned a Class

This question is for a WordPress website that uses a custom theme.

When I add an H2 to a blog, I noticed there is a spacing issue. I inspected the page and for some reason H2s on blog/article pages get assigned their own class (.searchresults h2).

enter image description here

This does not happen for other headings such as H1, H3, etc…

I am not sure where the “searchresults” class came from, so I don’t want to make custom changes to the “.searchresults h2” element style.

I have thought about adding a new element style to the custom css section, such as: “.searchresults single-post h2”, but not sure if that is the best approach or would even work.

A user on Stack Exchange suggested using Javascript that will revert the searchresults h2 to h2.

[... document.querySelectorAll('h2.searchresults')].forEach((heading2) => {  heading2.classList.remove('searchresults');  }); 

Is it possible to use a function to achieve this?

Any suggestions on how to resolve this issue?

How to solve following tree problem with number assigned to each node?

I have a tree whose nodes have numbers assigned to them initially. A series of $ Q$ queries are asked from $ n=0$ to $ n=Q-1$ seconds. During end of each second numbers on a node (which are not leaf) are removed and gets transferred to each direct child node. Numbers on leaf node remain as it is and number coming from parent gets added to them. At each query it is possible that new number is added to a node. How to solve this efficiently?

Example: Suppose I have a tree 1—–2——3——-4 (1 is parent). Suppose at beginning numbers on nodes are 1, 2, 3, 4 respectively. Then at…

At zero second end 5 is added to node zero. At end of 0 seconds numbers on node are 5, 1, 2, 7. (Note 1 is not added to 5 because it is removed).

At one second end, 1 is added to node 4, then numbers are 0, 5, 1, 10. Fourth node has number 10 since it received 2 from parent node and 1 is added and 7 was present on it.

Now suppose at two second end, I am asked to tell number on 2nd node?Answer is 0.

I mean that in each query either a number can be added on a node or a question can be asked like – what is number on $ ith$ node?
How to solve this in less than $ O(nQ)$ . Where $ n$ is number of nodes and $ Q$ is number of queries?

In the Absalom Initiation, should PC’s be assigned quests from all 4 districts?

The Absalom Initiative as a replayable Pathfinder Society adventure. The players start off at a party where:


This is fine and all, but:

This will be the first Pathfinder Society event I have GM’d. Is there something I am missing in the adventure? If not, how should I handle this situation?

Synchronizing Outlook Calendar Categories with a Sharepoint calendar using email address assigned to SP calendar

I have a SharePoint calendar configured with an incoming email and want to populate events with categories in the SharePoint calendar by sending events from Outlook to SharePoint. I have the same categories in Outlook and in the SharePoint calendar.

When I enter in Outlook an event with a category directly in the SharePoint calendar connected to Outlook, then the category is correctly updated in the calendar on SharePoint.
However, when I create an event with the same category in Outlook using my Outlook Exchange Account and send the event to the SharePoint calendar’s incoming email address, then the event in SharePoint does not contain the category.

Has anyone been able to get this to work or has suggestions for workarounds using the incoming email feature?

We are using Outlook 2013 and Sharepoint 2013.

Getting Errors and have to re add user to members group in order to be able to “contribute” to the task assigned to her

Good day,

Recently we been having issues with one user account specific in our environment, when the workflow assign a task to this specific user she receive the email but cannot interact with the task as it says (this site has not been shared with you).

This has been happening to this user only and all the others 1000+ are fine. To fix this issue I normally have to remove the user from the members group and re add her and then she is able to interact with the task.

I opened ULS Viewer and found errors in the log file regarding UPN and account not being found.

SPSecurityContext: Could not retrieve a valid windows identity for username ‘domain\username’ with UPN ‘firstname.lastname@domain.ca’. UPN is required when Kerberos constrained delegation is used. Exception: System.ServiceModel.FaultException1[System.ServiceModel.ExceptionDetail]: WTS0003: The caller is not authorized to access the service. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.UnauthorizedAccessException: WTS0003: The caller is not authorized to access the service.
at Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity)
at Microsoft.IdentityModel.WindowsTokenService.S4UServiceContract.PerformLogon(Func
1 logonOperation, Int32 pid)
at SyncInvokeUpnLogon(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet))..

And in a separate line

No windows identity for Domain\username.

Also the Claim to Windows Token Service is started

I check AD Users and Computers and the UPN match what there, also double check the account has claim base authentication. Now every time a task comes in for this user I have to re assign permissions.

Anyone can help would be greatly appreciated.


Can I book a Schengen Visa for Germany to a different consulate if the consulates assigned for my state do not have appointments?

I am non-resident alien (not a permanent resident) residing in Seattle, Washington, USA.

The German consulate assigned for my state is San Fransisco. The earliest available appointment is 2.5 months away.

However, I need to make a business trip to Germany in 2 months. My wife will be accompanying me on a tourist Visa.

I was able to book an appointment in Washington DC 1 month away. However, I do not want to fly from Seattle to Washington DC to be rejected due to this.

Has anyone does this before? What can I do to make sure my appointment is either not cancelled or the application rejected due to this.

I am also open to traveling to another country for a longer duration since my business trip is only for 2 days. Will Germany be considered my main destination since I am applying for a business Visa there, or can I apply to another country as a main destination, if I stay there longer?