Discussion:
Creating a news site on WordPress - some technical questions
Aahan Krish
2013-12-14 09:50:30 UTC
Permalink
Hello,

I'm building a (pretty much) full scale news site with multiple editions,
e.g. US, UK, India, etc. on WordPress, and have a few questions on whether
I am doing things the right way. It'd be great if I can get some
advise/feedback from the experienced folks here.

Coming to the point, below are the details of the structure of the site,
and how I am fixing the hurdles along the way (on which I'd like some
feedback/advise).

- - -

*(1)* Each category (taxonomy) represents an Edition. To give you an idea,
they are as follows:

US (main)
UK (uk)
India (in)
International (intl)

NOTE: Permalink structure is
/%category%/%year%/%monthnum%/%day%/%postname%/, e.g.
example.com/main/2013/12/11/sample-post/.

PROBLEM #1: But as is the case with any news site, some posts need to be
shown across all Editions (for example, news on the death of Nelson
Mandela).

My Solution: I created another category - or Edition, so to speak - called
'International (intl)'. Then using [this function](
https://gist.github.com/anonymous/b216cc899ce94f2fb4f7), I have the posts
assigned to 'International (intl)' category included in all category
archives.

PROBLEM #2: Posts belonging to 'International (intl)' category should be
accessible with any category slug in their permalink.

For example, if the permalink of the post that belongs to 'International
(intl)' category is
`example.com/intl/2013/12/11/sample-post/`<http://example.com/intl/2013/12/11/sample-post/>,
and it's being displayed in the 'US (main)' category archive, I want the
post to be accessible via
`example.com/main/2013/12/11/sample-post/`<http://example.com/main/2013/12/11/sample-post/>
.

To do that, I am using [this function](
https://gist.github.com/anonymous/2c13d98f1330c313550c).

*(2)* Now I have perfect Editions (category archives) for different
countries; and as I've already used the category taxonomy, I created a
custom taxonomy called 'Channels' for organizing posts into topics. To give
you an idea, they are as follows:

Technology (tech) - example.com/channel/tech/
Science (science) - example.com/channel/science/
Business (business) - example.com/channel/business/

But since posts are primarily organized into *Editions*, I need archives
that list posts belonging to an Edition (category) AND Channel (custom
tax). Public query variables make this easy as I'd simply do something like:

example.com/?category_name=main&channel=tech

That'd be an archive for the 'Tech' Channel for the 'US' Edition. And to
prettify the links, I have a function with the necessary rewrite rules: <
https://gist.github.com/anonymous/22160578e145a67bc41a>

I do it similarly for tags as well.

- - -

That's it. Those are the heavy stuff. Am I doing things the right way, or
is that bad?

I didn't opt for WordPress Multisite, i.e. a sub-site for each Edition,
because it'd be hell a lot more difficult to have the same post across
multiple sites (Editions).

I'd very much like to know what you think. Please let me know if anything
is unclear. Thanks for your time!
Aahan Krish
2013-12-17 16:22:27 UTC
Permalink
Anyone?
Post by Aahan Krish
Hello,
I'm building a (pretty much) full scale news site with multiple editions,
e.g. US, UK, India, etc. on WordPress, and have a few questions on whether
I am doing things the right way. It'd be great if I can get some
advise/feedback from the experienced folks here.
Coming to the point, below are the details of the structure of the site,
and how I am fixing the hurdles along the way (on which I'd like some
feedback/advise).
- - -
*(1)* Each category (taxonomy) represents an Edition. To give you an
US (main)
UK (uk)
India (in)
International (intl)
NOTE: Permalink structure is
/%category%/%year%/%monthnum%/%day%/%postname%/, e.g.
example.com/main/2013/12/11/sample-post/.
PROBLEM #1: But as is the case with any news site, some posts need to be
shown across all Editions (for example, news on the death of Nelson
Mandela).
My Solution: I created another category - or Edition, so to speak - called
'International (intl)'. Then using [this function](
https://gist.github.com/anonymous/b216cc899ce94f2fb4f7), I have the posts
assigned to 'International (intl)' category included in all category
archives.
PROBLEM #2: Posts belonging to 'International (intl)' category should be
accessible with any category slug in their permalink.
For example, if the permalink of the post that belongs to 'International
(intl)' category is `example.com/intl/2013/12/11/sample-post/`<http://example.com/intl/2013/12/11/sample-post/>,
and it's being displayed in the 'US (main)' category archive, I want the
post to be accessible via `example.com/main/2013/12/11/sample-post/`<http://example.com/main/2013/12/11/sample-post/>
.
To do that, I am using [this function](
https://gist.github.com/anonymous/2c13d98f1330c313550c).
*(2)* Now I have perfect Editions (category archives) for different
countries; and as I've already used the category taxonomy, I created a
custom taxonomy called 'Channels' for organizing posts into topics. To give
Technology (tech) - example.com/channel/tech/
Science (science) - example.com/channel/science/
Business (business) - example.com/channel/business/
But since posts are primarily organized into *Editions*, I need archives
that list posts belonging to an Edition (category) AND Channel (custom
example.com/?category_name=main&channel=tech
That'd be an archive for the 'Tech' Channel for the 'US' Edition. And to
prettify the links, I have a function with the necessary rewrite rules: <
https://gist.github.com/anonymous/22160578e145a67bc41a>
I do it similarly for tags as well.
- - -
That's it. Those are the heavy stuff. Am I doing things the right way, or
is that bad?
I didn't opt for WordPress Multisite, i.e. a sub-site for each Edition,
because it'd be hell a lot more difficult to have the same post across
multiple sites (Editions).
I'd very much like to know what you think. Please let me know if anything
is unclear. Thanks for your time!
Jeff Tchang
2013-12-17 16:38:24 UTC
Permalink
It sounds like a reasonable approach and seems to work for you. Are you
running into any specific issues?
Post by Aahan Krish
Anyone?
Post by Aahan Krish
Hello,
I'm building a (pretty much) full scale news site with multiple editions,
e.g. US, UK, India, etc. on WordPress, and have a few questions on
whether
Post by Aahan Krish
I am doing things the right way. It'd be great if I can get some
advise/feedback from the experienced folks here.
Coming to the point, below are the details of the structure of the site,
and how I am fixing the hurdles along the way (on which I'd like some
feedback/advise).
- - -
*(1)* Each category (taxonomy) represents an Edition. To give you an
US (main)
UK (uk)
India (in)
International (intl)
NOTE: Permalink structure is
/%category%/%year%/%monthnum%/%day%/%postname%/, e.g.
example.com/main/2013/12/11/sample-post/.
PROBLEM #1: But as is the case with any news site, some posts need to be
shown across all Editions (for example, news on the death of Nelson
Mandela).
My Solution: I created another category - or Edition, so to speak -
called
Post by Aahan Krish
'International (intl)'. Then using [this function](
https://gist.github.com/anonymous/b216cc899ce94f2fb4f7), I have the
posts
Post by Aahan Krish
assigned to 'International (intl)' category included in all category
archives.
PROBLEM #2: Posts belonging to 'International (intl)' category should be
accessible with any category slug in their permalink.
For example, if the permalink of the post that belongs to 'International
(intl)' category is `example.com/intl/2013/12/11/sample-post/`<http://example.com/intl/2013/12/11/sample-post/>
<http://example.com/intl/2013/12/11/sample-post/>,
Post by Aahan Krish
and it's being displayed in the 'US (main)' category archive, I want the
post to be accessible via `example.com/main/2013/12/11/sample-post/`<http://example.com/main/2013/12/11/sample-post/>
<http://example.com/main/2013/12/11/sample-post/>
Post by Aahan Krish
.
To do that, I am using [this function](
https://gist.github.com/anonymous/2c13d98f1330c313550c).
*(2)* Now I have perfect Editions (category archives) for different
countries; and as I've already used the category taxonomy, I created a
custom taxonomy called 'Channels' for organizing posts into topics. To
give
Post by Aahan Krish
Technology (tech) - example.com/channel/tech/
Science (science) - example.com/channel/science/
Business (business) - example.com/channel/business/
But since posts are primarily organized into *Editions*, I need archives
that list posts belonging to an Edition (category) AND Channel (custom
tax). Public query variables make this easy as I'd simply do something
example.com/?category_name=main&channel=tech
That'd be an archive for the 'Tech' Channel for the 'US' Edition. And to
prettify the links, I have a function with the necessary rewrite rules: <
https://gist.github.com/anonymous/22160578e145a67bc41a>
I do it similarly for tags as well.
- - -
That's it. Those are the heavy stuff. Am I doing things the right way, or
is that bad?
I didn't opt for WordPress Multisite, i.e. a sub-site for each Edition,
because it'd be hell a lot more difficult to have the same post across
multiple sites (Editions).
I'd very much like to know what you think. Please let me know if anything
is unclear. Thanks for your time!
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Aahan Krish
2013-12-17 18:38:51 UTC
Permalink
Jeff,

No issues so far. Wanted to know if I am doing it wrongly, or if there's a
better approach.

(I usually ask questions on http://wordpress.stackexchange.com/ site, but
questions like these aren't allowed there.)
Post by Jeff Tchang
It sounds like a reasonable approach and seems to work for you. Are you
running into any specific issues?
Post by Aahan Krish
Anyone?
Post by Aahan Krish
Hello,
I'm building a (pretty much) full scale news site with multiple
editions,
Post by Aahan Krish
Post by Aahan Krish
e.g. US, UK, India, etc. on WordPress, and have a few questions on
whether
Post by Aahan Krish
I am doing things the right way. It'd be great if I can get some
advise/feedback from the experienced folks here.
Coming to the point, below are the details of the structure of the
site,
Post by Aahan Krish
Post by Aahan Krish
and how I am fixing the hurdles along the way (on which I'd like some
feedback/advise).
- - -
*(1)* Each category (taxonomy) represents an Edition. To give you an
US (main)
UK (uk)
India (in)
International (intl)
NOTE: Permalink structure is
/%category%/%year%/%monthnum%/%day%/%postname%/, e.g.
example.com/main/2013/12/11/sample-post/.
PROBLEM #1: But as is the case with any news site, some posts need to
be
Post by Aahan Krish
Post by Aahan Krish
shown across all Editions (for example, news on the death of Nelson
Mandela).
My Solution: I created another category - or Edition, so to speak -
called
Post by Aahan Krish
'International (intl)'. Then using [this function](
https://gist.github.com/anonymous/b216cc899ce94f2fb4f7), I have the
posts
Post by Aahan Krish
assigned to 'International (intl)' category included in all category
archives.
PROBLEM #2: Posts belonging to 'International (intl)' category should
be
Post by Aahan Krish
Post by Aahan Krish
accessible with any category slug in their permalink.
For example, if the permalink of the post that belongs to
'International
Post by Aahan Krish
Post by Aahan Krish
(intl)' category is `example.com/intl/2013/12/11/sample-post/`<
http://example.com/intl/2013/12/11/sample-post/>
Post by Aahan Krish
<http://example.com/intl/2013/12/11/sample-post/>,
Post by Aahan Krish
and it's being displayed in the 'US (main)' category archive, I want
the
Post by Aahan Krish
Post by Aahan Krish
post to be accessible via `example.com/main/2013/12/11/sample-post/`<
http://example.com/main/2013/12/11/sample-post/>
Post by Aahan Krish
<http://example.com/main/2013/12/11/sample-post/>
Post by Aahan Krish
.
To do that, I am using [this function](
https://gist.github.com/anonymous/2c13d98f1330c313550c).
*(2)* Now I have perfect Editions (category archives) for different
countries; and as I've already used the category taxonomy, I created a
custom taxonomy called 'Channels' for organizing posts into topics. To
give
Post by Aahan Krish
Technology (tech) - example.com/channel/tech/
Science (science) - example.com/channel/science/
Business (business) - example.com/channel/business/
But since posts are primarily organized into *Editions*, I need
archives
Post by Aahan Krish
Post by Aahan Krish
that list posts belonging to an Edition (category) AND Channel (custom
tax). Public query variables make this easy as I'd simply do something
example.com/?category_name=main&channel=tech
That'd be an archive for the 'Tech' Channel for the 'US' Edition. And
to
Post by Aahan Krish
Post by Aahan Krish
prettify the links, I have a function with the necessary rewrite
rules: <
Post by Aahan Krish
Post by Aahan Krish
https://gist.github.com/anonymous/22160578e145a67bc41a>
I do it similarly for tags as well.
- - -
That's it. Those are the heavy stuff. Am I doing things the right way,
or
Post by Aahan Krish
Post by Aahan Krish
is that bad?
I didn't opt for WordPress Multisite, i.e. a sub-site for each Edition,
because it'd be hell a lot more difficult to have the same post across
multiple sites (Editions).
I'd very much like to know what you think. Please let me know if
anything
Post by Aahan Krish
Post by Aahan Krish
is unclear. Thanks for your time!
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...