OthelloBloke
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: Call for PHP / SQL Scripter NeededObviously you’ll need to email me with a portfolio of verifiable work.
Forum: Fixing WordPress
In reply to: How do I create a list of one category’s posts in a sidebar?This is what I use which works perfectly fine. Obviously change ‘XYZ’ to whatever number category you want
<?php query_posts('showposts=6&cat=XYZ'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul>Eric…
You try to reduce your site’s dependencies on plugins as much as possible, and where things can be done with raw php in the theme then do it.
What’s your website and what plugins aren’t working?
Forum: Fixing WordPress
In reply to: str_replace on variable for $post->post_titleThat doesn’t work. I currently have this:
$variable = $post->post_title; $variable = str_replace( "'", "\'", $variable); $variable = str_replace( '"', '\\"', $variable); $link = "<a onclick=\"return checkStuff('$variable');\" href='" . wp_nonce_url( get_bloginfo('url') . "/wp-admin/post.php?action=delete&post=" . $post->ID, 'delete-post_' . $post->ID) . "'>".$link."</a>";I added the following title – Title 1 ” Title 2 “
and the html for the delete link it gave me was this:
<a onclick="return checkStuff('Test 1 \" test="" 2="" \="" );="" href="URL HERE">Delete</a>but when I add the following title: Title 1 ‘ Title 2’ it gives me the following correctly commented html:
<a onclick="return checkStuff('Title 1 \' Title 2 \' ')" href="URL HERE">Delete</a>Forum: Fixing WordPress
In reply to: str_replace on variable for $post->post_titleSomeone?
Forum: Fixing WordPress
In reply to: How to get a slug from the db?Check that post again… at the bottom ๐
Forum: Fixing WordPress
In reply to: How to get a slug from the db?Check out the dynamic link for a post/page:
http://www.ryanpaul.ca/websites/useful-wordpress-stuff/
It MAY help you!
Forum: Fixing WordPress
In reply to: str_replace on variable for $post->post_titleANYONE DAMNIT?
Forum: Fixing WordPress
In reply to: Site Gone After 2.9 UpdateFTP into the current theme…
Then physically open up one of the theme files like index.php or header.php and see if the code is still in there.
Somehow my theme files got wiped a few versions ago – that’s what your site looks like now.
Forum: Fixing WordPress
In reply to: Site Gone After 2.9 UpdateSounds simple… but did you try ftp’ing and renaming your plugins folder to something else, and seeing if the website comes up then?
Forum: Fixing WordPress
In reply to: str_replace on variable for $post->post_titleIt doesn’t fix it. When there’s speechmarks in the title, it screws up the html.
I thought it would work too.
Forum: Fixing WordPress
In reply to: Can’t get rid of huge gap between the content border and last post.Go into your style.css and find:
.navigation { font-size: 12px; padding: 30px 0px 30px 0px; }Change it to:
.navigation { font-size: 12px; }then add something like:
.navigation div a { padding:10px 30px; }Forum: Fixing WordPress
In reply to: Can’t get rid of huge gap between the content border and last post.Try giving a URL.
Forum: Fixing WordPress
In reply to: .htaccess woesYou need to put the FULL URL for the destination URL.
Forum: Plugins
In reply to: Get full text for page and strip imagesUse this:
echo strip_tags(get_the_content(), '<p><a><h2><blockquote><code><ul><li><i><em><strong>')Since the allowable tags doesnโt contain <img> tag, itโll be ignored and your image will be stripped. If you use any other HTML tags then insert it in the list.
You can use the same trick if you want to strip images from your archive pages or any other page where the_content() is used.