Multiple editable content on page

you can’t pass nothing inside the_content(); except a “read more”. To achieve what you need it could be done this way; <?php get_header(); ?> // getting the header <?php if (have_posts()) : while (have_posts()) : the_post(); ?> // the loop stuff <?php // PAGE 1 $page_id = 8454; // id of the page you need … Read more

Merging versions of wp_posts based on post_title

Found it with help from a Twitter follower! Might be handy for others. Get your backup table and import in to your live DB with a new name, e.g. wp_posts_updated. Then run this query: UPDATE wp_X_posts LEFT JOIN wp_posts_updated ON wp_posts_updated.post_name = wp_X_posts.post_name SET wp_X_posts.post_content = wp_posts_updated.post_content WHERE wp_posts_updated.post_name = wp_X_posts.post_name DON’T import your backup … Read more

Twenty Eleven Theme [duplicate]

Add <?php get_sidebar(); ?> to single.php in the same place as the other files, i.e. right before <?php get_footer(); ?> You also need to go to style.css, and remove the margins for .singular and .singular #content, .left-sidebar.singular #content. In version 1.5 of this theme css only has, .singular #content, .left-sidebar.singular #content Plus you need to … Read more

Hooking get_pages()

I find the way, but it doesn”t work for my case because the plugin uses another function to link to parent pages, without using get_pages()so the result is so inconsistent. But the filter is working. // Get all posts with the meta key ‘not_in_menu’ function get_not_in_menu_posts() { $post_ids = wp_cache_get( ‘wl_not_in_menu’ ); if ( false … Read more

get id custom tables on current page

I am not sure that I understand the question but if $bab->id is the ID in the $wpdb->post table then get_permalink($bab->id); will give you the permalink for the page. If you are trying to get the ID of the page after you click those links, try: echo $post->ID; // or… $pobj = get_queried_object(); echo $pobj->ID; … Read more

Create three unique tag page templates

If you really want to use a singular tag.php file, you can run a regex on your $_SERVER[‘HTTP_REFERER’] value to determine where you’re coming from and then load a template part depending on the result, just be sure to have a default in there. Sorry, I can’t be more specific on the regex without knowing … Read more