donuthole
Forum Replies Created
-
Forum: Installing WordPress
In reply to: Messed up databaseSee if this helps: https://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
Forum: Fixing WordPress
In reply to: What is my rss urlAny of them would work. I’d choose the RSS 2.0 feed, but that’s just a personal preference.
Forum: Fixing WordPress
In reply to: What is my rss urlYou have three feeds:
- RSS 2.0: https://www.mysticgypsyimports.com/blog/?feed=rss2
- RSS .92: https://www.mysticgypsyimports.com/blog/?feed=rss
- Atom 0.3: https://www.mysticgypsyimports.com/blog/?feed=atom
You can see these addresses by viewing the source code at https://www.mysticgypsyimports.com/blog/
Forum: Fixing WordPress
In reply to: How to display permalinks directly from DatabaseYou want the
setup_postdata()
function which will allow you to use WordPress’ native post functions (likethe_permalink()
).https://codex.www.ads-software.com/Template_Tags/get_posts#Access_all_post_data
Forum: Installing WordPress
In reply to: New Hosting Problems Linux & WordPress@apljdi — I second that. Every WordPress site I’ve ever built has been hosted (and continues to be hosted) on Linux servers.
Forum: Fixing WordPress
In reply to: Home page in footer acting weirdThe link problem is here:
<a href="<?php bloginfo('spacessential'); ?>" title="<?php bloginfo('spacessential'); ?>"><?php bloginfo('spacessential'); ?></a> feng Shui London Uk 2006-2011
Change it to:
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a> feng Shui London Uk 2006-2011
To place the footer links in the middle of the brown background, change your #footer CSS width to 694 and add the following padding to the #footer CSS:
padding-left: 310px;
That should clear it all up.
Forum: Hacks
In reply to: Content in loopAll it’s doing is creating a variable called $my_count before the loop, and then setting that variable equal to the number 1. Then, once the loop starts, the variable increases by 1 after each post is displayed (the $my_count+=1 line).
So…if you’re using the default setup, the WordPress loop will pull ten posts and your $my_count variable would look like this:
$my_count=1 BEGIN WORDPRESS LOOP POST #1 $my_count=2 POST #2 $my_count=3 POST #3 $my_count=4 POST #4 $my_count=5 POST #6 $my_count=7 POST #7 $my_count=8 POST #8 $my_count=9 POST #9 $my_count=10 POST #10 $my_count=11 END WORDPRESS LOOP
The “if” function says that your code inside the “if” function should appear if $my_count=3,6,9,12 — basically, any time $my_count is evenly divisible by 3. In the above example, your code would appear after POST #3, POST #6, and POST #9.
So a sample code would look like this:
<?php $my_count=1; if(have_posts()) : while(have_posts()) : the_post(); ?> <div class="entry"> <h1><?php the_title();?></h1> <?php the_content();?> </div> <?php if(($my_count%3)==0):?> <div class="banner"> Content of banner (Google AdSense code or whatever) </div> <?php endif;?> <?php $my_count+=1; endwhile; endif; ?>
Forum: Fixing WordPress
In reply to: Lost My postAlso, ask your host if they had a server problem last night or this morning and had to restore your database, in which case they may have used the previous night’s backup and your changes would not have existed.
Forum: Hacks
In reply to: Content in loopJust before the loop, set a PHP variable (eg, $my_count) and set it equal to 1:
$my_count=1;
. Then, at the end of the loop, just beforeendwhile;
, add$mycount+=1;
to increase the variable by 1.Finally, wherever you want your banners to appear, put:
if(($my_count%3)==0):
Your banner code
endif;
That $my_count%3 says “If the number $my_count is evenly divisible by 3 (ie, no remainder), put my banner code here.”
Forum: Installing WordPress
In reply to: Beginner boob needs help please!Does your server configuration allow you to delete non-empty directories? Some don’t. Try to delete all of the files in those directories first, and then delete the directory.
Forum: Fixing WordPress
In reply to: HELP! Changed wordpress URL by mistake, can't access filesNo problem. There is a batch way to do it through the PHPMyAdmin interface by running a “REPLACE” query. If you go to the posts table (usually wp_posts by default), you can update the links to the pictures with a SQL query (assuming your posts table is called wp_posts — change it to the name of the table if not):
UPDATE wp_posts SET post_content=REPLACE(post_content,'wordpress/wp-content/uploads','wp-content/uploads');
It depends on how comfortable you are with SQL and how many posts/pages you have to update. If it’s a lot of posts/pages, I would first export the table so I have a backup, and then run this query on wp_posts. If anything screwed up, you could always upload the backup and be right back where you were.
Forum: Fixing WordPress
In reply to: HELP! Changed wordpress URL by mistake, can't access filesTo be honest, I think this is an issue for a programmer. It looks like you’ll need to make some changes directly to the databases to fix this issue. Do you have access to a cPanel or server interface (specifically, something like phpMyAdmin)?
Forum: Hacks
In reply to: Having trouble with jQuery variable scope in an image upload pluginYou’ve got to tell jQuery that it’s an id. If the id is “img1”, you’re currently telling jQuery to get
jQuery(img1)
, but jQuery doesn’t know that img1 is an id and is instead looking for a jQuery term called img1 (which, of course, doesn’t exist).Instead, change
upload_id = $(this).prev().attr("id");
toupload_id = '"#'+$(this).prev().attr("id")+'"';
This way, your send_to_editor function like would read (to jQuery):
jQuery("#img1").val(imgurl);
(You might need to change your imgurl variable toimgurl = '"'+jQuery('img',html).attr('src')+'"'
)Let me know if that works.
Forum: Installing WordPress
In reply to: Import local host filesThe importer won’t work going from localhost to a live server because the live server doesn’t know that localhost is your computer. Instead, FTP all of the files and use PHPMyAdmin to export and import the database.
Check out https://www.newnine.com/blog/112-move-wordpress-to-new-server to see how to make the changes.
Forum: Fixing WordPress
In reply to: Lost FormattingIt looks like your “Is This Really America?” post is causing the problem. Go to this post in the editor and view it in the HTML editor. Look for a closing
div
tag (or some other tag) that wasn’t opened previously in the content.