Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [link-category]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

i need to have a tab with gategory post

i have a custom type named gallerie i need to create a tab with category in each category show ther post . i have this code but didn't work for me ''' <section> <div class="container&...
user avatar
0 votes
1 answer
22 views

How to get the last category name of a child category?

there. I've tried tons of solutions I've found in this forum before asking this. It's kind of hard for me to understand the php sintaxe. I have no idea how to do this and i've been stuck for days ...
user avatar
  • 11
0 votes
0 answers
11 views

Show parent category wp_list_categories wordpress

For example I have 3 categories: cars, bikes, trucks The category of track has 3 subcategories (childs): man, scania, iveco I want to show on page only subcategories of track category. How can i do ...
user avatar
  • 1
0 votes
0 answers
12 views

Posts arranged by Sub Category in Category page, But not showing non Sub category items

I'm trying to create Category posts under each sub category, that's working but With out sub category items not showing... <?php $categories = get_categories('child_of='.get_queried_object()-&...
user avatar
  • 23
0 votes
1 answer
25 views

Php string not working in Wordpress Functions.php [duplicate]

How to pass the following code. <div> <?php $category = get_the_category(); ?> <a href="<?php echo get_category_link($category[0]->cat_ID); ?> "> <?...
user avatar
  • 1
0 votes
0 answers
28 views

Php string not working in Wordpress Functions.php (trying to fetch 1st category for each blog that post appears in the sidebar)

I am trying to fetch 1st category for each blog post that appears in the sidebar of any blogpost landing page. I tried multiple options to add the 2nd block code to the 1st block at the line "....
user avatar
  • 1
1 vote
1 answer
3k views

How to get category URL with the slug?

I have a variable that contains the slug of a category. With that slug I want to create a link to the archive page that displays all the posts in that specific category. What is the best or fastest ...
user avatar
0 votes
1 answer
119 views

How do i bring out post category name in my widget?

I customize the repeat post widget and add little functionalities to it. Everything is working fine but my challenge now is that the widget when used is not bringing out individual post category name. ...
user avatar
0 votes
0 answers
20 views

Showing the category hierarchy as clicked in WordPress, with image and desc

have a very weared issue, i am sure the solution is simple but i am not very used to wordpress and cant figure this out. what i have is a WordPress theme and if needed i can change it to any other ...
user avatar
1 vote
0 answers
10 views

My custom backend codes shows up when i try to view my website

I created subcategories using custom HTML tags under static content>backend editor>Text block. For some reasons when I tried to view my website. I checked on the subcategories I created and all I see ...
user avatar
  • 11
0 votes
0 answers
51 views

Linking to the most recent post in my podcast category

I am attempting to pulloff what the author did here: How can I link to the most recent post in a category? However, after updating my functions.php file in my child theme I can not get it to load the ...
user avatar
0 votes
1 answer
257 views

echo $category[0]-> cat_name; shows only one category name

I have this code: <div class="row"> <div class="col-lg-12 post_meta"> <ul> <li> <p class="meta-txt">Category</p> ...
user avatar
1 vote
1 answer
20 views

Linking products to categories

I want my WooCommerce products to be linked to proper categories. I already have categories and products. These needs to shuffle to the new linking. Please suggest the detail steps.
user avatar
1 vote
0 answers
18 views

Place category Base URL at the end

By default the Categories' URL will show like this: example.com/category/category-name/. In this case we say the category URL base is category. Wordpress allow us to customize the URL base. For ...
user avatar
0 votes
1 answer
18 views

Creating a linkable category list with post count

I am trying to create a new education site that has two types of resources, courses and informal learning. I am trying to do this without using custom post types or taxonomies. The site with use the ...
user avatar
1 vote
1 answer
1k views

Current category link filter

In my theme I have an archive template for a taxonomy (taxonomy-cat_projet.php). In this template I have a list of this taxonomies' links to allow users to select a taxonomy. Here is the code I'm ...
user avatar
  • 137
1 vote
1 answer
1k views

force category base - archive pages work WITH & WITHOUT category base slug in url?

I need any posts of any category (and archive pages) to route through /blog/. I added "blog" to my category base, but now both website.com/blog/my-category/ AND website.com/my-category/ both display ...
user avatar
0 votes
2 answers
69 views

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 ...
user avatar
  • 11
0 votes
1 answer
195 views

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 ...
user avatar
  • 846
1 vote
1 answer
264 views

Linking from Menu and a Page to the latest post from a specific category

I am trying to figure this out from similar questions asked, but I am not sure I am finding what I need. I have a utility menu and a page that should have links to go to the latest post of a specific ...
user avatar
  • 25
0 votes
1 answer
28 views

Make relation of custom taxomies

Need to make a relation of two different custom taxomonies. Example: Sport category with subcategory basketball. Just like that I have team and player taxonomy. I am looking for linking a player with ...
user avatar
0 votes
1 answer
31 views

Delete a category

I just recently deleted a category from my main menu and while the category itself has been removed, on my home page, the category title is still there. It is for the web page: IrishFilmCritic.com. ...
user avatar
1 vote
0 answers
408 views

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 ...
user avatar
  • 11
1 vote
1 answer
1k views

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....
user avatar
  • 129
0 votes
2 answers
862 views

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, '...
user avatar
  • 165
0 votes
1 answer
636 views

how to redirect the link to a category in the website

Hi Im really new to wordpress and this error is really stressing me out everytime I click a link in my category sidebar it redirects me to the homepage any idea on how to resolve this problem this is ...
user avatar
  • 1
7 votes
3 answers
93k views

How to get WooCommerce Product Category Link by ID?

WooCommerce's product categories are a custom taxonomy called product_cat. In a function I'm writing, I'm using get_categories with the taxonomy parameter set to product_cat. Everything works fine and ...
user avatar
  • 810
0 votes
1 answer
1k views

Anchor tag generates blank href attribute using echo esc_url( )

Following is my categories page. It's listing the all categories in the page. But when <a href> gets blank value here. see the attached screen shot. Why href is blank here li><a href="&...
user avatar
0 votes
1 answer
59 views

Category callback box problem

I am using Ciola theme from Theme forest and this is my site: http://www.gazetaswietojanska.org/pomorzekultury/. I have an issue concerning category callback on the homepage. As you can see, there are ...
user avatar
0 votes
1 answer
118 views

Filer taxonomy posts by current category

I have a custom taxonomy 'where' and I am using this code to get taxonomy terms on single.php <?php echo get_the_term_list( $post->ID, 'where', 'Where: ', ', ', '' ); ?> How can I customize ...
user avatar
  • 167
1 vote
1 answer
236 views

Get the name an the description of a link category

I have a link category with the id $id=23; and the slug $slug=friends;. I managed to read all links from that category using get_bookmarks($id). Now I also want to use the name and the description ob ...
user avatar
  • 191
0 votes
2 answers
2k views

How to make a metabox that contains link categories?

I'm looking for some suggestions or tutorial links about how to create a meta box that allows users to choose from a list of link categories. So far I've been looking at this post about taxonomies in ...
user avatar
  • 367
0 votes
1 answer
2k views

Outside the loop Category name with link

I want to display the category Name by using category ID with link to category page (out side the loop). here is my code... <a href="<?php get_category_link('23'); ?>"><?php echo ...
user avatar
0 votes
1 answer
416 views

Is there an API to create link categories programmatically?

I am using wp_insert_link to import a lot of links, but I have to assign the link category manually afterwards. Is there a corresponding Wordpress function to create link categories?
user avatar
  • 1
0 votes
1 answer
168 views

wp_insert_link not working

Im using this code to insert links into my blog: $linkdata = array( 'link_name' => $title, 'link_url' => $url, 'link_catetory' => 3, // my cat ...
user avatar
1 vote
1 answer
1k views

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 ...
user avatar
  • 11
1 vote
4 answers
10k views

How-to get the get_category_parents() breadcrumbs trail without link on last item

Just a question : I want to use get_category_parents() to display a breadcrumb on a category archive page, but with no link on the current displayed category (SEO purposes, because they say that's a ...
user avatar
  • 1,208
-1 votes
1 answer
5k views

Make a Custom template for a specific category in wordpress

I am having issue with a custom category template. I want to create a new template for my specific category "VIDEOS" so that all posts under this category show in new style. Basically, i want to show ...
user avatar
  • 101
1 vote
2 answers
292 views

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 ...
user avatar
0 votes
1 answer
371 views

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 ...
user avatar
  • 3,805
0 votes
2 answers
187 views

separate posts to have (kind of) 2 blogs?

Before putting a lot of effort in this, just to find out it's not possible: Let's say I have two different categories and I want the user to be locked in one of them after choosing it from a menu-...
user avatar
0 votes
1 answer
2k views

How can I display a list of categories of my posts

I have a Post Category called 'Podcasts' and under it are many other sub-categories. On a page I have titled "Podcast Categories", I would like to list all categories under the "Podcasts" category, ...
user avatar
  • 115
1 vote
1 answer
526 views

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=...
user avatar
  • 319
2 votes
1 answer
6k views

Search form with Category and Sub Category

How to create WP Search Form with Category and Sub category for illustration a search form (for search title Book=title post) With condition By Keyword, By All Category and Sub Category selected ...
user avatar
0 votes
1 answer
546 views

can I 'combine' categories as a menu item?

I have custom post type and I want to have a menu where I combine category or categories from default Wordpress post type and from my custom post type. Let's say I have these categories sport, ...
user avatar
  • 535
1 vote
3 answers
1k views

How to add classes in the wp_list_category parent link

How do I add classes in the wp_list_category , I know the wp_list_categories('title_li='); generates classes , but I want to add a class in the parent category link <ul> <li><a ...
user avatar
  • 397
0 votes
3 answers
1k views

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> ...
user avatar
  • 5,996