1
vote
0answers
14 views

Single Product Navigation within Category for WooCommerce

I'm working on a website for a client who would like to have product navigation on each single product page. The navigation will go through each product within the category and when it reaches the ...
0
votes
1answer
25 views

Query seems to be duplicated

I'm just hit a development brick wall and can't seem to find a solution to this problem. I've running two WP_Query's the aim is one displays premium stockists and the other one displays the none ...
0
votes
1answer
40 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
1answer
33 views

Top menu disapears in Category Pages when filtering using ACF

I am using ACF (Advanced Custom Fields) and filtering the results using the method they posted on their website. ...
0
votes
0answers
26 views

How to paginate categories and sub categories?

Here is my code so far: <?php if (isset($wp_query) && $wp_query->max_num_pages > 1) : ?> <div class="row"> <div class="col-md-12"> ...
0
votes
1answer
51 views

Display current category title on category page

Using the following code in a category template, but instead of showing the current category page that I am on, it displays the first category of the first post. For example on Food category page it ...
0
votes
0answers
67 views

How to show only subcategories in parent category not parent category?

I just want to show only subcategories of specific parent category on parent category page. I have 1 parent category videos and 3 child categories art,funny,and technology of that parent. I didn't ...
-1
votes
1answer
22 views

How to create categories out of a list of words?

I have a simple text file with a list of words (Berlin Hamburg Stuttgart ...) and so on. They are cities of germany an nearly 2000 counted. I need everyone of them as a category in my wordpress site ...
0
votes
1answer
43 views

Is there a way to randomize and connect a background and header image?

Right now I am using a different CMS, and I wrote a little bit of PHP which helps me (by using content from hidden pages) bring in a connected background and header and randomly display them, UNLESS ...
2
votes
1answer
33 views

Edit category output

I am using the following to display all the categories from my custom post type. How can I edit it so instead of having the output of the categories in <ul><li> elements it has <a href ...
0
votes
1answer
27 views

Trying to see if page is category or single and displaying title with appropriate heading tag

I'm using a custom theme from ThemeForest and I'm trying to get the custom post php to check and see if the post is on a category or single post. If it's on category, use <h2> for the title (for ...
0
votes
2answers
53 views

Creating sub-categories via php

Can someone tell me what's wrong here? I'm trying to create a category and a sub-category via PHP. My code is wp_set_object_terms($postID, array($subCategory, $catgeory), 'category'); But that ...
0
votes
1answer
55 views

is user member of a group, show them categories

I want to only display categories e.g. the 'group-1' category to users that are members of a certain buddypress group e.g. 'group-1'. I think I can do this by manipulating this code, and replacing ...
0
votes
0answers
38 views

Passing two values wordpress dropdown category

I have been following this guide on how i can pass two values to filter the post instead of one in wordpress category drop-down. The objective here is once the user selects a location and then selects ...
0
votes
0answers
43 views

Woocommerce: Add video to category page

I am currently trying add videos to my category pages... I constructed this function with the shortcodes provided from the woocommerce documentation and placed this in my archive-product.php . My ...
0
votes
0answers
56 views

wp_get_archive for category returning different URLs on different but similar sites

I have this code on two different sites in the sidebar: <ul class="news"> <?php wp_get_archives('cat=2&show_post_count=true'); ?> </ul> and this code in the main content ...
0
votes
1answer
88 views

Showing Subcategory Name/Link Instead of Parent Category

right now this code is showing an article's subcategories if it has one. But it's also showing the parent category too (so both the parent category and child categories show up simultaneously). Is ...
0
votes
1answer
72 views

Showing Subcategory's Name and Link Instead of Parent Category's

Right now my code is displaying the category name and link. But if an article is in a subcategory, I want to display the subcategory's name and link instead of the parent category's name and link. For ...
0
votes
1answer
24 views

Error trying import one category on page

