dunkkan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Moving WP within my serverOk, thanks a lot. I guess I could try to create a new database too, associate it to a brand new install, then fill it with the modified .sql file.
Do you think there can be some problems that way ?
I’m not habituated still to PhpMyAdmin, that’s why I have a sort of fixed idea.
Then I could rewrite the uploads (images) via ftp.
Forum: Fixing WordPress
In reply to: Moving WP within my serverWow figaro thanks for that reference is just what I was looking for π
So I could move the WP core files / make a fresh install in the new directory, then export and EDIT the database as you show here, then import the modified database ?
Could I import the database through the Admin Panel too, right ? If it’s a fresh install with a new database, then there’s no need to clear the old tables manually, it is that ?
Forum: Fixing WordPress
In reply to: Moving WP within my serverHi Michael, thanks for posting,
It is the option 3, moving from web-root folder to folder_a, but I’d like to know as well the option 2 – from folder to folder.
And, indeed, the rest of the options π
Forum: Fixing WordPress
In reply to: Display most recent posts on static homepage – how?Is your main page a WordPress page or an html one ?
What I’d do is create a new php file called for example homepage.php.
You want start that file with this statement :
<?php /* Template Name: Homepage */ ?>Then
- copy/paste your index.php, or
- copy/paste your html page in it (plus a call for the header and the footer, which you’ll find in any index.php)
…and add the code I provided avobe, before the call for the footer for example. Save it and upload it into your theme.
Once that done, create a WordPress page in the text editor, fill it with the static text you want (or with nothing at all in the case that your static text is hardcoded as html), select the page template we just created for it, and publish.
Now go to the Admin Settings and show that page as the Home of your website.
The Mr.Marco alternative is cool too, no pain at all.
Forum: Fixing WordPress
In reply to: get_posts won’t show the tags<?php $posttags = get_the_tags($post->ID); if ($posttags) { foreach($posttags as $tag) { echo '<a href="'; echo get_tag_link($tag); echo '">'; echo $tag->name . ' '; echo '</a>'; } } ?>This is working for me, but I’m suspicious ’cause it must be a cleaner mode to get it. Please don’t hesitate to make your remarks.
Forum: Fixing WordPress
In reply to: get_posts won’t show the tagsI’m looking now for a way to get the tags linking to its archive pages :/
Forum: Fixing WordPress
In reply to: retrieving tagsHi whooami, I tried this inside a custom query with
get_posts, but it didn’t work.Here’s what I found to solve it. If someone knows a better way, please share it !
<?php $posts = get_posts('category=4&numberposts=1'); foreach($posts as $post): setup_postdata($post); ?> <?php the_title(); ?> <?php the_content(); ?> <!-- HERE IT COMES THE TRICKY PART --> <?php $posttags = get_the_tags($post->ID); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } } ?> <?php endforeach; ?>Forum: Fixing WordPress
In reply to: get_posts won’t show the tagsHi stvwlf, thanks for that link, with this other thread, it gave me an idea of what was happening.
Here’s my final code. It seems like I needed to specify the called post’s ID to acces to its tags.
<?php $posts = get_posts('category=4&numberposts=1'); foreach($posts as $post): setup_postdata($post); ?> <?php the_title(); ?> <?php the_content(); ?> <!-- HERE IT COMES THE TRICKY PART --> <?php $posttags = get_the_tags($post->ID); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } } ?> <?php endforeach; ?>It works the same with WP_query.
By the way, does someone knows the main differences between WP_query and get_posts ? Which is quicker, or better ? why two functions ?
Forum: Fixing WordPress
In reply to: retrieving tagsHi asquare, did you get a solution to this ? I’m involved in the same issue.
Forum: Fixing WordPress
In reply to: Display most recent posts on static homepage – how?Hi actionmedia,
The easiest way to do this is adding to your static page a
get_postscall.Here’s one example of a minimal Loop of that kind :
<?php global $post; $myposts = get_posts('numberposts=5&category=1'); foreach($myposts as $post) : ?> <?php the_title(); ?> <?php the_content(); ?> <?php endforeach; ?>You can insert it everywhere in your page : sidebar, bottom … and you can specify how many posts you’ll show (in this case I’ve set up 5), and from which category (you can use too
&categoryname=WHATEVERif you prefer).Hope that helps.
Forum: Themes and Templates
In reply to: help – IE ignores my CSSThanks t31os, sometimes there’s nothing like an external view to recall your steps : I just added a png-fix script for IE, which was resizing my images all the time.
I’ve put a conditional comment to avoid it :
<!--[if lt IE 7]><script type="text/javascript" src="/wp-content/themes/Blog/js/pngfix.js"></script><![endif]-->Only IE6 users will see a funky resizing.
cheers,
Forum: Plugins
In reply to: [Plugin: WP Wall] Alternate background color ?In the plugin’s CSS file there’s the answer : the class called .wall-alt
Forum: Plugins
In reply to: get_posts comments template ?I did it with WP_query + this code :
<?php $withcomments = true; comments_template();?>found here : http://wordpress.org/support/topic/166221?replies=3
Forum: Themes and Templates
In reply to: Read and Post all comments one pageHi, for the people interested in that, I just discovered the ‘how-to’ to this issue.
You can copy and paste the code in single.php dedicated to produce the comments, in a brand new custom page, and in the case you have by default a separated comments file (comments.php), open it and copy it, or call it through PHP :
<?php comments_template(); ?>You will find the code in the Deafult theme which comes with WordPress.
The final Page you could create, if you have a comments.php file in your theme, would look like that :
<?php /* Template Name: MyCustomPage */ ?> <?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php the_content(); ?> <!-- THE FOLLOWING WILL CALL FOR THE COMMENTS TEMPLATE --> <?php comments_template(); ?> <?php endwhile; endif; ?> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: Change of server (and thus abspath) break media library sizingHi stenavin, I would be interested in your technique, because I’m browsing the database quite desoriented.
I recently uploaded the blog from my computer to the server, and it seems like the path to the images in the database have kept the http://localhost adress.
I try to change in Settings > Misc > paths-to-images boxes but nothing seems to change : in the Media Uploader every image kepts ‘hidden’ (you know : white square, little red crossed signal, localhost thing when expanded), except the new images I’m uploading, which work OK. If I try to change, again inside the Media Uploader, the paths to the images, nothing changes : they keep as a localhost hosted images.
Please if you have some solution to this I’d be hugely grateful.