Articles of link category

Latest updated categories list query, exclude one from displaying

I have this query: $cat_array = array(); $args=array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘exclude’ => ‘187’, ‘posts_per_page’ => 19, ‘caller_get_posts’=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); $cat_args=array(‘orderby’ => ‘none’); $cats = wp_get_post_terms( $post->ID , ‘category’, $cat_args); foreach($cats as $cat) { $cat_array[$cat->term_id] = $cat->term_id; […]

Blogroll links sorted by category in a table

I would like to create a blogroll page with a table where the links would be in the left table division and the description in the right division. So far, everything works… Where it becomes tricky is that I would like a table for each link category. Unfortunately, the sql table links doesn’t have a […]

Add Link Category on Activation?

Is it possible to add a link category on plugin activation? What I mean is the Links section, as you know by default it has the Blogroll link category. I want to add a new link category when my plugin is activated, is there a quick and easy way to do this? What is the […]

Why is it so hard to show the URL of the current category and how to do it?

If I’m on a singular page, it is quite easy to show the current post URL outside the loop: the_permalink(); If I am on a category page it is quite simple to show the category description outside the loop: category_description(); Unless I’m missing something, it is not equally easy to show the current category URL […]

How to splice in wp_links links into the loop?

I want to create a loop where 2 or 3 items from my blogroll are spliced in like this: <loop> <post1> <post2> <blogroll1> <post3> <blogroll3> </loop> I’ll be using images and excerpts for the loop, and the goal is to get the wp_links links to display EXACTLY like the wp_posts, so if I can actually […]

How to get custom posts sub category link

I’m trying to echo custom posts sub category link as a view more option.For the last week, i am trying to do that, but i just can’t find the right way. I’ve tried, category links, terms, with args, id..whatever i could think of or find here. The only way currently to show is with the […]

How to display post type and category links in foreach WordPress code

I’m displaying just post titles, and excerpt and categories on the home page of a site. I’m pulling from several different post types and I have that working correctly. But how do I display the post type and category links? Here’s the code I’m using. I’ve commented where I’d like those links to show. Here’s […]

Need category header to link to category archive list

I tried using wp_list_categories, but that just gives me a list of the categories. I currently have this code in my category-recipes.php file: <ul class=”subcats-list”> <h2 class=”subcats-title”><?php echo get_cat_name(38); ?></h2> <?php $recipes = new WP_Query(); $recipes->query(‘showposts=5&orderby=rand&cat=38&post_type=recipe’); while ($recipes->have_posts()) : $recipes->the_post(); ?> <li><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></li> <?php endwhile; ?> </ul><!– subcat –> I […]

How do I get rid of “category” from my URL structure?

By default WP links to a category like this, mydomain.com/category/travel. Having the word “category” appear in the URL seems unnecessary. I’d prefer have the link read mydomain.com/travel. How can I remove “category” from the URL structure? I don’t want to replace it with something else as I can do by entering a new Category Base […]

Query post for 'selected category' in archive.php

I’m trying to figure out how to display a ‘featured post’ on a selected category archive. My website uses the category-based navigation for different types of posts (text only post-blog, and image only gallery post), and is driven by a single custom archive.php. Homepage: http://example.com/portfoliography Auto gallery: http://example.com/portfoliography.com/automotive Architecture gallery: http://example.com/portfoliography/architecture (… and so on) […]