- This topic has 3 replies, 2 voices, and was last updated 7 years ago by Hash.
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- June 5, 2017 at 6:08 pm #3019PeterK2Participant
Hello
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?
MANY thanks.
June 10, 2017 at 1:01 am #3034PeterK2ParticipantIf anyone need this:
index.php:10
<?php if ( !is_front_page() ) : ?> <header class="sq-main-header"> ...keep original header code here... </header><!-- .entry-header --> <?php else : ?> ...your HTML code here... <?php endif; ?>
June 10, 2017 at 7:22 pm #3037PeterK2ParticipantAnd 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
June 10, 2017 at 10:45 pm #3066HashKeymasterGreat. Seems you figured out.
- AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.