homepage
-
is it possible to show the featured section with a static homepage?
-
It is a bit beyond what I can assist with, but I can give some pointers.
Create a new page template, and where you want to show the featured posts, try adding something like this:
<?php get_template_part('inc/featured'); ?>Then you also need to edit /inc/featured.php, remove line 15 and 30 entirely. These two:
<?php if ( is_home() && !is_paged() && ( get_theme_mod('featured-posts-count','3') !='0') && $featured->have_posts() ): // Show if posts are not 0 ?>and
<?php endif; ?>This should make the featured posts appear, but I can’t guarantee that it will work.
should i add the code in a html block in the page template?
Hmm, see this:
I think using page.php in the theme as base for your page template could be a good move.
It works, but it’s bugged`
https://postimg.cc/nsQMBGp0especially the navigation
Use this as page template: https://pastebin.com/raw/80Vvnbz2
And use this as /inc/featured.php: https://pastebin.com/raw/vjmtXj6k
Works fine for me.
Thank you very much, it works. That would be a good idea for the plugin too. I really appreciate this support. I had tried another theme for the last few weeks and now I’m back to your themes. A really unique design with fast and good support.
Thanks
one question. Is it possible to show the featured part only on the homepage, not on all pages?
If you have it set as a page template for the homepage, it should only appear on the homepage. Did you edit page.php by any chance? That is wrong. If so, it will appear on all pages.
You need to create a new php file, name it frontpage.php for example, with the page code I gave above. Then select the template for the frontpage like this:
https://s3.amazonaws.com/helpscout.net/docs/assets/55192029e4b0221aadf23f55/images/60e6f7d48556b07a2884da74/file-mtqt0byV77.pnghow do i create a new .php file?
If you have a FTP-client like FileZilla, you can just copy or download /wp-content/themes/shapebox/page.php, rename it and upload frontpage.php.
If you don’t have a FTP client, there seem to be other ways to do it too, which I’ve never tested:
https://www.quickonlinetips.com/archives/2014/06/wordpress-theme-files-without-ftp/
https://articlebin.michaelmilette.com/uploading-a-wordpress-page-template-without-ftp/completely new worlds that i discover here, thank you very much
Did you get it to work?
yes.
Its not possible to show your alx plugin widget in single pages?
The topic ‘homepage’ is closed to new replies.
