• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Magazine Pro: Modify to Have Post Title Appear Instead of Date on Featured Post

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Magazine Pro: Modify to Have Post Title Appear Instead of Date on Featured Post

This topic is: resolved

Tagged: .post-info, Magazine Pro, modify

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 4 months ago by rogue.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 15, 2015 at 11:55 am #144479
    rogue
    Member

    Hi there, I am using the Magazine Pro theme. Instead of having the date appear as an overlay to my featured image at the top of the page I want to have the title appear. Has anyone had any luck modifying the functions.php file to do this with the snippet from studiopress on customizing post info (http://my.studiopress.com/snippets/post-info/)?

    Thanks!

    March 15, 2015 at 2:25 pm #144531
    Tonya
    Member

    Hello,

    Before I start, here is a similar question and solution, albeit this one is swapping with the category for the date. But it gives you some of the explanation.

    OK, so the date overlay onto the Featured Image is handled in jQuery in file magazine-pro/js/entry-date.js. Here is what is happening:

    1) When the browser loads the page, the jQuery grabs the .entry-time HTML and moves it to within the <a> element, which is the image wrapper.

    2) You want to change that behavior to move the .entry-title instead.

    jQuery(function( $ ){
    
        // add js body class
        $('body').addClass('js');
    
        // find time for each entry and move it inside the image link
        $('.home-middle article, .home-top article').each(function(){
            // var $time = $(this).find('.entry-time');
            
            //* Swapping out time for title instead
            var $el = $(this).find('.entry-title');
    
            //* Remove the a link tag wrapper from .entry-title
            $el.children('a').contents().unwrap();        
    
            $(this).find('a.alignleft, a.alignnone, a.alignright')
                //* Move .entry-title here
                .append($el)
                
                //* Replace the h2 with span tags
                .find('.entry-title').replaceWith(function() { 
                    return $('<span>').addClass('entry-title').text(contents);    
                });        
        }); 
    	
    });

    Notice that there is an extra line of code here to remove the <a> tag wrapper as this semantically incorrect, as the image + title are already wrapped by a <a> (we don't want to embed a link within a link).

    Be aware that <h2> wrapped instead of a <a> is semantically incorrect. It should be changed to <span>. This is why the last couple of lines includes a .replaceWith() function, i.e. to swap out the h2 with span.

    3) Now you need to style it. If you look in your style.css file on line 960, you'll find .js styling for the .entry-time. You want to change this to .entry-title instead as follows:

    .js .content .home-middle a .entry-title, 
    .js .content .home-top a .entry-title {

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 15, 2015 at 10:15 pm #144572
    rogue
    Member

    Tonya, thanks so much for the response. I am able to recreate you suggestions for the categories but when I try with entry_title it doesn't seem to work. Do I need to modify the section just below post_info? I tried the following language but it doesn't seem to work: By [post_author_posts_link] [post_comments][entry_title before='']. Also, do I need to modify Genesis Simple Edits?

    Really appreciate your help!

    March 16, 2015 at 3:32 am #144592
    Tonya
    Member

    Hello,

    Sorry I shouldn't have shared the initial category swap post as it probably confused you. Instead follow the steps that I laid out up above. Then in the Featured Post widget, make sure you have Show Post Title and Show Post Info selected (checked). I have for post info: By [post_author_posts_link] [post_comments][post_categories before='']. You can set it to what you want.

    And you shouldn't have touch anything in Genesis Simple Edits.

    If you are still having trouble, then please share a link to your website so that I can take a closer look.

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 16, 2015 at 4:48 pm #144674
    rogue
    Member

    Ahh, got it. OK, I will try that out. But I think that was my problem. So the title will show up now in the colored bar instead of below the pic, I take it. I got it to work for categories but the text shows up black even though it’s supposed to be white.

    Thanks so much

    March 17, 2015 at 4:01 pm #144767
    rogue
    Member

    Worked!

    Thanks.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble