Unable to get_the_content(); of a post in WordPress via AJAX

I’m trying to ajaxify my WordPress theme and I use the method described here and I’m now trying get_the_content of post via functions.php. Using jQuery, when I do alert(data) I get the ‘title’ echo but not the content of the existing post I want (returns 0). The jQuery part $(‘.ajaxed,.ajaxed a,.menu-item-home a,.menu-item-object-page a’).live(‘click’, function(event) { … Read more

Testing for post title in ‘if/else’ statement returns no content

I’m testing for a certain fixed post on an about page, I guessed that the best way is to test for post title (?). Here’s my code, what’s going wrong? <?php if (is_page()) { $cat=get_cat_ID($post->post_title); $posts = get_posts (“cat=$cat&showposts=35″); if ($posts) { foreach ($posts as $post): setup_postdata($post); ?> <div class=”clear”></div> <h3><?php the_title(); ?></h3> <div class=”clear”></div> … Read more

Adding short codes from a page’s content on header and hiding the same from page’s content

I have created a page and added the following shortcode from wp-orbit-slider [orbit-slider category=”test”] I want the contents of [orbit-slider category=”test”] be displayed on the header part, instead of on the content area part, which the wordpress usually does . I tried adding the the short code on header.php and it works, but the same … Read more

Static files or dynamic WP pages for “static content”?

Ok = I’ve looked around a lot for a clear answer to this, but find very few real answers. I would really appreciate some info from experienced individuals. A tiny bit of background. I’ve worked content generation (among other thing) on a largeish website for many years, and it follows the pretty basic file system … Read more

Which template holds what to display when search returns nothing

Question is clear I guess. Normally, which template is returned when no search results are found. I would say search.php, but my parent theme’s (twenty thirteen) search.php looks like this (slightly edited): <?php if ( have_posts() ) : ?> <header class=”page-header”> <h1 class=”page-title”><?php printf( __( ‘Search Results for: %s’, ‘twentythirteen’ ), get_search_query() ); ?></h1> </header> … Read more