categories

Wordpress query posts by tag and category

。_饼干妹妹 提交于 2019-12-13 01:28:36
问题 I'm trying to create a set of WP pages with indices to all posts which have tag X as well as category Y. I found this which seems to do exactly what I want and I understand how to edit it for each index page, but I don't know where/how to use the actual code to create the index pages. global $wp_query; $args = array( 'category__and' => 'category', 'tag__in' => 'post_tag', //must use tag id for this field 'posts_per_page' => -1); //get all posts $posts = get_posts($args); foreach ($posts as

TYPO3 get category uid at FLUID template (sys_category)

雨燕双飞 提交于 2019-12-13 01:04:23
问题 I try to show my category uid or name as a class="category.uid" at my FLUID template. If I try <f:debug>{data}</f:debug> I'll see there are an output like: categories => '1' (1 chars) But how can I write the category-uid or -name into my FLUID/HTML, similar like this: <div id="container" class="{data.nav_title}"> <!-- I need the categories --> <div id="container" class="{categories.uid}"> THanks for your help. EDIT: some screenshots The info is in table sys_category title, uid, pid .. `{data}

ggplot multi-factor-level grouping for boxplot with continuous scale

不问归期 提交于 2019-12-12 21:26:59
问题 I'm trying to create a boxplot of the following data Temp<-rnorm(90,mean=100,sd=10) Yr<-sample(c("1999","2000","2005","2009","2010"),size=90,replace=TRUE) Month<-sample(c("June","July","August"),size=90,replace=TRUE) Month df<-data.frame(Temp,Month,Yr) The visual I want and its corresponding code are below: ggplot(df,aes(x=interaction(Month,Yr),y=Temp,fill=Month))+ geom_boxplot()+ xlab("Year")+ ylab("Daily Maximum Temperature") You'll notice, though, that there are a few years missing from

Nested shortcode to dynamically display woocommerce products category

∥☆過路亽.° 提交于 2019-12-12 18:02:59
问题 I am attempting to display a woocommerce product category page based on the current user role. I have created a custom function get_user_role() to get the user role and added the shortcode [user_role] to fetch this. If I use the shortcode on a page it successfully returns "administrator" so I can confirm this custom shortcode is working. I am now having trouble using this shortcode as the category slug. So what I am trying to achieve is essentially the following: [product_category category='

Legend as text alongside points for each category and with same collor

纵饮孤独 提交于 2019-12-12 13:56:59
问题 I would like to make scatter plot in R, of variables Y and X over categories Z (separated by colors) but with a special legend. Not a legend box, but for the category names to appear as texts along the points for that category, and the text be the same color as the points. Is there a way for R to do this automatically? PS: I know I this could be done "manually" adding "text()" and specifying the location and color of each category For example, I'm trying to replicate the look of this chart

Is there a place to put a category import statement so all classes see it?

时光毁灭记忆、已成空白 提交于 2019-12-12 11:13:29
问题 I have an Objective-C category of UIColor that I would like to "import" everywhere in my project. But instead of using the #import to every class that needs it I was told there was a way to set it up so all classes can see it. Anyone know how this is accomplished? Thanks in advance, Rob 回答1: Add that import to the precompiled header file (*.pch) in your project - that way it will be imported to any implementation file automatically. 来源: https://stackoverflow.com/questions/6707590/is-there-a

magento show categories on left sidebar on a page

与世无争的帅哥 提交于 2019-12-12 08:14:33
问题 I cant manage to show on a page, on the left side the categories. I selected for the page under Design - layout to 3 columns, Right side shows fine but nothing on left side. New to magento so i`m not sure in wich file in the template i have to look for. Its a custom template installed so i got so far to: app/design/frontend/default/f001/template/ but not sure now if to look under catalog or paeg folders 回答1: Go to layout Xml folder.. Blockquote /app/design/frontend/default/default/layout

PHP/Wordpress - add attribute to current category in unordered list

天涯浪子 提交于 2019-12-12 06:29:44
问题 I'm using the WooCommerce shopping cart plugin and have written my own theme with file overrides for the default WooCommerce templates, in order for more control. So I created a sidebar from scratch that lists out all the product categories. It works great: <ul class="sidebar-list"> <?php $all_categories = get_categories( 'taxonomy=product_cat&hide_empty=0&hierarchical=1' ); foreach ($all_categories as $cat) { echo '<li><a href="'. get_term_link($cat->slug, 'product_cat') .'"><span>'. $cat-

jfree chart draw image on a category plot

隐身守侯 提交于 2019-12-12 03:45:14
问题 Heyy folks I have a pretty strange requirement.I need to draw an arrow shaped image beside a stacked bar chart in a category plot .The arrow image has to be red or green depending on some pre defined condition.I just need help to find a method to draw an image outside the stacked bar on the plot using jfree chart.Please help me out with this guys .Being stuck with this for days !!!! 回答1: You could implement the CategoryAnnotation interface: plot.addAnnotation(new CategoryAnnotation(){ Image

How to show random post type and category wordpress

廉价感情. 提交于 2019-12-12 03:15:34
问题 I have a piece of code to show a random post type of specific category, it show one post but it does now show random, I wish to show a random post every single time the user refresh this page, any advice and suggestions will be greatly ppreciated. Thansk :) <?php global $post; $args = array( 'post_type'=>'topics', 'showposts'=>'1', 'cat'=> 8, 'orderby' => 'rand' ); $query = 'orderby=rand'; $my_query = new WP_Query($args);?> <?php while ($my_query->have_posts()) : $my_query->the_post();?> <a