Home › Support › Square › Add custom HTML instead of slider, and show posts
This topic contains 3 replies, has 2 voices, and was last updated by HashThemes 8 months, 1 week ago.
I need show posts on front page, so I deleted front-page.php from theme, but instead of header image I want post HTML code only front page with posts, how can I do that? I’m familiar with PHP.
And second thing, I want insert actually some code from plugin Visual Composer, so the html code contain shortcodes, will these shortcodes work, if I insert them to .php files?
If anyone need this:
<?php if ( !is_front_page() ) : ?>
...keep original header code here...
</header><!-- .entry-header -->
<?php else : ?>
...your HTML code here...
<?php endif; ?>
And if you want use another page so you don’t need generate html code (you can set this page to private if you want) use this code few lines below in index.php.
<div class="sq-container sq-clearfix">
<?php if ( is_front_page() )
echo apply_filters( 'the_content', get_post_field( 'post_content', '123') );
replace 123 with your page’s number
Great. Seems you figured out.
You must be logged in to reply to this topic.