gimperdaniel
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to add metabox to custom menu page (not plugin)?Thanks for your reply. Haven’t had a chance to go through it all yet, but it looks like what i’m looking for… thanks.
Forum: Fixing WordPress
In reply to: BR tag does not workif you can edit your theme you can use a php function to replace all “character returns” (basically when you press enter) with a
the function is nl2br();
I know the_content() should come well formatted. not sure about the_excerpt().
echo $excerpt = nl2br(get_the_excerpt());
Forum: Fixing WordPress
In reply to: please help – I cannot figure this outif you use firefox you can get two plugins that will help you a whole lot to find problems within your site.
1. Firebug (let’s you inspect every aspect of your website)
2. Web developer tool bar (let’s you turn on and off options)Forum: Fixing WordPress
In reply to: Query_Posts Does Not Work If Post_type is not PostThat’s what i’ve been telling you.. nothing works.. unless you write your own query… but i just hate mysql “joins”
Forum: Fixing WordPress
In reply to: How to: Query a post (using post id) from a specific post_type?Yeah. I checked spelling many times. I have been trying to get this to work for over 5 hours.. started last night… but whenever i google post_types I get tons of tutorials on how to set it up.. but it looks like no one has the need to do what I’m trying to do.
Forum: Fixing WordPress
In reply to: Help getting started in the right direction.Creating a custom post_type for cats is a good idea.
If you’re going to have repetitive cats info… you can create custom taxonomies.you can also create custom metaboxes with custom fields in them.
I usually create custom metaboxes in functions.php because none of the plugins out there really cover all my needs, but you can use one great plugin to create custom post_types and custom taxonomies really quick. and they give you full access to the post_type options. It will save you a lot of time.
The name of the plugin is Custom Post Type UI
Forum: Fixing WordPress
In reply to: Domain name changed now content doesn't link to posts! Help!If you have access to the database you can:
1. export a file with all your tables
2. open it on a text edit software
3. search for OLD SITE NAME and replace with NEW SITE NAME
4. Import that file back into your databaseForum: Fixing WordPress
In reply to: How to: Query a post (using post id) from a specific post_type?here’s what I just tried:
query_posts(‘post_id=183&post_type=books’);?>
if ( have_posts() ) : while ( have_posts() ) : the_post();
the_post_thumbnail(array(70, 102));
endwhile;endif;
————————-
This will get the latest 10 books, it’s supposed to get one book.What could be wrong?
1. Several query_posts on this page? some conflict?
2. I use a plugin to regisger new post_types… is there any option that I need to set to true/false?This is a for a featured section on a books website:
1. I setup the backend where the user can select the books from a drop down and pick which one they want to be featured on the main page.
2. Then I save this in “options”. Just the post IDs. So it would look like something 2,5,10,1,11
Then on the front page I get_option and break it into an array:
array[0] = 2
array[1] = 5and so on…
And finally I could either do a query to query each post with a foreach loop
Or I could use post__in (which is what I’m doing right now)
the only problem with post__in is that it get’s my array and once it returns the values from the database it spits out in alphabetical or numerical order.
so my array is 2,5,10,1,11
the have_posts loops spits out 11,10,5,2,1I haven’t tried your solution for the post__in above.. will see if that works
Forum: Fixing WordPress
In reply to: How to: Query a post (using post id) from a specific post_type?Nope, that doesn’t work. The only solution I found right now is to use post__in
The only problem with that is that when I’m querying several posts it doesn’t keep them in order, it seems to choose an random order. I’ve tried orderby options, but they don’t help much. I need them to be queried in the array order.
Forum: Fixing WordPress
In reply to: Get the current category taxonomy term name?I used this.. and it worked:
$wp_query->query_vars[‘taxonomy_name’];
Forum: Networking WordPress
In reply to: Multisite to Singlesite For ClientsI gave up on that right now. The transition isn’t easy enough. I’m just creating separate installs for now. Thanks
Forum: Networking WordPress
In reply to: Turn multisite child blog into a standalone siteYes, but what about the settings? options? widgets? and everything else?
Forum: Fixing WordPress
In reply to: ‘Previous entries’ gives 404and it also works if I add an category base to the permalink structure… but I really dont want a category base…
Forum: Fixing WordPress
In reply to: ‘Previous entries’ gives 404everything i described above works just fine on index.php (home page)…
why doesn’t it work on the news category?
The index.php is almost identical to the news category page except that it has other images before the posts.
Forum: Fixing WordPress
In reply to: ‘Previous entries’ gives 404I have tried all of the above and neither one has worked for me. I am having exactly the same problem as described for several people here…
permalink structure: /%category%/%postname%
In this case…
This calls the archive.php
archive.php has an include: if (in_category(“news”)) INSERT news_arquive.php
In news_archive.php I have the following code:
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;?> <?php query_posts("cat=7&showposts=5&paged=$page");?>
And then in the bottom I have the previous and next links. They point to:
https://www.mypage.com/news/page/2
But that doesn’t seem to exist so I get a 404 page.
Question is.. WHY?