Removing standard links in the posts page
Removing standard links in the posts page
Removing standard links in the posts page
WordPress keeps crashing my server
You may want to also consider using multiple taxonomies, not just one- categories. One taxonomy for location, another taxonomy for content type, then you won’t have duplication of sub-categories. see taxonomies in codex for more info.
You are probably calling it too early and the context for the current post is not filled yet. get_author_posts_url() accepts author’s ID as first argument, You probably need to retrieve and pass that to it, similar to how you retrieve the info for following call.
You can use get_page_by_title() or get_page_by_path() to retrieve page object that will have title and content (which you might need to further process a bit, depending on how complex it is). And if I remember right get_the_post_thumbnail() gives you featured image.
Add or replace this to your register_taxonomy (in functions.php): ‘query_var’ => ‘city’, ‘rewrite’ => true Then append this to your functions.php add_filter(‘post_link’, ‘city_permalink’, 10, 3); add_filter(‘post_type_link’, ‘city_permalink’, 10, 3); function city_permalink($permalink, $post_id, $leavename) { if (strpos($permalink, ‘%city%’) === FALSE) return $permalink; // Get post $post = get_post($post_id); if (!$post) return $permalink; // Get taxonomy terms … Read more
So, I need to say that now is all ok. I can’t belive this :’) For about a month I asked a lot of people and nobody didn’t know what’s the problem. It was cause we had bad nginx config. Now nginx is turned off for a some time. Apache is ok. Thank to s_ha_dum, … Read more
Your description of the problem is not very clear, and your inconsistent code formatting makes that hard to read (plus I am pretty sure some code is missing), but if the problem is running the query multiple times you can solve that with a static variable. function get_gametitle_info() { static $game_info_query = false; if (false … Read more
You could do (untested): if( get_post_type($post->post_parent) == ‘apples’ ){ get_template_part(‘single-apple-child’) } else { /* the rest of your current single page */ } Though there may be a better way!
You need to apply the do_shortcode to the content itself. Example below: function test_func( $atts, $content ) { extract( shortcode_atts( array( ‘foo’ => ‘no foo’, ‘baz’ => ‘default baz’ ), $atts ) ); return “<div class=”test”>”.do_shortcode($content).”</div>’; } add_shortcode( ‘test’, ‘test_func’ ); So in other words you need to care about the shortcode that print the … Read more