Questions tagged [link-category]
The link-category tag has no usage guidance.
46
questions
0
votes
0
answers
9
views
How to set the permalink of category is example.com/cat_id?
The default permalink of wordpress category is example.com/category/cat_name, how to set the permalink of category is example.com/cat_id ?
0
votes
1
answer
48
views
Custom EndPoint not working when strip child category in URL
I have created a custom endpoint for Download page with Permalink setting:
/%category%/%postname%/
The URL as below:
domain.com/top-category/child-category/post-slug/download
function themes_download(...
0
votes
1
answer
27
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 ...
0
votes
1
answer
32
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); ?> ">
<?...
0
votes
0
answers
30
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 "....
1
vote
1
answer
6k
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 ...
0
votes
1
answer
188
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. ...
0
votes
0
answers
25
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 ...
1
vote
0
answers
16
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 ...
0
votes
0
answers
54
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 ...
0
votes
1
answer
940
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>
...
1
vote
1
answer
21
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.
1
vote
0
answers
25
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 ...
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 ...
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 ...
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 ...
0
votes
2
answers
77
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 ...
0
votes
1
answer
204
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 ...
1
vote
1
answer
353
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 ...
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 ...
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.
...
1
vote
0
answers
508
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 ...
1
vote
1
answer
2k
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....
0
votes
2
answers
876
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,
'...
-1
votes
1
answer
642
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 ...
7
votes
4
answers
97k
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 ...
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="&...
0
votes
1
answer
61
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 ...
0
votes
1
answer
120
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 ...
1
vote
1
answer
242
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 ...
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 ...
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 ...
0
votes
1
answer
420
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?
0
votes
1
answer
176
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 ...
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 ...
1
vote
4
answers
11k
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 ...
-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 ...
1
vote
2
answers
298
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 ...
0
votes
1
answer
372
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 ...
0
votes
2
answers
188
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-...
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, ...
1
vote
1
answer
531
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=...
2
votes
1
answer
7k
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
...
0
votes
1
answer
557
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, ...
1
vote
3
answers
2k
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 ...
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> ...