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

get contents and permalink from a specified page

To display content and permalink of About Us page you should use get_permalink() function by passing page id to it and instead of the_content_rss() function, you should directly echo $page->post_content by trimming content using wp_trim_words() function. The changed code is as following. <?php $page = get_page_by_title( ‘About Us’ ); $content = apply_filters(‘the_content’, $page->post_content); echo wp_trim_words( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)