Viewing 15 replies - 1 through 15 (of 15 total)
  • Can you provide a screenshot of the Custom Fields and Featured Image boxes?

    If I was the developer I would put the person’s picture as a Featured Image.

    This will be just to the right of the WYSIWYG editor.

    Thread Starter xenergie

    (@xenergie)

    Hi GenericBox,

    Thanks for the quick reply!

    I have taken a screen shot of all the fields I can access when editing a post, here for the new post I am trying to create: http://imgur.com/8tiuofQ.jpg

    and here for the existing post: http://imgur.com/ujTtxlv.jpg

    and here is a screen shot of the image used in the existing post: http://imgur.com/PC7L6d7.jpg

    I don’t see any Custom Fields on the editing page, only what is in the screenshots.

    Thanks again, hope this is what you were asking for!

    Just to certainly make sure there are no custom fields – if you could please click on “Screen Options” along the very top (in the yellow bar that says about upgrading).

    It will drop down a menu, in which will be a checkbox that says ‘Display Custom Fields’ (or something along those lines).

    Make sure this is selected, and refresh/navigate back to that post.

    If you still don’t see any Custom Fields on the page anywhere let us know!

    Otherwise:

    1/ Click on the image inside the “Featured Image” box on the right. It should open a lightbox that has “Attachment Details” — see if there is a Caption and/or Title given for this image and see if changing these changes the page.

    2/ Go to Appearance > Editor and look for the file that is called something like “About Us Single Post.php” – click on it, and use CTRL+F to find “staff-bio”

    Inside the <h4> tags there should be a <?php code, as well as between the <p> tags – these codes will tell us where it is pulling these values from.

    Thread Starter xenergie

    (@xenergie)

    Ah, OK. I enabled ‘Display Custom Fields’ and this is a screen shot of what shows up for the existing post: http://i.imgur.com/xmqrM5Q.jpg

    Here is where the text appears in the source of the page:

    <h1>Lorna McDowell (MIICH MMII)</h1>
    
    <div id="staff-bio">
    
    <img width="210" height="150" src="http://www.xenergie.com/wp-content/uploads/2012/07/Lorna.png" class="attachment-medium wp-post-image" alt="Lorna" title="Lorna" />
    <h4>Lorna McDowell (MIICH MMII)</h4>
    <p><p>Organisation Analyst & International Leadership Coach</p>
    </p>
    
    </div>
    Thread Starter xenergie

    (@xenergie)

    I found the php file in the Appearance editor, here is the code for the staff-bio:

    <div id="staff-bio">
    
    <?php if ( has_post_thumbnail()) the_post_thumbnail('medium'); ?>
    
    <h4><?php the_title(); ?></h4>
    <p><?php the_excerpt(); ?></p>
    
    </div>

    Thanks a million for helping me so much!

    Thread Starter xenergie

    (@xenergie)

    So it seems like ‘the_excerpt’ is what I’m trying to edit, I will see if this is related to the image or is a custom field of the post (although it looks like there are no custom fields filled in?)

    Okay – it doesn’t appear to be set by a custom field – however I have viewed the source code myself and unfortunately this is mostly unhelpful because once a page renders the PHP functions that call data are translated into raw HTML.

    Basically that means that while it might say “Lorna McDowell” in the View Source – the actual code of the page might have <?php get_attachment_metadata('title'); ?> or some other function created to place this data.

    If you can go to:

    Appearance > Editor and find that About Us Post Template file (it should be called something like aboutus-template.php or something like that.

    Then search for “staff-bio”, copy and paste that block of code.

    But first, if you haven’t – have you tried clicking on the Featured Image and seeing if the image has any information on in on the next screen that pops up?

    Updating quicker than I am, sorry for the disjointed replies.

    Okay – so now you need to go to functions.php in the Editor screen.

    CTRL+F for the_excerpt — it should be in a block of code that looks like this:

    function the_excerpt(){
       ...
       ...
    }
    Thread Starter xenergie

    (@xenergie)

    Ya sorry, I meant to say this is all the data that is associated with the image: http://i.imgur.com/rReT2Nh.jpg

    So it doesn’t seem to show up for the image.

    There isn’t a function called the_excerpt in the functions.php either (this is the full text of that file:

    <?php
    
    /* code to activate menus */
    
    add_theme_support( 'menus' );
    if ( function_exists( 'register_nav_menus' ) ) {
    register_nav_menus(
    array(
    'Top Nav' => 'Top Navigation Menu',
    'Main Nav' => 'Main Navigation Menu',
    'About us' => 'About us Navigation Menu',
    'What we do' => 'What we do Navigation Menu',
    'Inspiration store' => 'Inspiration store Navigation Menu',
    'Client area' => 'Client area Navigation Menu',
    ));}
    
    /* code for thumbnails and custom thumbnail sizes */
    
    if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' );
    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'thumb', 100, 100, true );
    	add_image_size( 'staff', 60, 40, true );
    }
    
    ?>

    Here is a list of all the files in the Appearance editor if its of any use:

    Templates

    Archives
    (archive.php)
    category-blog.php
    category-books.php
    category-coach-supervision-culture-change-programmes.php
    category-inspiration-store.php
    category-management-training-workshops.php
    category-profiles-psychometric-testing-tele_skype-coaching.php
    category-team-and-locations.php
    footer-home.php
    Footer
    (footer.php)
    Theme Functions
    (functions.php)
    Header
    (header.php)
    Main Index Template
    (index.php)
    About us Page Template
    (page-aboutus.php)
    Client area Page Template
    (page-clientarea.php)
    page-home.php
    Inspiration store Page Template
    (page-inspirationstore.php)
    Inspiration store (no related content) Page Template
    (page-inspirationstorecat.php)
    What we do Page Template
    (page-whatwedo.php)
    Page Template
    (page.php)
    Search Results
    (search.php)
    sidebar-aboutus.php
    sidebar-aboutuscat.php
    sidebar-blog.php
    sidebar-clientarea.php
    sidebar-inspirationstore.php
    sidebar-inspirationstorecat.php
    sidebar-search.php
    sidebar-staff.php
    sidebar-whatwedo.php
    single-aboutus-team.php
    single-aboutus.php
    single-blog.php
    single-clientarea.php
    single-inspirationstore.php
    single-whatwedo.php
    Single Post
    (single.php)

    Styles

    Stylesheet
    (style.css)

    Thread Starter xenergie

    (@xenergie)

    I searched each of the files I listed above and couldn’t find a function definition for the_excerpt anywhere!

    I’m not sure where that function could be defined to be honest, sorry!

    Yep my bad, the_excerpt is a WordPress function, it pulls the first 55 words of the post unless a custom excerpt is given (or a <!--more--> tag is present).

    If I am not mistaken, in the Post editor – if you change from the [Visual] tab to [HTML] tab,

    The post should appear something like:

    <strong>Organisation Analyst & International Leadership Coach</strong>
    <!--more-->
    <p>One of Ireland’s Top 100 Businesswomen (Irish Entrepreneur 2007) and finalist in Image magazine Entrepreneur of the Year 2008, Lorna is an experienced international executive leadership coach, learning facilitator, consultant in organisation analysis, and leadership coaching supervisor/mentor. She has a background in international corporate communications, branding, organisation culture and group relations. Education to Masters level (Organisation Analysis – Grubb Institute UK).</p>

    It is whatever that is above this <!--more--> tag that is being applied under the image.

    So to your new posts, put whatever you want under your image on the first line, then switch the [HTML] tab and enter a <!--more-->

    and see if that works.

    Thread Starter xenergie

    (@xenergie)

    Great, thanks you finally cracked it!

    Turns out ‘Excerpt’ is one of the other ‘Screen options’ that you can choose to display in the same way as ‘Custom Fields’.

    For your own information, the <!–more–> tag wasn’t needed in the end, just needed to add in the excerpt!

    Thanks a million for all the help, I know I wouldn’t have been able to solve this without your help! Was actually driving me mad for ages but I kept putting it off!

    No problem, glad you got it sorted.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Problem with Post content appearing as title’ is closed to new replies.