1

I cannot for the life of me find the code for this particular item:

enter image description here

Usually in other themes there's the link "Edit" on the front page and post page to directly go to edit the post in admin panel. However, in this theme it is missing and I'm looking to add it.

But I'm completely lost here. The theme I'm using is https://wordpress.org/themes/geiseric/ but it inherits a lot of stuff from https://wordpress.org/themes/kuorinka/ .

Could somebody please help me?

Late edit: So, I figured out by adding echo "test.test.test" in at various places in index.php and single.php. In index.php and single.php it's this part that I need to change it's somewhere inside there

get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) );

I have no idea how to go from there. I don't get the Theme code structure at all..

2

This should be located in the entry-meta.php file of the parent theme (kuorinka). Here is the code:

<?php if ( 'post' == get_post_type() ) : ?>
    <div class="entry-meta">
        <!-- Date & Author name-->
        <?php kuorinka_posted_on(); ?>
        <!-- Comments count -->
        <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
            <span class="comments-link"><?php comments_popup_link( false, false, false, 'comments-link', false ); ?></span>
        <?php endif; ?>
    </div><!-- .entry-meta -->
<?php endif;

The function kuorinka_posted_on() is defined again in the parent theme in kuorinka\inc\template-tags.php on lines 36-58.

  • 1
    Holy sheit. This worked! Much obliged! You need to explain to me how you got there. I want to be able to debug like that :P. Added the edit this link with if (current_user_can( 'manage_options' )) {, or other suggestions? – Grumpy ol' Bear Feb 16 '16 at 13:30
  • 1
    Well I've worked with many themes... Unfortunately not all theme authors build the things the same way... Some place it there, other use the blog template, others use weird functions in functions.php... The easiest way is just to inspect the <div> that contains the entry info and search template by template for it's class/id. – denis.stoyanov Feb 16 '16 at 13:39
3

I dont know thoses theme, but in wordpress normaly you use:

edit_post_link()
edit_comment_link()
edit_tag_link()
edit_bookmark_link()

in your templates, inside your loops

maybe some themes use custom functions for that, if so you normaly will find them in functions.php of the theme

check the codex: https://codex.wordpress.org/Function_Reference/edit_post_link

  • Yes, I know these. Problem is I can't seem to find where that particular items is located in these themes. I'm at loss, because it's so confusing... – Grumpy ol' Bear Feb 16 '16 at 12:38
  • So, I figured out by adding echo "test.test.test" in at various places in index.php and single.php. In index.php and single.php it's this part that I need to change it's somewhere inside there get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); I have no idea how to go from there. I don't get the Theme code structure at all.. – Grumpy ol' Bear Feb 16 '16 at 13:01
  • 1
    sometime i'ts like finding a needle in a haystack ;) i just looked a the theme, and it use Hybrid framwork (themehybrid.com/docs)... maybe documentation can help you. searching in all file of the theme for bit and pieces can help you find what you search. – Tribalpixel Feb 16 '16 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.