Access methods in plugin template

Normally not (it depends on what part of the plugins code you want to use and how the plugin initializes itself in the context in which you want to do it), the main plugin files are loaded as part of the wordpress boot process and the convention is that they will load the other files … Read more

Using page template to fetch posts in page

You will want to use wp_query to query the database for the posts, which will be something like: <?php $blog_args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => ‘-1’, ‘order’ => ‘DESC’ ); $blog_query = new WP_Query($blog_args); while ( $blog_query->have_posts() ) { $blog_query->the_post(); echo ‘<a href=”‘.get_permalink().'”>’.get_the_title().'</a>’; } wp_reset_postdata(); ?> That will display all posts with just … Read more

Masonry layout within the loop

try this. i am not sure it would work for masonary layout or not. but it would give you an idea on how to make rows and columns within loop. if ($news->have_posts() ) : while ($news->have_posts() ) : $news->the_post(); //$value = $news->current_post; if($value % 3 == 0){ ?> <div class=”row”> echo “<div class=”col-lg-4″>”; <div class=”height … Read more