The ad detail template is wpadverts/templates/single.php, if you want to customize the HTML that wraps the single.php file, see “Custom Post Type Template” here https://wpadverts.com/documentation/child-themes-and-templates/
Thread Starter
lazyym
(@lazyym)
Okay, I have the template installed using the twenty sixteen theme. I tested it and it works! Holy crap, you’ll help teach me yet!
I’d like to add some small add to any share buttons spanned to the right, behind the entry-title. Unless you have a better suggestion. I have the script ready to go. I just need to know exactly where and how to implement it.
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
// Include the single post content template.
get_template_part( 'template-parts/content', 'single' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
if ( is_singular( 'attachment' ) ) {
// Parent post navigation.
the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
) );
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
the_post_navigation( array(
'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
'<span class="post-title">%title</span>',
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
'<span class="post-title">%title</span>',
) );
}
// End of the loop.
endwhile;
?>
</main><!-- .site-main -->
<?php get_sidebar( 'content-bottom' ); ?>
</div><!-- .content-area -->
And if you have any suggestions why the previous/next buttons don’t work as long as we’re in there, that would be helpful.
Thanks!
The title for your page template is in template-parts/content.php file you would need to add it there if you wish to have sharing button after the title or you can use one of the sharing plugins available in WP.org repository maybe they will have an option to insert buttons after the title.
The previous and next navigation is kind of disconnected from the ads list, i would recommend hiding it for Adverts.