Make a wordpress category into a page - wordpress

So in wordpress, I have a list of pages in my navigation. Home - Videos - Blog
The "Home" shows every blog post regardless of category. How can I make the Videos and Blog show specifically every post from the "blog" category or the "videos".
Thanks
Greg

You can do this a couple of ways.
First, this functionality is built into WordPress. Every category can be called by a URL:
http://www.yoursite.com/category/category-slug/
The /category/ part of the URL is the WordPress default and you can change it under Settings | Permalinks in the Optional section.
The second way would be to create a custom page template and use the query_posts() function to include or exclude whatever categories you wish. The syntax is:
query_posts( 'cat=1' );
To get all posts in category ID 1 (use Posts | Categories to get the ID numbers). If you want a page with two categories:
query_posts( 'cat=1,3' );
To exclude a category and return everything else:
query_posts( 'cat=-5' );
query_posts() is pretty flexible and takes a bunch of different arguments. You could do worse than to read the Codex article for it.

If you are using WordPress with BlueHost, click on Appearance -> Menus. Under "Menu Items," hit "Categories." Select the category you want to transform into a page and click "Add to Menu." The category will become a page on your menu. Now every blog post assigned to that category will appear only on the corresponding page.

Related

How do I make a tag taxonomy page?

I have woocommerce plugin. I created a custom tag taxonomy under products to pick the product ingredients. ( https://pasteboard.co/J2BlgqI.png ). To show them as buttons on the product page ( https://pasteboard.co/J2Bn7FD.jpg ).
Now I want the visitor when they click on the ingredient it shows them an ingredient page information. So, if they click on “Beeswax” it shows them Beeswax information like name, function and etc…
Each time I click on “Beeswax it directs me to a filter page https://pasteboard.co/J31hg2w.png .
How can I make a page for each ingredient?
Is it even doable this way? or is there another way to accomplish this?
please advice…
thanks
Yes you can have custom templates for your taxonomies. The template hierarchy explains everything.
Custom taxonomies use this template file path:
taxonomy-{taxonomy}-{term}.php – If the taxonomy is sometax, and taxonomy’s term is someterm, WordPress will look for
taxonomy-sometax-someterm.php. In the case of post formats, the
taxonomy is ‘post_format’ and the terms are ‘post-format-{format}.
i.e. taxonomy-post_format-post-format-link.php for the link post
format.
taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php.
taxonomy.php
archive.php
index.php
Since you haven't created a taxonomy-ingredients.php WordPress uses the next available option and falls back to the generic template.
You can even create a different template (page) for each of your Ingredient by using the first option above.

Trying to understand how to add a separate blog to a word press site

This may seem more like informational question rather than a coding question but I may be wrong.
Let's say I have a site, www.xyz.com. This site is built in wordpress from a custom template. (That I will put together).
The site will showcase products with each product being input through individual posts. SO techincally speaking, It's already using the "blog" feature of wordpress.
Now I want to add a blog into my site. Let's say www.xyz.com/blog/
I could create a custom page in my theme folder called
page-blog.php
in which that would work fine.
But here is were im stumped. I want to show blog posts here that are not found on the original xyz.com page. If I use the wordpress loop on the blog page, it will show all my posts that are on the xyz page. I want to show separate posts on my blog page then the ones I show on my main page.
So my main page would have lets say, a 1000 posts of products, each product being a different post.
For my blog, I want to run the loop but not show the products posts, but show regular "blog" posts, not products. Like information, etc, etc...
I'm stumped on how I can run the loop on the blog page and have it pull in different posts that are not on my main page. Would I have to install a separate wordpress installation? I believe this would be a major hit on site performance, and also caching would be more difficult i think.
So you have 'products' and you have 'posts'. Two different post types. See: https://wordpress.org/plugins/custom-post-type-ui/
Create a new Post Type for products.
Enhance your WordPress theme so it displays products differently. Note that some themes come equipped to handle custom post types automatically, while others may require you to make some minor adjustments or add additional template files.
Refer to the article at WordPress regarding Template Hierarchy.
See also: The Complete Guide to Custom Post Types
I understood your concern and I can say no need for extra WordPress setup and it is easily achived by creating category for example you can create category blog or product.
Now let's start with main site , if you want to show all post then nothing to do on that.
Secondly on blog you just need to get post having blog category, and this can be achieved easily by wp_query if you are writing your custom loop otherwise best way to use hook. You can use pre get post action as below,
function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-1,-1347' ); } }
add_action( 'pre_get_posts', 'exclude_category' );

Show only posts related to category or page wordpress

I'm kinda new to wordpress and was wondering if I could do the following:
Let's say I have a site for a bakery and in the mainmenu on top there are four links:
Home - About - Products - Contact
Under the page products I would have a number of posts : Bread, cupcakes, ..etc. all of these posts would be categorized under the category products. Now if I go to the products page I want to see only these posts in a sidebar. Therefor I have two questions:
How can I connect this category to this page
How can I show the posts from this category in a sidebar
If anything is unclear please feel free to ask me, also if you would suggest another way of working please let me know.
Much appreciated, thanks!
[EDIT]
I have found that it is better to add a category for this products category instead of a page. Now I'm still looking to display a static post as an intro for this products category.
For connect this category to this page
you can set product to category archive page from
wp-admin/nav-menus.php
you can create a simple page template to list category post
you can use http://wordpress.org/plugins/list-category-posts/ plugin and use short code like [catlist name="news"] in you page content.

Wordpress generated page with values from url

I'm currently trying to build a wordpress product catalog with a custom taxonomy.
I'd like to have browseable multi-level category system, so if I click the Catalog menu, it would show all the top parent categories, and if I click on one of these categories, instead of showing me the posts in that particular category, I want it to list all it's subcategories.
For this I'm using two slightly modified plugins currently:
Multi column taxonomy list, and taxonomy images.
My approach would be to have the taxonomy lister display custom links linke www.xyz.com/wp/product?cat=doors
and the product page would process the $_GET data cat and forward it to the shortcode somehow so it would be [mctl taxonomy='productcategories' parent='$_GET['parentid']']
.
So for the TLDR: How can I pass variables from the URL to the shortcode, or to the plugin.
Thanks for any help.
Nevermind, I figured it out. I just had to edit the plugins php and use the $_GET[''] stuff there.

Inserting a link to another post in Wordpress

I'm putting together a site based on a Wordpress template, and was wondering if there's a way to link one post to another without entering the full URL. I'd like to be able to use something that doesn't change if the parent directory or subdomain changes. Any ideas?
Posts
To link to a Post, find the ID of the target post on the Posts administration panel, and insert it in place of the '123' in this link:
Post Title
Categories
To link to a Category, find the ID of the target Category on the Categories administration panel, and insert it in place of the '7' in this link:
Category Title
Pages
To link to a Page, find the ID of the target Page on the Pages administration panel, and insert it in place of the '42' in this link:
Page title
(From Wordpress)
Linking Posts, Pages, and Categories
Something like: Post Title should work even if you use permalinks.
use below code to get particular post url and Title only by post id.
replace $postid with your post id that you want to display.
$postid = 1;
echo ''.get_the_title($postid).'';

Resources