Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ned
May 23, 2002

by Hand Knit
Make a file. Call it test_template.tpl.php and put it in your theme directory.

At the top of the file do this.

code:
<?php
/*

Template name: test template

*/
echo "test";
?>
Make a page and call it whatever you want, then select test template from the list of templates to the right of the edit box.

Load the page.

Adbot
ADBOT LOVES YOU

Ned
May 23, 2002

by Hand Knit
code:
$arguments = array('child_of' => $post->ID, 'heirarchical' => '0',
		'sort_column' => 'menu_order',
		'sort_order' => 'asc'
		);
$pagelist = get_pages($arguments);
foreach ($pagelist as $post) {
	if (substr($post->post_title, 0, 3) == 'val'){
		setup_postdata($post);
		/* Have a party */
						
	}
}
Might need another thing in the argument to set the parent to post->ID as well but this should be close to what you need. If you have issues hit me up on AIM.

Ned fucked around with this message at 23:07 on Oct 8, 2009

Ned
May 23, 2002

by Hand Knit
Yeah. Just match it to whatever specific string you are looking for and increase/decrease the substr in order to match the string.

Technically you could modify wp_query and do the title comparison there to the number of results tossed back. This will get all the children. Not a big deal if you only have a small amount of data but if you have tons you might want to optimize it a little.

Ned
May 23, 2002

by Hand Knit
How big are the boxes you are putting them on?

Ned
May 23, 2002

by Hand Knit
You can do round corners with css3. If you don't want to go down that route you there are a few ways you can do it using just one image. You need to have a way to get it into the four corners or a mechanism for doing top/bottom.

Ned
May 23, 2002

by Hand Knit
I wrote a [http://1080d.com/2009/10/load-your-javascript-properly-in-wordpress/]short post[/url] about how to use wp_enqueue_script and wp_enqueue_style on my blog today. In 2.8 they added a toggle at the end of wp_enqueue_script that will put your JS at the bottom of your page. Useful for improving your score on YSlow.

Ned
May 23, 2002

by Hand Knit
Any reason why you are trying to use WPMU in that way? If it is for a specific client and on it's own domain then what part of MU do you need? You should probably set up the blog to resolve to http://client-name.com/ and make sure WPMU can handle requests made there.

Ned
May 23, 2002

by Hand Knit
In my experience WPMU is meant for providing lots of different blogs on one domain. I know it is used for hosting blogs on multiple domains at Wordpress.com but I think the downloadable version is for subdomains or subdirectories.

There is a post here that explains how to set it up but it is going to be a mess.

I think it is best to set up Wordpress sites individually using cpanel accounts. It makes them a lot more portable. While it is a bit more effort than WPMU it will allow you to tailor the site for each customer's needs.

Ned
May 23, 2002

by Hand Knit
I agree. You will most likely have to create your own model for how to manage that information.

I could see a plugin that attaches a new menubar on the left which has a custom db model associated with it that allows you to enter in all the appropriate information about the real estate.

The plugin would also need to modify the .htaccess file to handle requests related to the data model.

WordPress isn't really a framework for applications. You'd have to build an application which gets turned into a plugin.

You might want to take a look at the code behind Great Real Estate. I took a quick glance and it will add it's own table to the database and then I believe it associates posts with that table. Then you can search directly against that table instead of trying to do wacky things with the Wordpress meta table.

Ned
May 23, 2002

by Hand Knit
I talked with supster about this on AIM for a bit and thought that custom app that spit out JSON could work very well with Wordpress. If it is a simple model it shouldn't be too hard to put together and then you can focus on bringing in the data to Wordpress in various ways.

Ned
May 23, 2002

by Hand Knit
I have a dev license. We could work on the project together if you would like.

I kind of threw my eggs into the Shopp Basket because I figured they were the best e-commerce solution for WordPress and I wanted to support them early on. They have a nice interface.

Ned
May 23, 2002

by Hand Knit
I have a subdomain where I am upgrading WordPress and Shopp. I'll let you guys have access to it if you want to play around.

Ned
May 23, 2002

by Hand Knit
Yeah. The event plugins for Wordpress aren't really that great.

I'd use google calendar and then use wordpress meta fields to tie them together. You can output google calendar info as JSON and read it in with Wordpress very easily.

Ned
May 23, 2002

by Hand Knit
just use the_permalink() or you use the_content() with the proper read more function. the_excerpt() doesn't use the read more stuff.

Ned
May 23, 2002

by Hand Knit
It is a css rule on the body

code:
body {
background:#000000 url(images/header4.jpg) no-repeat scroll center top;
}

Ned
May 23, 2002

by Hand Knit
code:
	<div style="text-align: center; padding: 10px;">
		<img src="/path/to/image.jpg" alt="banner" />
	</div>

quote:

I'm trying to figure out:
1) What the dimensions of a graphic banner would be (to me it looks around 600x200)
2) Where I would insert the <img src=> HTML.

