Hi,
You guys have been fantastic in helping me learning how to customize vantage pro, and I hope that you can help me on this too :-)
I would like to customize the main blogpage, archivepage and the single post page. I am fully aware that I have to hack into archive.php, single.php and ? – for the main blog page. I intend to do that via a child theme.
I am trying to duplicate the blue ribbon under the main menu, that you can see in this example:
http://wptest01.zkagen-marketing.dk/indholds-side-2/
On this page, you can also see additional explanations on what it is that I am trying to accomplish.
Can you help med whit this?
Hi Hans
With some effort this is possible.
I started going through this step by step but there are quite a few that need to be taken. Let me see if I can just work this up for your quickly.
I hate to pull back from a task but I’m 15mins into this and unfortunately need to stop. It’s bigger than we can help with from a support perspective given our current backlog. I’d guess this is around an hour’s work. The Vantage content is constrained in header.php with:
You need to move that to below your new title row in order for it to be 100%. This means touching almost all the regular theme template files.
Here is what I did in archive.php:
<?php /** * The template for displaying Archive pages. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package vantage * @since vantage 1.0 * @license GPL 2.0 */ get_header(); ?> <header class="page-header"> <h1 id="page-title"><?php echo vantage_get_archive_title() ?></h1> <?php if ( is_category() ) { // show an optional category description $category_description = category_description(); if ( ! empty( $category_description ) ) echo apply_filters( 'vantage_category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' ); } elseif ( is_tag() ) { // show an optional tag description $tag_description = tag_description(); if ( ! empty( $tag_description ) ) echo apply_filters( 'vantage_tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' ); } ?> </header><!-- .page-header --> <section id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php get_template_part( 'loops/loop', siteorigin_setting('blog_archive_layout') ) ?> </div><!-- #content .site-content --> </section><!-- #primary .content-area --> <?php get_sidebar(); ?> <?php get_footer(); ?>You can see how I moved the title up. That’s the essence. Then a section of CSS will need to be written to support this and as I mentioned earlier, the starting location of .full-container needs to change for the whole theme.
Wish I could work this up, it’s just too big of a task.
(If you’re interested in getting help at any point, the guys at http://codeable.io are great)
Hi Andrew,
I deeply appreciate your effort to try and help me.
I knew that I was stretching the boundaries in which I could expect support help.
If I sort it out, I will come back here with the details, so others can benefit from it.
Again, thanks for your time!
HC
Thanks very much for your understanding here, I appreciate it. Good luck with this task.
Hi Andrew,
I have to modify main blog page , archive pages and single post pages.
I know that archive.php controls archive pages, and sigle.php control single post pages, but which template file controls the main blog page?
That would most likely be: index.php.
Hi Andrew,
Mission accomplished :-)
Best done through Vantage child theme.
Add to stylesheet.css
/* Blue Ribbon */ #primary.hide-title h1.entry-title { display: none; } .blue-header { padding: 15px 0; color: #fff; background: #8BA5BF; } .blue-header h1 { width: 95%; max-width: 1080px; margin: 0 auto; padding: 0; font-weight: 300; }Edit files: content-page.php, content-single.php
Find:
Change to:
Edit file: header.php
Find:
Change to:
<?php do_action( 'vantage_before_main_container' ); ?> <?php if(!is_front_page() && (is_home() || is_page() || is_single() || is_category())){ ?><div class="blue-header"><h1><?php $title=explode('|-|', wp_title('|-|', false, 'right'))[0]; if(is_archive() && is_category()) echo vantage_get_archive_title(); else echo $title; ?></h1></div><?php } ?> <div id="main" class="site-main"> <div class="full-container"> <?php do_action( 'vantage_main_top' ); ?>Hi Hans
Nicely done! Really glad to hear you made progress with this, thanks for sharing your solution with everyone.