Skip to content

Instantly share code, notes, and snippets.

View sanzeeb3's full-sized avatar
🚩
You are here!

Sanzeeb Aryal sanzeeb3

🚩
You are here!
View GitHub Profile
@sanzeeb3
sanzeeb3 / all-posts.php
Last active February 13, 2019 15:02
List all posts in a specific page?
function fu_list_all_posts() {
global $post;
// Return if the current post type is not page or the page is not blog.
if( $post->post_name !== 'blog' || $post->post_type !== 'page' ) {
return;
}
// Get all posts.
$all_posts = get_posts();
@sanzeeb3
sanzeeb3 / functions.php
Created September 12, 2018 15:06
Make 100% width for only wedocs documentation page
add_action( 'wp_footer', 'add_wedocs_100_percent' );
function add_wedocs_100_percent() {
?>
<script>
jQuery('.wedocs-single-wrap').parent().parent().css("width","100%");
</script>
<?php
}