I have never used WordPress before but it seems to be the best package for user content sites.
I need to have a main site which has its own content but also be able to spawn microsites for a particular event.
These microsites will have around 10 pages and will use the same template and will need to have their content changeable.
In terms of url it would probably look a bit like this
main site - www.blog-x.com
microsite - www.blog-x.com/march-meetup/join
microsite page - www.blog-x.com/march-meetup/contact
Is this possible with WordPress ?
Thanks, Alex
If you by "use the same template" mean that the "microsites" should use the same layout and look like the main site, then see Shelly's answer above.
However, if you mean that you want these "microsites" to have different templates (but that the microsites' pages should use the same template), you're looking for the multi-site feature of WordPress. It will allow you to create new blogs (sites) in either subdirectories (blog-x.com/march-meetup) or on subdomains (march-meetup.blog-x.com). See WordPress Codex: Create A Network for details.
What you're talking about is simply adding Pages - not creating microsites. To get the URLs you want, all you'd have to do is create a new Page. (or even better, just create a category for each section, and post the relevant info to that category).
In other words, yes, it'll do what you want - but calling it a "microsite" is a misnomer.
Related
I have noticed that after rewriting URL in a WordPress site, I can reach the same content using two URLs:
http://example.com/category/article-name-here/primary_key
as well as
http://example.com/category/article-name-here
Both of these URLs will point to exact same content. What is the exact logic behind it, is the article name is in itself unique?
I am creating a startup site which will have the same URL structure. But I cannot have same unique-article-name.
Check this article out:
http://codex.wordpress.org/Using_Permalinks
It says
In the Settings → Permalinks panel (Options → Permalinks before WordPress 2.5), you can choose one of the "common" structures or enter your own in the "Custom structure" field using the structure tags.
Wordpress uses something called a router, which is also part of many frameworks, particularly MVC frameworks, to determine what content to show based on the URL. For example, it might look up something in the database (e.g. old pages that have been renamed), then show the content based on that, or it might only look for a file on the server and then show a 404 page if it doesn't find it.
Basically, look into routing as it relates to PHP frameworks to see how that whole logic works.
Is this possible to achieve without too much effort or a plugin? It's simply to instantly redirect to a site I've made in my portfolio if the post doesn't have any content.
Note that I don't want a script in the actual post to redirect since I only use Wordpress as the backend and fetch all the data to be used by a JavaScript backbone app.
EDIT : Added some extra info in a comment
Short Answer: No. You cannot set your Post Permalink to an external asset without directly editing the database.
Long Answer: First off, you need to understand the purpose of the Permalink. It isn't just an arbitrary link to somewhere. It's reserved specifically for storing where that specific post lives within the context of your Wordpress installation.
Your post doesn't live on example.com. It has its own ID, and Wordpress has a specific spot set aside for it where it can be seen on YOUR domain. Leave it as such.
Instead, what you should be doing is employing the tools Wordpress gives you to achieve what you want. A Plugin doesn't exist for what you want because - quite frankly - it's a fairly trivial task when approached CORRECTLY and doesn't warrant the use of an external resource.
So what's the correct way?
Use a Custom Field. Name your Custom Field something like 'externalHref' and fill that in with your link to the website you want to point to in case there's no post content.
Then in whatever templates you're using to generate your posts, just check either for the existence of your Custom Field called 'externalHref' or check for the non-existence of Post Content. In either case, instead of generating a link using The Permalink you can simply build a link that points to wherever you need.
I have developed a site using wordpress. I have two main links in the site e.g. www.mysite.com/siteone and www.mysite.com/sitetwo and I have managed only one blog contents. Now what I need to do is that I want to link the same blog with different link like this:
www.mysite.com/siteone/blog and www.mysite.com/sitetwo/blog and also need to have same content for links www.mysite.com/siteone/blog-1 and www.mysite.com/sitetwo/blog-1. Is it possible to do so, if yes then how to do that? If not then what can I do for that?
Thanks in advance
From the SEO perspective, it's wise to use canonical tag. This tag was a new construct designed explicitly for purposes of identifying and
dealing with duplicate content. Implementation is very simple and looks like this:
<link rel="canonical" href="http://www.yoursite.org/blog" />
This tag is meant to tell Yahoo!, Bing, and Google that the page in question should be treated
as though it were a copy of the URL http://www.yoursite.org/blog and that all of the link and
content metrics the engines apply should technically flow back to that URL.
The canonical URL tag attribute is similar in many ways to a 301 redirect from an SEO
perspective. In essence, you’re telling the engines that multiple pages should be considered as
one (which a 301 does), without actually redirecting visitors to the new URL (often saving
your development staff trouble).
link
The "home" link in a WordPress installation is determined by an option in the database called siteurl, so in theory you'll just have to use the same database on both blogs and override the siteurl on the two to make it seem like two different websites.
A good way to start from is define a constant in your wp-config.php, which should be different for both websites:
define( 'MY_SITE_URL', 'http://yoursite.com/siteone/blog' );
And then write a single-line plugin that would simply add a filter to the get_option call for siteurl. Something like this:
add_filter( 'option_siteurl', create_function( '$value', 'return MY_SITE_URL;' ) );
That's only the start, and if that works for you you'll have to then rumble around your wp-content directory to make sure they are in sync for both websites, i.e. after uploading an image to one blog you'll need to copy the file into the other one.
I did manage to get two different websites working under one WordPress installation using two different databases, but having two WordPress installations working line one site under two different domains, that's tricky ;)
~ K
so..I created page--front.tpl.php in my theme directory and it works fine.
now, how do I make a variable that can be used in the page--front.tpl.php?
I can write my php codes inside page--front.tpl.php, but I think there is a better way.
added:
on the front page, I am going to query video and news nodes ONLY. That is why I want to make a new module for only front page.
any suggestions?
I'm not sure what you are trying to achieve here, but OK. You have two options: one is what you're doing now. Write your custom PHP in page--front.tpl.php and you'll be fine. The other is ditching the file and working only with page.tpl.php.
The variable $is_front tells you whether you're on the front page. You can write custom PHP in a conditional block: if ($is_front) { ... }.
Also, you can create a custom block (a view, perhaps, depending on your needs) and set its display restrictions to "only on the listed pages" - and list there. You'll have a custom view loaded only on the front page.
All you need to do have a custom front page is configure your front page in the site information settins (admin/settings/site-information in D6).
Creating a module to display that content is then a completely different thing.
What I would really suggest is looking at Views if you don't know it already. That allows you to build lists of things (nodes, users, ...) and expose them as pages, blocks, rss feeds and much more. You can create a list of nodes with types video and news, expose that as a page and then just point your front page to the path of your view.
you might try using the views module to create your list of videos and nodes. You can set a views page to be your homepage in the site settings.
I am new to drupal, so sorry for this noob question, but I was wondering how to display articles only in the central column. Currently there are also blog entries, etc and I would like to get rid of them. I have a Views plugin installed but I am not sure how to do this.
In your View create a filter for Node: Type. Here, you can tell it specifically what kind of content to show.
you can change your frontpage settings in admin/settings/site-information
so let's say you created a view - with a page display
set the page url of your view (eg. articles), and then in your settings (the path i mentioned before) you set the drupal frontpage to the page path of your view (that would be 'articles')
i hope that's clear enough for you