Link to home
Start Free TrialLog in
Avatar of Alicia St Rose
Alicia St RoseFlag for United States of America

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!
Avatar of chrish16
chrish16

You can try relocating the blog (moving the WordPress files) to a directory (folder) in the root of the site named "news."
Avatar of Sam Cohen
ok , Go into settings>Permalink

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!
Avatar of Alicia St Rose

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-post.

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
Avatar of Sudaraka Wijesinghe
Sudaraka Wijesinghe
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Glad to help. Thanks for the points.