How to make category templates, pages and index appear in the same menu in wordpress? - wordpress

I am having some problems structuring a Wordpress Website.
Basically this website will have the following pages:
Home
Portfolio
News
Contact
The home will be designed by the index.php, that is no problem. In this page I will show some of the posts that should be in the News and some that should appear in Portfolio.
The pages Portfolio and News should present a list of posts that match this category.
Contact is a normal static page.
My idea was to create a static page for portfolio and for news and to change its theme so I get a list of posts matching this category and handle it. But I found out that this does not work as I thought because pages are not meant to this. For this reason some functions (as the_content) do not work. So I found about Category Templates, which seem exactly what I want.
But now my problem is: my menu is being built automatically and I find it nice. Using the category page template would cause me to need to build it manually, which looks like (for a newbie) a bad smell, once it can be built automatically.
Is the approach with Home->index.php, news and portfolio -> category template and contact -> static page a nice approach?
How would I build the menu in a elegant way with this approach?
Thanks!
Oscar

I don't think your approach was the best, I would have used page templates to pull the different layout/type of pages and use the front-page.php to create the homepage.
But every dev has his own way, I guess.
I think you can easily solve your problem building the menu with the built-in menu builder of wordpress. You can go in Appearance > Menu if your theme is compatible with that.
Check further documentation here
hope it helps!
cheers

In wordpress you can add static page or categories or any other pages to wordpress menu. For creating menu in wordpress see this links.
creating menu

Related

Wordpress: Add Menu Page -> Custom Posts

So I'm creating a small plugin for Wordpress that will require a custom menu page on the dashboard admin sidebar. I created the function that creates the page and menu with the icon, but realized that it will actually need to be set up like the Posts or Pages menu items where you have the option of switching out the featured image/video.
So it would have the option to see the list of created "posts" or add a new one. I've tried to find a tutorial that at least describes where to go in the codex that describes this, but I'm not finding a tutorial or a location in the Wordpress codex that describes creating something like a "post" or "pages" menu/with the needed sub menus. I would appreciate it if anyone could share a tutorial for this if they found one or the location for this in the Wordpress codex if the actually know its direct location? Thanks!

WordPress: How to link post to particular page?

I'm new in WordPress and trying to do the following:
I have main menu with some options (Home, File, Edit, View...). I also want to have posts. The posts can belong to different categories that match the menu options. The only last post should be displayed on Home page (Home menu option). Other older posts should be on pages under appropriate menu options.
I've searched the internet but not found the right solution.
Can I do that with WordPress?
I don't know PHP.
I don't get your question properly. As you said you don't know PHP so it will be little difficult but you can make it by custom template or editing your index page of template.
Or if you want to show 1 post(last) at your website without any php, you can go to your Dashboard->Setting->Reading and make "Blog pages show at most" from 10 to 1. But the problem is your website will show like blog. If you are using "Twenty Twelve" let me know i will make it for you.

Wordpress News website, multiple layout, category base?

I have a theme, I am html web designer, but I can understand some php / wordpress coding also
I have a wordpress theme & I want to convert it into a news portal
Please guide me, I want to convert it into category base, should be like that
http://www.firstpost.com/ please guide me, how can I do ?
is it archive page or separate category page?
--
http://www.firstpost.com/category/world
when browsing category page, you can see there are different post layouts
without any duplicate post
please guide me
You can simply make a main menu containing links to your categories. This will load in the page you set as post-page (ie. the page that contains your posts).
Go to Appearance - Menu. Create a menu and set it as the main menu.
instead of ticking the boxes for linking to pages, create menu links like www.domain.com/category/cats and www.domain.com/category/dogs
http://codex.wordpress.org/Function_Reference/wp_nav_menu

Navigation within pages in Wordpress

Some friends of mine am starting an art blog and am aiming to use WordPress for usability reasons as their PHP/HTML/CSS experience is minimal. However, we are running into a roadblock in that we are finding it difficult to accomplish multi-level navigation within Wordpress: that is; for each WordPress 'page', there must be several 'sub-pages'. For example, each artist page (eg Zac) must have several separate sub-pages: an "About", a "Gallery" (which will be accomplished with a separate WordPress plugin) and a blog sorted by a specific category. An additional road block is presented in the form that each sub-page navigation must be separate from the main navigation: ie, not a drop-down menu, but rather a separate menu located elsewhere on the page.
I've looked around at some WordPress multi-level navigation plugins but haven't found any that adequately meet these needs. Has anyone had the same problem, and if so, how did you work around it? Is there a suitable plugin or will I need to create a separate Page template and then hand-code About/Gallery sections in separate PHP files?
Thanks!
I normally use categories to do that. What I suggest you to do is to create a category for each person and then create sub-categories, sub-pages or posts under each one.
You can then create template that will target different type of pages, you can also target some keywords.

Wordpress Not Publishing Posts To Custom Template

I am building a theme that has a lot of custom templates, like every page. Ridiculous, but for some reason the template I made for the "postings" page is not getting the posts? I have set the post page in reading preferences, and I have set the page to use my template, but it still publishes posts to a default template. Of all the customization I built into this I did not expect the blog part to give me trouble! lol Anyone run into this kind of thing?
Thank you.
The way I usually to it is to have standard setting in reading preferences.
Build my front-page in index.php
Build a template for blog posts
Add a page and assign the blog post template
Of course you then have a kind of placeholder page sitting amongst the other pages, don't really like that. But it works.

Resources