Alicia St Rose
asked on
Need subpage to show up in post's slug
Hi,
I made custom wordpress site and the blog functionality is under a tab called "News".
When ever I land on a post page, I notice the url is:
www.publishingbytheseas.com/whatever-the-blog-title-is.
I need each post to have this url:
www.publishingbytheseas.com/news/whatever-the-blog-title-is
I've racked my brain and exhausted my google searching.
Here's the site:
http://publishingbytheseas.com
Thanks!
I made custom wordpress site and the blog functionality is under a tab called "News".
When ever I land on a post page, I notice the url is:
www.publishingbytheseas.com/whatever-the-blog-title-is.
I need each post to have this url:
www.publishingbytheseas.com/news/whatever-the-blog-title-is
I've racked my brain and exhausted my google searching.
Here's the site:
http://publishingbytheseas.com
Thanks!
You can try relocating the blog (moving the WordPress files) to a directory (folder) in the root of the site named "news."
ok , Go into settings>Permalink
add "news" in the Category base, i believe or Tag base.
add "news" in the Category base, i believe or Tag base.
Make news a category in your blog and have your posts under that, Then you can set the permalink style (Common Settings in WP Admin > Settings > Permalinks) to /%category%/%postname%/
Have the solution not work?
You can also try to add a news category in categories section... then apply all you post articles to that category.
Or you can add a plugin called "flutter" and make your own write panel called "news" and add your news articles to there.
Or
You can make a page called "News" and run a query of the post that have the category "news" to show on that page by way of a shortcode post plugin.
Or
You can make a new page template for the "News" page, and add this code to it:
<?php get_posts( $args ); ?>
<!-- configure it accordingly to your wishes-->
<?php $args = array(
'numberposts' => 5,
'offset' => 0,
'category' => news,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => ,
'exclude' => ,
'meta_key' => ,
'meta_value' => ,
'post_type' => 'post',
'post_mime_type' => ,
'post_parent' => ,
'post_status' => 'published' ); ?>
Reference site is: http://codex.wordpress.org/Template_Tags/get_posts
CHEERS!
You can also try to add a news category in categories section... then apply all you post articles to that category.
Or you can add a plugin called "flutter" and make your own write panel called "news" and add your news articles to there.
Or
You can make a page called "News" and run a query of the post that have the category "news" to show on that page by way of a shortcode post plugin.
Or
You can make a new page template for the "News" page, and add this code to it:
<?php get_posts( $args ); ?>
<!-- configure it accordingly to your wishes-->
<?php $args = array(
'numberposts' => 5,
'offset' => 0,
'category' => news,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => ,
'exclude' => ,
'meta_key' => ,
'meta_value' => ,
'post_type' => 'post',
'post_mime_type' => ,
'post_parent' => ,
'post_status' => 'published' ); ?>
Reference site is: http://codex.wordpress.org/Template_Tags/get_posts
CHEERS!
ASKER
So sorry, I got really excited and thought the solution was the correct one.
I really need the url to SINGLE posts to read:
news/title-of-post (is this possible in wordpress? I've been looking at other sites and the single post usually has something like below:
news/category/title-of-pos t.
No way to have post title as a direct sub to news?
I don't want to have to add the news category to each post as well as it's designated category.
I'm going to give flutter a try. I don't know if the final suggestion would work as it looks like it's not doing anything for the single post which calls the single.php file.
I really need the url to SINGLE posts to read:
news/title-of-post (is this possible in wordpress? I've been looking at other sites and the single post usually has something like below:
news/category/title-of-pos
No way to have post title as a direct sub to news?
I don't want to have to add the news category to each post as well as it's designated category.
I'm going to give flutter a try. I don't know if the final suggestion would work as it looks like it's not doing anything for the single post which calls the single.php file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sudaraka,
How wickedly simple. I could not find this info anywhere!
This is EXACTLY what I wanted.
Thank you!
Sorry everyone for the having to open this question again. I'll be bit more patient in the future and really test out the solutions.
How wickedly simple. I could not find this info anywhere!
This is EXACTLY what I wanted.
Thank you!
Sorry everyone for the having to open this question again. I'll be bit more patient in the future and really test out the solutions.
Glad to help. Thanks for the points.