hotwebideas
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Pagination with custom post typesStephen, I may be missing it, but I do not see the code that shows the pagination links in either code snippet. I see the previous and next links, but are you asking about the numbered page links?
Bruce
Forum: Themes and Templates
In reply to: [Twenty Twelve] Where is post type feedback ?iTomek, That sounds like a custom post type called “feedback”. Check your WP-Admin back end for a menu item called Feedback or something like that title and that is what it is referring to. I have a WordPress site with 8 post types and each one of them would be /wp-admin/edit.php?post_type=promotions, /wp-admin/edit.php?post_type=invitations, /wp-admin/edit.php?post_type=poll-results, etc.
Bruce
Forum: Themes and Templates
In reply to: Different syle.css for Home pageThat’s cool. Like I said before, you taught me a new hook. ??
Bruce
Forum: Themes and Templates
In reply to: Different syle.css for Home pageHey Scott, also please let me know how it works for you. I am curious.
I learned a new hook today from jcastaneda.
Hey jcastaneda, one more question for you. Would this hook also work?
add_action( 'init', 'switch_css')
It seems init and wp_enqueue_scripts would both work here. Can you elaborate on that?
It seems that init is one of those global hooks that work everywhere.
Thanks,
BruceForum: Fixing WordPress
In reply to: Reading PostsHey cecev, I am going to give you some code for this. This may seem like a lot of steps if you are not a programmer, so if I am making this seem to difficult, maybe someone else reading this can help, but I assure you that this will work. I did something almost like this 2 days ago, so it is still fresh in my mind.
- Create a new page template (notice I said page template and not a page). Let’s title it “Latest Blog Post” since that is what your result would be. You would need to turn this page into a template like this:
/* Template Name: Latest Blog Posts */
Name the page “latest.php” and add (upload) it to your theme folder.
- Add this code, which is the WordPress main loop function query_posts():
<?php $posts = new WP_Query(array( 'posts_per_page' => 1, 'orderby' => ID, 'order' => 'DESC' )); while ( $posts->have_posts() ) : $posts->the_post(); $title = get_the_title(); $content = get_the_content(); $id = get_the_ID(); echo (" <div style=' width:90%; background:none; font-size:.80em; text-align:left; padding:10px 0 10px; border-bottom:1px solid #CCC; '> <h5 style='display:inline; font-size:.90em; padding-left:0px; color:#4da56b;'>$title</h5><br/> <div style=' color:#777777; font-size:.75em;' >$content</div> </div> "); endwhile; ?>
What you are doing here is telling WordPress to order all of your posts by the ID number in descending order and then return only 1 post. That will always be your latest blog post.
- This will be your page template. Now, go into your WP-ADMIN and add a new page. Title is “Latest Blog Post”, because that is what the result will be. Notice now, that you have a pull down menu called “Template” since you created the template in the last step. Select the one titled “Latest Blog Posts” and save the page. Now you will see your latest blog post with its full content.
- Finally, yup your last step. Yay! Go into your settings in WP-Admin and select Writing. Then, make that Latest Blog Post page your default.
Those steps will work. I hope it does not sound like a lot of work, but it would take me only 10 minutes for all this. If you are new to WordPress programming, it would take you longer, but if anyone else can offer a quicker solution, please do.
Either way, cecev, give this a shot and let me know how it works.
Bruce
Forum: Your WordPress
In reply to: Please review my websiteYour website loads pretty quickly for me.
Forum: Your WordPress
In reply to: review my siteNice use of the WordPress loop. Clean theme.
Bruce
LatestBlogPosts.comHey Daniel, I am not home at the moment, but what I will do is look at my code when I return home and post it here. The code is already done and you just need to add it to a custom plugin.
One Note: I edit the categories directly in the plugin itself and not on the WordPress multisite back end admin, but that is easy ??
Bruce
Forum: Fixing WordPress
In reply to: Reading PostsYou may need a plugin to handle this, but try turning off your summary in your reading settings and you may need a custom loop to display the next 10 blog posts and exclude the latest, which you said would display as a full post.
After you turn off the summary settings, there should be a setting for how many posts you want to show and you would set that to 1, so only your latest blog post is showing.
To show your next 10 posts, you would probably need a custom loop in your WordPress theme with this code:
<?php $posts = new WP_Query(array( 'posts_per_page' => 10, 'offset' => 1 )); while ( $posts->have_posts() ) : $posts->the_post(); $title = get_the_title(); $content = get_the_content(); $id = get_the_ID(); echo (" <div style=' width:90%; background:none; font-size:.80em; text-align:left; padding:10px 0 10px; border-bottom:1px solid #CCC; '> <h5 style='display:inline; font-size:.90em; padding-left:0px; color:#4da56b;'>$title</h5><br/> <div style=' color:#777777; font-size:.75em;' >$content</div> </div> "); endwhile; ?>
Bruce
LatestBlogPosts.comForum: Fixing WordPress
In reply to: cannot remove "follow me on Twitter on Navigation BarTry removing it from your Menus screen in under Appearance.
Bruce
Forum: Fixing WordPress
In reply to: adding a header to my siteNo, CSS is for layout and styling only. If you want a one line header to the top of all your blog pages, you would add it in your theme’s header.php.
Bruce
On WordPress multisites, you can turn that off in the settings. Usually, admins on the blog level can edit categories that are specific to their own blog in your WordPress network, but on SocialSkyline.com, I wrote some plugin code to disable the category editing on the admin level and then added the categories to the plugin. This way, I edit the cateogries on the superadmin level only.
Bruce
Forum: Everything else WordPress
In reply to: Gravatar not showing on www.ads-software.comOk, great.
Forum: Themes and Templates
In reply to: Different syle.css for Home pagejcastaneda, that code would be entered in functions.php or a plugin. Correct?
Bruce
Forum: Themes and Templates
In reply to: Understanding WordPress themesMatthew, Themes are pretty easy to design and easier than you think.
All you need to do at the very minimum is design your style.css and index.php and voila, you have a theme. All the other theme files like single.php, page.php, header.php, footer.php are all icing on the cake and can be added later.
Start with style.css and index.php and design just those. Also, take a screenshot and add screenshot.png.
From there, read the codex on how to add the other files I listed above and in no time, you will have your very own framework, the matthewtimothy framework. LOL
Bruce
- Create a new page template (notice I said page template and not a page). Let’s title it “Latest Blog Post” since that is what your result would be. You would need to turn this page into a template like this: