For the purpose, I have used the following code after the posts loop
global $post;
$page_for_posts_id = get_option('page_for_posts');
if ( $page_for_posts_id ) :
$post = get_page($page_for_posts_id);
setup_postdata($post);
?>
<div id="post-<?php the_ID(); ?>">
<header>
<!-- Hiding the H1 element here <h1><?php the_title(); ?></h1> -->
</header><!-- .entry-header -->
<div>
<?php the_content(); ?>
<?php edit_post_link('Edit', '', '', $page_for_posts_id); ?>
</div>
</div>
<?php
rewind_posts();
endif;
As a result, the content is displayed, but it is not showing full.
For example, if there are 350 words in the content, then only first 50 words are displayed.
Could you guys help me a bit?
]]>I am searching for a theme which enables to show category-wise blog post on various pages. You can check for the Menu reference here:
https://gyazo.com/95eed4b4047c555cd77e66ca3b32d997
My aim is to create the hierarchy as follows:
www.example.com/blog/dairy
www.example.com/blog/dairy/blog-post-dairy-1
www.example.com/blog/dairy/blog-post-dairy-2
www.example.com/blog/fruits
www.example.com/blog/fruits/blog-post-fruits-1
www.example.com/blog/fruits/blog-post-fruits-2
So I need a theme which enables me to show the category wise blog posts on the pages. I am not looking for any plugins. Because the plugin CSS overrides the theme’s CSS, which messes the look and feel of design.
Could anyone please help me?
]]>I am new to WordPress and am having problems putting posts onto pages. Sorry if I am asking a stupid question.
I want my homepage to be a static page, this is fine. But I would like to have several other pages as pages that display a list of posts. So for example I would like the page entitled France to have a short introduction and then there to be a list of posts that are within the France category.
I have tried to find out about this online. Some website recommend plugins which I have then tried with no success. I am using the Customizr theme.
I would appreciate some help if possible! Thank you.
]]>add_action('genesis_after_loop', 'buyer_grid_loop_helper');
function buyer_grid_loop_helper() {
$args = array( 'category_name' => 'home-buyer', );
genesis_custom_loop( $args );
}
genesis();
Thanks!
https://www.ads-software.com/plugins/genesis-grid-loop/
]]>Maybe i’m writting in wrong topic (sorry for that), but i did’t know where
I have a problem with posts.
I used
<?php query_posts('category_name=Bez kategorii'); ?>
<div id="primary">
<div iv="content" role="main">
<?php if ( have_posts() ) : ?>
<?php forever_content_nav( 'nav-above' ); ?>
<?php
while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php forever_content_nav( 'nav-below' ); ?>
<?php endif; ?>
</div><!-- #content -->
</div><!-- #primary -->
And in every page i see the same 5 posts. Where is the problem?
Thanks for help!
]]>