wpismypuppet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: how to auth_redirect to specific pageYou can also add this to your functions.php file instead of what I said before:
function admin_redirect() { if ( !is_user_logged_in()) { wp_redirect( home_url('/{custom page goes here}/') ); exit; } } add_action('get_header', 'admin_redirect');Might be a cleaner approach
Forum: Fixing WordPress
In reply to: how to auth_redirect to specific pagePlace this in your theme’s header.php file at the very top:
<?php if( !is_user_logged_in() ) { wp_redirect('http://somepagehere'); exit; } ?>Forum: Fixing WordPress
In reply to: YoutubeWordPress has a built in video converter… if you type, in plain text, the URL to the YouTube video, WordPress will automatically embed it. There is no need to add custom code unless you want to do more advanced things. And for some, seeing that code can confuse things.
The OP wants to use the simple embed to show the video, but he wants a different video thumbnail. YouTube, when you upload a video, will auto generate three to four thumbnails it pulls from the video itself. You have no control over this. The only control you have is picking one of the three thumbnails to use instead of the default one.
Again, this is a YouTube problem, not a WordPress issue.
Forum: Fixing WordPress
In reply to: How to Add Post-FormatYou are welcome… but you had it right all along. You just goofed a bit on the styles. Happens to me all the time!
P.S. gentleman is correct 🙂 I work for a graphics and web design firm and we create almost all our sites in WordPress now… good luck and let me know if you have more questions!
Forum: Fixing WordPress
In reply to: How to list all root pages and child pages of current page?wp_list_pages allows for a custom Walker… you can do it that way, but it’s programming and knowing how the Walker class works. I have done similar Walkers with the menu system.
Here’s an article that uses a simple function hook to accomplish some things. It also has an example of a simple Walker for the wp_list_pages function:
http://www.456bereastreet.com/archive/201101/cleaner_html_from_the_wordpress_wp_list_pages_function/
Good luck.
Forum: Fixing WordPress
In reply to: Youtube@krishna
There was nothing wrong with the way they were doing it. This is a YouTube problem, not a WordPress problem. YouTube is using a crappy thumbnail. They’ll need to change the thumbnail through YouTube.Forum: Fixing WordPress
In reply to: Youtubeno no no… you don’t add those links to WordPress. Those links were to show you how to see the thumbnails that YouTube generates. You need to follow the direction in the YouTube link I gave you:
http://support.google.com/youtube/bin/answer.py?hl=en&answer=72431
Basically log into YouTube and pick a different thumbnail 🙂
Forum: Fixing WordPress
In reply to: How to Add Post-FormatOk… I broke down and got Ari and looked at the code, then looked at your site and viewed the source and here’s what I found:
Apparently you have done everything correct EXCEPT for the styles in the stylesheet. Looking at your code, you have divs in the content area that are showing:
<div class="post-12 post type-post status-publish format-aside hentry category-uncategorized" id="post-12">You can see “format-aside” in there. Looking at your sylesheet, you are trying to add a background image to something with a class of “titlearea”, which doesn’t exist anywhere in your code. For testing, remove .titlearea from each of your .format-whatever styles and see if the background shows up. Then you can place the image where you need it.
I used firebug and edited the h2 tag inside this div and added a class of “titlearea” and I saw a circle button with a lowercase “a” inside.
Forum: Fixing WordPress
In reply to: Can't name page as I want, and unwanted redirect.The reason the -2 is being appending to the permalink is because that page already exists somewhere. Check your trash can.
Sometimes people will start a page ‘/fyi/stay-informed/rss/’ and then delete it. Then they want it back. Instead of retrieving it from the trash (because chances are they forgot they created it), they create a new page. Since the page in the trash reserves the permalink (in the event it is ever recovered), you’ll get a -2 or -3 or however many pages already exist 🙂
Go into the trash and “permanently delete” it from there. Or recover it and use it instead. Whenever you get -2, check somewhere for a page that already has that permalink. And remember too that titles and permalinks can be different. So check all your pages if your trash is empty for a page with that permalink.
Forum: Fixing WordPress
In reply to: How to list all root pages and child pages of current page?AHHHH… that makes much more sense. And in re-reading your OP, I see that you did say that. I apologize… it was a long weekend. In this case, I would use:
http://codex.wordpress.org/Function_Reference/wp_nav_menu
and combine CSS to hide/show what you want. What’s nice about wp_nav_menu() is that you can fully customize it if you know how to create a custom Walker. Not needed in your case. The wp_nav_menu adds a class “current-menu-item” to, well… the current menu item 🙂 Using that class, you can “show” it’s children. If that class doesn’t exist, “hide” the sub menus. Make sense?
Forum: Fixing WordPress
In reply to: Images not showing up from images fileFirst: If you are going to show code here on the forum, wrap the code using the “code” tag. This will prevent the page from breaking like it’s doing 🙂
Now to your question… can you provide a link so we can use firebug ourselves to better help you? And for now, try changing your url from:
<img src="images/books_thumb.png" width="160" height="90" />to:
<img src="<?php echo get_template_directory_uri(); ?>images/books_thumb.png" width="160" height="90" />Forum: Fixing WordPress
In reply to: How to Add Post-FormatSorry, I was confused by previous reading, but I know see your question 1 said you accomplished this 🙂
In that case, remove the code I mentioned as all that does is turn on the meta box in the admin area. Since you had that working for months, this is duplicate code… you would have already had that somewhere.
I “think” what we need to do is put the classes in a container. For example, your body tag has something like this:
<body <?php body_class($class); ?>>To use these formatting classes, you need to put them in a container. If you are using the “Aside”, I would assume you’d want something like this:
<aside <?php post_class(); ?>>The important piece of code here is:
<?php post_class(); ?>You’ll need to put that inside a tag where you want these classes to be outputted. If the tag has format styles, this function will pump them out. If not, no class is created. Just keep in mind, if you already have classes assigned to that tag, I believe this will break it, not add to it. So, if you had something like:
<aside class="here" <?php post_class(); ?>>I would think it might break. Not tested, so talking out of my you know what. But try to make sure the container you are attaching the
post_class()to doesn’t have a pre-existing class.Forum: Fixing WordPress
In reply to: How to list all root pages and child pages of current page?I guess I’m confused… I use this:
echo '<ol>'; wp_list_pages( array( 'title_li' => null ) ); echo '</ol>';And I get a list of all my pages that looks like what you have above. What are you trying to accomplish?
Forum: Fixing WordPress
In reply to: Restrict Post Type: Page from editor roleYou are welcome…
Forum: Fixing WordPress
In reply to: How to Add Post-FormatInteresting… just adding the bit of code I mentioned makes the “Format” meta box show throughout my entire install. Maybe your screen options has it unchecked? Try going to your posts, open any post, and click “Screen Options” in the upper right corner. Make sure “Format” is checked off.