Replace it with the code above. If you don't have the option set then that code won't run. This method will just stick an image there.

Ned
May 23, 2002

by Hand Knit
Those are totally different things. You probably want to modify header.php and switch out the part where it has an h1 with an image.

Ned
May 23, 2002

by Hand Knit
No problem. I went to WordCamp NYC this weekend and was very happy to talk about WordPress all weekend long.

Ned
May 23, 2002

by Hand Knit
There were a ton of people there and lots of folks from the core team. Overall turnout was 700+. I spent most of my time talking with the guys behind cacoo.com.

Ned
May 23, 2002

by Hand Knit
Yeah. Template file it up! Once you understand what template files can do you are going to love WordPress. Just include the header and footer as you normally would on index.php or page.php. Then you can run whatever PHP you like. You also have access to $wp_query and $post if you want to be able to control some text on the page.

$_GET will work as normal. Just pass through whatever. I use templates a lot to build simple AJAX APIs. I really like the way they work.

Mess with them a bit and let us know if you need more help.

Ned
May 23, 2002

by Hand Knit
You could use buddypress or take advantage of the get_user_option and update_user_option functions perhaps.

You might be able to put in a hook that makes sure those users don't see the dashboard. Or perhaps there is a plugin?

Ned
May 23, 2002

by Hand Knit
I slowly worked through the concept of the Settings API. Very confusing. Luckily I think I understand it now. I'll have a writeup soon.

Also, this thread has been around for almost 6 months. I have gotten around to releasing my first real plugin to the community and I have a tool going at work that is seeming to get a decent amount of traction.

Have you guys seen the platform get better?

Ned
May 23, 2002

by Hand Knit
What about custom fields is confusing you? I think the part that is strange is the idea of calling them custom fields in the post editor but then access them as get_post_meta() calls. The other thing that is confusing is the idea of having multiple custom fields with the same name but different values.

Anyhoo, get_post_meta() is that function you need to call. You need to shove in the id of the post/page, so use get_post_meta($post->ID, 'field_name', true); to return the first result as a string for the field_name.

If you want to store a bunch of values in the same field name you switch that to false, and then you get back an array and open up some interesting concepts. It would be easy to build galleries around a list of image ids that you associate with a post.

You can also use get_post_custom($post->ID); to get all of the fields and then build your page around looking for things that exist inside the array you get back.

Ned
May 23, 2002

by Hand Knit
I could probably help you with it. I guess I should learn bbPress.

Ned
May 23, 2002

by Hand Knit

excidium posted:

I'm having an issue with how Wordpress is rendering a Page in IE differently than in Firefox. I built the page in Dreamweaver first and it previews fine in both browsers. Once it's in Wordpress though it's adding paragraph tags all over the place that aren't there in Firefox and not there in IE when viewing as a standalone HTML file outside of the Wordpress page.

I'm really stumped as to what to do, it's adding these paragraph tags from nothing.

Paragraph tags come from tinymce. Just do something like
code:
.post p {margin: 0; padding:0;}
And you'll kill the defaults for paragraph tags in the post.

Alfalfa: Your stuff seems to be working for me. Nice work on this site.

