Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

wordpress nav menu items advise please

Featured Replies

Ok so i created a custom post type for pictures etc, now i want this pictures page with the slug 'pictures' to appear in the navigation.

Is it best to do it as a custom link or do it as a category? The only problem with category is that i get the category name and then the slug.. it then uses the index page as it's template when i want it to use the pictures template.. I could add a page just for the only purpose for a link but it feels dirty.

 

So custom direct link acheives this and works.

www.website.com/pictures/

 

And category acheives this and don't work.

www.website.com/picture-cat/pictures/

 

Is it good practice to use full direct links in the navigation menu than instead of just the slug or linking the nav to a category?

 

I also want this pictures page navigation item to be there automatically on theme install with the option to move it, otherwise how will the owner of the theme know what the slug for that page is called? i was thinking of using this method (Read the second post) http://wordpress.sta...-and-menu-items

 

It all works with this, i just need to know is this the correct and best practice way of doing it or is there something simplar?

 

Cheers!

Edited by TheNickyYo

if you use post types,you won't need to tell the theme owner what url is,since wordpress will do it automatically every where .

are you using a certain php code for creating post type ? if you are what's you code,let me have a look at it.

 

and if you are using a category and you want to show different template for it,open category.php or archive.php and add this to the top :

<?

if (in_category(5)){

include"cat_template.php";

exit();

}

?>

 

where cat_template.php is template file for your category with the id of "5" !

of course if you name the file :

category-5.php wordpress will load this file automatically when user is in the associated category ,but it wouldn't be much dynamic, I would go with the above code since you can specify cat id,you can even add a admin panel and ask admin to choose which category template.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.