WordPress.org

Ready to get started?Download WordPress

Forums

Cakifo
[resolved] Same Author in the Headline (4 posts)

  1. kendinol
    Member
    Posted 1 year ago #

    Hey Jesper,

    Very soon I will sign up on Theme Hybrid but before that I wanted to be sure of using this theme on my magazine.
    Currently, I am trying to use the theme in localhost but a few times tried online too. But I have this problem, in the headlines section, altough there are more author in the page, only one author's name is shown in all the posts under headline section.

    Any suggestion for that?

    Thanks,
    Nice work,

  2. Jesper Johansen (jayjdk)
    Member
    Theme Author

    Posted 1 year ago #

    Hello,

    Thank you for the bug report. It's has been fixed in the development version: https://github.com/jayj/Cakifo/commit/581ed411158fd9773f1498ce790002ae2b807c60

    While I never recommend editing the parent theme files yourself, it's properly the best solution here until Cakifo 1.6 is released.

    Open section-headlines.php, find line 58 and add this before the $GLOBALS stuff: setup_postdata( $post );

    Hope that helps you.

    - Jesper

  3. kendinol
    Member
    Posted 1 year ago #

    Thanks for that. Yesterday, I did this:

    I've created a new child theme and under that I've created a new file called section-headlines.php, in that file I added these new loops :)

    <?php //---------------------- I Category  ?>
    <?php $the_query = new WP_Query( 'showposts=3&cat=147' ) ?>
    <div class="headline-list">
    <h2 class="widget-title"><a href="<?php echo get_category_link(147); ?> "><?php echo get_cat_name(147) ?></a></h2>
    <ol>
    <?php while ( $the_query->have_posts() ) :
    	$the_query->the_post();?>
    	<li class="clearfix">
    
    <?php	if ( current_theme_supports( 'get-the-image' ) )
    								get_the_image(
    									array(
    										'size'          => 'small',
    										'image_class'   => 'thumbnail',
    										'default_image' => THEME_URI . '/images/default-thumb-mini.png'
    									)
    								); ?>
    
    	<h3 class="post-title entry-title"><a href='<?php echo the_permalink() ?>'><?php echo get_the_title() ?></a></h3>
    	<span class="headline-meta">
    	<time class="published"><?php echo get_the_date(); ?></time>
    	| <span class="author vcard">
    	<?php echo the_author_posts_link(); ?>
    	</span></span></li>
    
    <?php endwhile;
    wp_reset_postdata();
    ?>
    </div>

    It seems it is kind of unreasonable thing i did considering the hybrid framework and the theme. I tried what you said, seems working on author but I cant show subcats in headlines. I wait for the new version.

    Thanks

  4. Jesper Johansen (jayjdk)
    Member
    Theme Author

    Posted 1 year ago #

    You can use a section-headlines.php in your child theme but then you won't get any changes made to it in the next version.

    I'm not completely sure what you're doing. There shouldn't be any need to create that file in a child them. You should be able to select child categories on the Appearance > Theme Settings page. It won't show that it's a child category, I might take a look at that.

    - Jesper

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.