Tag Info

Hot answers tagged

5

There is even an example in the WordPress codex here for this: http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-3,-8' ); } } add_action( 'pre_get_posts', 'exclude_category' ); Just modify ...


5

Untested, but try: <?php echo get_the_title( get_option( 'page_for_posts' ) ); ?> But it's somewhat hackish. Really, the page_on_front and page_for_posts are intended to be nothing more than placeholders for the site front page and blog posts index page.


3

First, you need to familiarize yourself with the WordPress Template Hierarchy, so that you ensure that you are modifying the appropriate template file: Home: Blog Posts Index page; template file: home.php Front Page: Site Front Page; template file: front-page.php I am assuming that you want to display a static front page, and to display your blog posts ...


3

Create a shortcode to embed the content. This will always be synchronized. Sample code from an older project. Just updated. :) GitHub: https://gist.github.com/3380118 ยท This post in German (auf Deutsch) on my blog. <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Embed Post Shortcode * Description: Embed any page, post or custom post type with ...


3

There are many options. Subscribe2 is very popular, although I've never been a fan. http://subscribe2.wordpress.com/ MailChimp and FeedBurner both offer RSS to Email delivery which can be used for this as well. JetPack includes a subscribe to new posts function as well: http://jetpack.me/2011/11/29/how-to-use-email-subscriptions-in-jetpack-1-2/


3

You need to use the_content instead of the_excerpt when you display your 'single' post. If you would post your code, you might get a more detailed answer.


3

Actually your site is indexed all 176 pages. It would probably help your search results if you changed your permalink structure to something other than default. You should also get a yourself a Google Webmaster Tools account so you can see how your site gets indexed and crawled.


3

WordPress now has a post format called status which is meant to be used for short status updates. You can see a lot of information about how to use these standard post formats in the Codex page on Post Formats


3

Posts are a broader category than they initially appear to be. The post is any content, even if you're using WP as a CMS. While it might seem like a post is a blog post, really it's anything you post on the site. Disabling it will kill all content. Better to turn off the various bloggy components, such as comments, and then edit the template files to remove ...


3

The very broad answer for why this doesn't work is that the internet is stateless. Basically each request for a page is a separate and unique instance from other page requests. Example Let's say post-1 is in category-1 and category-2. When Wordpress loads post-1 on single.php it has no way of knowing how the user arrived at the page. It only knows that ...


2

I fixed this in the following way. Go to the "Network admin". Then Sites โ†’ Edit โ†’ Settings โ†’ Permalink Structure. Remove blog from it. Then I removed blog from two lines in table which obtained as a result of the query: SELECT * FROM wp_options WHERE option_name = "permalink_structure" OR option_name = "rewrite_rules" Useful link on subject: How To ...


2

There are Conditional Tags for this: is_archive() and is_category() respectively. For a custom post type archives you could use is_post_type_archive(). There are many conditional tags available, see above linked codex page. To determine the blog archive you have to additionally check for the post type post, take a look at this question and the answers for ...


2

You can get the blog page id using this: get_option('page_for_posts');


2

An AJAX request is a new request to the server, and it is a request to admin-ajax.php. That is not a single post page. Any logic that depends on is_single() or any other page level template tags like it, won't work. If your AJAX callback needs that sort of information you must pass it to that callback in your AJAX request-- something like: function ...


2

Can I use the following code for my question. <?php $args = array('taxonomy' => 'blogcategory'); ?> <?php $tax_menu_items = get_categories( $args ); foreach ( $tax_menu_items as $tax_menu_item ):?> <a href="<?php echo get_term_link($tax_menu_item,$tax_menu_item->taxonomy); ?>"> <?php echo ...


2

A very simple solution: Add a second editor field to the post editor, and use the meta field content in a filter on the_content. add_filter( 'the_content', 'wpse_77811_extra_content' ); function wpse_77811_extra_content( $content ) { return $content . get_post_meta($post->ID, '_t5_extra_box', TRUE ); }


2

On the most basic level, you could prevent all posts from being displayed by simply ripping the Loop out of the template that is displaying your "landing page." If you only wish to modify the posts being displayed on your "landing page," (say for instance should you be using Wordpress post object as songs and attempting to display a collection of songs) you ...


2

Create a page with a custom page template, then create a custom WP_Query object to return your last posts. You can get something like: <?php /* Template Name: Blog Page */ get_header(); $args = array( 'post_type' => 'any', #all post types 'posts_per_page' => 10 #get 10 posts ); $query = new WP_Query( $args ); if($query->have_posts()): ...


2

I don't know if I'm covering everywhere the post functionality is linked from, but adding the following code to functions.php should at least remove the comments links from the administration menu, the toolbar, and the dashboard: add_action( 'admin_menu', 'remove_admin_menus' ); add_action( 'wp_before_admin_bar_render', 'remove_toolbar_menus' ); add_action( ...


2

There is a list of conditional tags here - http://codex.wordpress.org/Conditional_Tags


2

index.php and archive.php might be the same but don't have to be the same. index.php will display your blog post archive and in the absence of archive.php (or other more specific archive files) it will display your date, author, etc. archives as well. But it doesn't have to. You can, if you want, display your archived differently that your main blog index. ...


2

When you make a page the page for posts, it's no longer a "page" in the conventional sense. Refer to the Template Hierarchy for home page display- the quickest fix is to rename your blog template home.php, and WordPress will load that before index.php.


2

A better way to to do this is to instead of a subdirectory, use a subdomain like blog.website.com. The reason for this is that a DNS record can be made to the other server for the subdomain, which is not possible with subdirectories. A subdirectory is possible, but you would have to use frames, a .htaccess redirect or another way which is totally not stable ...


2

Looks like you have 2 WordPress installations. One for the main site, other for the Blog. http://parlourdc.com/wp-content/plugins/akismet/readme.txt http://parlourdc.com/blog/wp-content/plugins/akismet/readme.txt If that's not on purpose, you have a blog folder in your site root that should be renamed/deleted as it contains a blank WordPress. If you made ...


2

You've got 2 separate issues here Word -> Wordpress: As @One Trick Pony said, the easiest way to sort this will be using the Paste from Word button on the post editing toolbar. Images will probably need to be inserted manually MathType -> WordPress: You'll need to install the Latex for WordPress plugin and use MathType to export the equations out in a ...


2

Is WordPress configured to use www or without www? Your server seems to be listening only for the www version and tries to redirect non-www requests to the www version. Considering that you provided a link to the non-www version of the domain above, my guess is that WordPress is trying to hook on to http://compassionpit.com, but your server redirects those ...


2

Not sure if you can use a complete different template but you can use different template parts using the global $page variable. Example: global $page; if ( $page == 2 ) { get_template_part( 'page', 'two' ); } else { get_template_part( 'page', 'default'); } This would load the template file page-two.php or page-default.php depending on ...


2

You need to do three things: firstly, your markup is incorrect, take the container_24 div the main content sits in and make it grid_17 so it doesn't take up the entire width of the container div. The sidebar needs to go in the container div along with the content, else it will be pushed downwards by the container div Because of the above issues, you've ...


2

there's a meta tag in your body, causing refresh: <meta http-equiv="REFRESH" content="0;url=error.htm">


2

Have a look at the template hierarchy page. Custom post types will use single-{post_type}.php template if it exists.



Only top voted, non community-wiki answers of a minimum length are eligible