cyberquill
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to remove individual posts from index page only?PS: I discovered an undesirable side-effect of excluding categories from the homepage as shown above:
Now “page 2” of my homepage displays the exact same posts as the homepage. So when I scroll down to the bottom of my homepage and click “Older Posts”, the URL changes to “myblog.com/page/2” but the exact same posts are displayed as on “myblog.com.”
But when I remove
<?php if ( is_home() ) { query_posts( 'cat=-198' ); } ?>
from index.php, then all is well again.
What’s this all about???
Forum: Fixing WordPress
In reply to: How to remove individual posts from index page only?Alright, the trick is to create a separate category for all posts one wants to exclude from the front page, and then add the following code to index.php right before the loop:
<?php if ( is_home() ) { query_posts( 'cat=-198' ); } ?>
(in this case “198”is the number of the category to exclude)
Forum: Fixing WordPress
In reply to: How to remove individual posts from index page only?OK, now I don’t get an error messages, but the posts in question are still visible on the index page, so this line of code appears to have no effect.
Here’s how I inserted the line of code you suggested into my index page:
<?php /** * @package WordPress * @subpackage Default_Theme */ get_header(); ?> <div id="content" class="narrowcolumn" role="main"> <?php $args = array( 'post__not_in' => array( 12278, 11743 ) ); query_posts( $query_string . '&' . $args );?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
Is that where the line is supposed to go?
Forum: Fixing WordPress
In reply to: How to remove individual posts from index page only?Thanks. I added the line you suggested to index.php right before the loop starts, and now I get this error on the webpage:
Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/content/47/4612947/html/blog/wp-includes/query.php on line 2151
Warning: implode() [function.implode]: Invalid arguments passed in /home/content/47/4612947/html/blog/wp-includes/query.php on line 2151
What am I doing wrong?
Also, the numbers you put in parentheses there (2, 5, 12, 14, 20), are these the post IDs?
Alright. I figured it out.
To whom else it may concern:
The Publish button is located at:
wp-admin -> includes -> meta-boxes.php
In order to move it out of the way, look for this chunk of code, located in the upper half of the page:
<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php } ?></div> <div id="publishing-action"> <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" />
Then simply add an inside style to the div with the id=”publishing action,” like this:
<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php } ?></div> <div id="publishing-action" style="position:relative; top:3000px"> <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" />
So in my case, this moves the blue Publish button 3000px down, i.e., WAY DOWN the page where I couldn’t possibly hit it by mistake.
Of course, this modification must be performed after each WP update, but that’s fine. Takes about a minute.
Sounds good, but I haven’t made any changes to my core files since my last WP version update, so there’s nothing to revert.
I installed the plugin, activated it, wrote a test post, hit the blue Publish button, no warning appeared, and the test post was published as if the plugin didn’t exist.
Before I embark on a trial&error session publishing test posts until I get the plugin to work, do you happen to know how to deactivate RSS so that all these test posts don’t go out into people’s RSS readers? If I deactivate my Feedburner plugin, will that prevent test posts from going out?
Thanks. No, this plugin doesn’t work, just as it didn’t work the last few times I tried it.
Prior to WP version 3.0 (or whatever the version was, I don’t recall exactly), after each version update I would simply go to wp-admin/css/colors-fresh.css and slap an inside-style ‘position:relative; top:1000px’ on the code for the Publish button, and that solved the problem like a charm, because now I had to scroll all the way down the page in order to get to it, and I couldn’t hit it by mistake anymore.
But these days, the code for the Publish button has moved to wp-admin -> includes -> meta-boxes.php, and it’s different in a sense that adding an inside style there exceeds my coding skills.
Whether this is an issue with WordPress or not, it is certainly the only recurring issue I am having when working with this platform
Forum: Fixing WordPress
In reply to: Is it possible to add comment section to selected Pages only?Never mind. Piece of cake. All I had to do was add a new page template.
Everything resolved.
Forum: Fixing WordPress
In reply to: Is it possible to add comment section to selected Pages only?Thanks. I wasn’t aware of the “Screen Options” field.
Now how do I get rid of the line “Comments are closed” at the bottom of the page?
Also, I added a “Terms of Use” link to page.php, which shouldn’t display on a page without a comment section.
Forum: Fixing WordPress
In reply to: Make Style Change for One Page OnlyWorked. Thank you.
Just out of curiosity, why a period (.post-1111) for posts and a # (#post-1111) for pages?
Forum: Fixing WordPress
In reply to: Make Style Change for One Page OnlyAlright. For this page only, I’d like to replace all the red quotation marks with a different picture.
Forum: Fixing WordPress
In reply to: How to Move the Blue "Publish" Button???The problem with this solution is that it moves down the Publish button AS WELL AS the Update button on already published posts. I don’t really want the Update button all the way down there.
All I want is the PUBLISH button out of my sight. It was so easy before. I think I’ll go back to version 2.9.
Forum: Fixing WordPress
In reply to: How to Move the Blue "Publish" Button???I’m sorry, I’m not the biggest coding genius. Not quite sure what you mean by “add a new one.” You mean simply add a new stylesheet, call it “newstyle.css” and put it in the wp-admin CSS folder along with all the other stylesheets?
I tried that. Doesn’t work. Obviously, I would have to add a link to this new stylesheet to a header somewhere, but I don’t know to what page.
However, I tried adding your code suggestion to a few of the existing stylesheets in wp-admin, and the Publish Button actually moved down after I added it to the “colors-fresh.css” sheet.
That solves it. If I have to perform this procedure after every WP upgrade, that’s fine. As long as it works.
Thank you for your help.
Forum: Fixing WordPress
In reply to: How to Move the Blue "Publish" Button???I tried. Somehow I can’t find it. But there must be a style sheet that contains the CSS for the Publish button. I’m sure it doesn’t display at its current location because God put it there.
This is such a pain in the neck. It was so easy before. I almost feel like retrograding my version back to 2.9. so I could easily move this stupid Publish button out of the way. (I mean, I want the button, but NOT ANYWHERE NEAR the Draft button.)
Forum: Fixing WordPress
In reply to: How to Move the Blue "Publish" Button???Thanks. I’ll look into how to create a custom admin stylesheet. Probably a good idea.
Until then, I’m very interesting in adding the little position:relative quickfix. I searched around, but I can’t find the correct one among the untold of admin CSS sheets.
Do you or anyone happen to know which one of the wp-admin stylesheets contains the CSS for the blue Publish button on the “Edit Post” page?