I'm trying to post on this page only posts from category "Fotos Abertas" but I'm not getting, is showing all categories. Is there any error in the code of my template? <?php /* * Template ...
0
votes
1answer
133 views

Display all categories including sub categories

I am trying to display a list of all categories and sub-categories underneath that category, I have managed to get a list of all categories that are parents but am struggling to detect if it has ...
0
votes
1answer
185 views

How to check if a category has a parent and child categories?

Im trying to check if 'categoryone' has a parent. Right know I can check and see that there is a category called categoryone, but I want to check categoryone for parent and child categories. I have ...
0
votes
1answer
24 views

Show a Category Specific Info Box

I have a number of categories which are regions of the country (north, south, etc). I would like to display some kind of info box at the end of each post which falls into one of these categories ...
0
votes
1answer
156 views

Random Category with Recent Post Title and Thumbnail

This code below works perfect to pull the title of five random categories, the issue is for each random category I want the latest post title and thumbnail but where and how do I add the post query? ...
0
votes
2answers
253 views

how to show only specific category for a template

I have a custom template which should only show posts of specific categories. What do i need to change inside this code, to get this done? if ( ! function_exists( ...
0
votes
1answer
34 views

Wordpress custom taxonomy

I'm using a custom taxonomy called 'product_cat' and post type called 'product', I'm trying to display all parent terms, child terms and grandchild terms within the taxonomy. So I get a list like ...
-1
votes
1answer
537 views

Get Products within Current Product Category

I'm currently playing around with WOOCOMMERCE V2.0.13 and I'm trying to display each product from the current product category (e.g. Construction Products when on the Construction Page), I've managed ...
0
votes
2answers
62 views

Displaying posts based on category

I recently got some help here on getting a few posts to display in block format. I was wondering if someone could assist me with modifying the code to limit the posts that show up either by category ...
0
votes
1answer
60 views

!in_array doesnt recognize category

I want to fill an array with categories and tried to prevent duplicates with in_array: if ( $query->have_posts() ) { $categories = array(); while ( $query->have_posts() ) { ...
0
votes
0answers
27 views

List of Posts retrieved from Category

I'm new with WP community but I have lot of experience with PHP.. I want to create a dropdown menu for posts in categories ( in every category no more than 6-7 posts ) or specify for which category I ...
2
votes
1answer
94 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
1
vote
2answers
266 views

Category Thumbnail Display - How to display ONLY the main Category

I am using the eList wordpress theme. Now on the main page, there is a thumbnail display of all the categories listed. Now, on the theme you will see that they have no sub-categories under the ...
1
vote
1answer
510 views

Filter Select results based on selection

I am trying to filter which job results are rendered to the page whenever the user changes the select item on my form. The select items are dynamically populated by the code below which assigns them a ...
0
votes
1answer
101 views

get_category only returning details for 'uncategorized'

I'm using the ACF Taxonomy field add-on to select a category and (hopefully) return details for that category, e.g. slug, title etc. The custom field get_field('category_test') returns the category ...
0
votes
1answer
167 views

How To Pass Array To get_the_category_by_ID() and Get An Array Back?

I am trying to pass an array of category IDs to get_category_by_ID() in order to get an array of category names back. Since I'm still trying to get this to work I'm just using var_dump() on the ...
0
votes
1answer
38 views

Menu's breaking, now showing all page links on site

There's something quite odd happening on a site I'm working on I can't figure out why at all. I have a custom post type set up for news and categories so the user can select what type of news it is ...
0
votes
1answer
387 views

dynamically filter by category via sub-menu

I'm trying to figure out if it's possible to dynamically filter my custom post types by category via a sub-menu I have set up. So I've set up a custom post type: news and enables categories that I ...
0
votes
0answers
34 views

Getting recent posts corresponding to category items in custom menu

I'm trying to create a tabbed navigation, each tab containing 5 recent post excerpts of category items that are listed in a custom menu. I'm planning to load all these posts at once and put each ...
1
vote
2answers
74 views

Where do posts get the sidebar from?

I'm trying to add an if statement on the sidebars that are displays in POSTS. I want posts to show a specific sidebar if it's in category x and display a different sidebar if it's not in category x. ...
0
votes
1answer
94 views

How to change links in the 3 main categories, on widget category, to a javascript function call

I'd like to know.. How could I change my 3 main categories links, so they call a javascript function? I'm using Snapshot Theme from WooThemes. Here's the current state of the website: ...
0
votes
1answer
362 views

Exclude a 'portfolio' custom category?

I have a custom post type called 'portcat' and I want to exclude one portcat category ('weather' - ID='5') from the page. I've tried 'category__not_in' => array( 5 ) but apparently this doesn't work ...
0
votes
2answers
434 views

How to display only one category in a custom post type?

I have a custom post type called 'portcat' and I want to display the results of only one portcat category ('games' - which has an ID of '3') on my page. The below code displays all of the categories ...
0
votes
0answers
124 views

How to exclude 2 Portfolio Categories from page?

I want to exclude 2 Portfolio categories (IDs 4 & 23) from a page using the code below but it still displays all categories. Similar code works for 'Posts' but not for 'Port' - can anyone see what ...
0
votes
1answer
107 views

go to home page when i select default in select-box

I'm new for WordPress. I'm using following code, <div id="cat_list"> <?php wp_dropdown_categories(array('show_option_all' => 'Categories') ); ?> </div> And my JavaScript ...
0
votes
1answer
52 views

Remove the_content From Loop

I'm trying to display a custom loop with only certain elements in it. My loop currently contains the title, creation date, author & content. However I am trying to remove the content for each ...
1
vote
4answers
212 views

Different background-image by category

I am trying to put different body background-image for each category. body { background-color: #000; background-image: url(img/bg.png); background-repeat: no-repeat; background-position: center ...
0
votes
1answer
59 views

Older entries link within a category page

I have set up a category called 'blog' and have all of my posts displaying from this category. I have selected to display 4 posts / page therefore there is a link at the bottom that says older ...
0
votes
1answer
94 views

Stop header code from showing in category page?

Hi I'm using the code below to show different header images in my custom template archives. Only problem is that it is also showing the headers in the category templates. go to ...
0
votes
2answers
689 views

How do I remove a category from a wordpress loop>

I have a question. I need to have, in my archive.php file, a exclusion of a specific category. given what I have now, how would I make that happen? Here is the code: <?php ...
-1
votes
2answers
95 views

Fix incorrect related posts code snippet

Can anybody fix this incorrect related posts codes snippet? function related_posts() { if (is_single()) { global $post; $current_post = $post->ID; $categories = get_the_category(); ...
2
votes
2answers
92 views

Categories Template Assistance

I have found a tutorial online for creating a custom categories template for my archived posts within a particular category. This however is targetting a specific category ID (see below), is there ...