Ned
May 23, 2002

by Hand Knit
Go for html5. No reason to do anything else if you want to learn.

Ned
May 23, 2002

by Hand Knit
Get some cheap, proper hosting and develop on a subdomain. That is what I do when I make WordPress sites and I am very happy with the process. The big thing with local development is it is hard to show people things when you need some help/advice.

Ned
May 23, 2002

by Hand Knit
What type of page are you trying to echo it on? Switch to $_GET[] since you know it is a get variable and make sure the page you are trying to echo it on includes header.php somewhere along the way. I can take a quick look for you if you post a URL.

On a side note we are trying to set up an environment for a blog that is getting 100k visits a day. Moving things from Yahoo is not fun or easy.

Ned
May 23, 2002

by Hand Knit
You can do a database dump and then you just need to change a couple of settings in the options table for the new hosting.

Ned
May 23, 2002

by Hand Knit
You can be lazy and do it with jQuery. Otherwise you can make the a tag the same size as the header with css and hide the description.

jQuery way
code:
jQuery('#header').click(function() {
jQuery('#header a').click();
});

Ned
May 23, 2002

by Hand Knit
use wp_enqueue_style(); and get_bloginfo('stylesheet_directory');

And don't mess with anything outside of wp-content/ - that is the core and touching it will only lead to heartbreak.

Ned
May 23, 2002

by Hand Knit
Is there a page from before with the slug of portfolio? How are your permalinks for categories set up?

Ned
May 23, 2002

by Hand Knit
You might need to go into the db and see if something has a post-slug of portfolio in there.

Ned
May 23, 2002

by Hand Knit
Why don't you just make your vanilla php page index.php in the theme directory and add the wp_head() and work from there? You only really need an index.php in there to handle all the requests. It will look for specific files like single.php and page.php but will push everything through index.php if it can't find what it wants.

Ned
May 23, 2002

by Hand Knit
wp_list_categories or something like that is probably what you need to do.

Ned
May 23, 2002

by Hand Knit
If you google, the docs will come.

Ned
May 23, 2002

by Hand Knit
Do you have any plugins in there? You might want to see if the theme uses wp_enqueue_script - if it just uses script tags you might have some js duplication.

Ned
May 23, 2002

by Hand Knit
You have a ton of JS in there that all probably does the same thing.

In the top:
code:
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/tw-sack.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-content/plugins/social-links/javascript.js?ver=2.9.2'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/prototype.js?ver=1.6'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/builder.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/effects.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/dragdrop.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/slider.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/scriptaculous/controls.js?ver=1.8.0'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
And in the bottom:
code:
     <script type='text/javascript' src='http://www.less-than-3.com/wp-content/themes/mystique/js/jquery.mystique.js?ver=2.2'></script>
<script type='text/javascript' src='http://www.less-than-3.com/photos/connor/before-birth/?mystique=jquery_init&#038;ver=2.2'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/jquery/jquery.form.js?ver=2.02m'></script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-content/plugins/contact-form-7/scripts.js?ver=2.1.2'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var thickboxL10n = {
	next: "Next &gt;",
	prev: "&lt; Prev",
	image: "Image",
	of: "of",
	close: "Close"
};
try{convertEntities(thickboxL10n);}catch(e){};
/* ]]> */
</script>
<script type='text/javascript' src='http://www.less-than-3.com/wp-includes/js/thickbox/thickbox.js?ver=3.1-20091124'></script>

<script type="text/javascript">tb_pathToImage = "http://www.less-than-3.com/wp-includes/js/thickbox/loadingAnimation.gif";tb_closeImage = "http://www.less-than-3.com/wp-includes/js/thickbox/tb-close.png";</script>
That is really crazy. You need to get rid of some of those plugins.

Ned
May 23, 2002

by Hand Knit
You can try the head cleaner plugin.

Personally I think it is the theme. It has a bunch of junk in there you probably don't want.

Adbot
ADBOT LOVES YOU

Ned
May 23, 2002

by Hand Knit
Build a page template with a feed from flickr?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply