Hide the icon Standard (Post Formats), in the Pages

Community Forums Forums Design Tips and Tricks Hide the icon Standard (Post Formats), in the Pages

This topic is: resolved

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  macrunner 6 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #108433

    macrunner
    Participant
    Post count: 45

    If I enable support for Post Formats everything works, but all pages show the icon Standard (default.png)
    Any page that I create I see the icon Standard.
    I would like to hide the icon Standard, only in the pages.

    I also tried a new WordPress installation with Genesis + Genesis Sample.
    In the functions.php I added the following code to support, and nothing else:

    add_theme_support( 'post-formats', array(
    	'aside',
    	'audio',
    	'chat',
    	'gallery',
    	'image',
    	'link',
    	'quote',
    	'status',
    	'video'
    ) );
    
    add_theme_support( 'genesis-post-format-images' );

    In the images folder I added the post-formats folder, which contain icons.
    Same result, if I create a new Page that shows the icon Standard.
    Is there a way to disable this icon? (pages only)

    Thanks for any help

    #108440

    rfmeier
    Participant
    Post count: 603

    Hello,

    There are a few ways to do this. I would do this by replacing the default Genesis callback for the appropriate action and replacing it with a custom callback function. Within my custom function, I would then call the original Genesis callback function (that will display the post format icon) if and only if a certain criteria is met. I included an example below;

    https://gist.github.com/rfmeier/d87c2fd0352b428d20a9


    #108454

    macrunner
    Participant
    Post count: 45

    Hi Ryan,

    it works fine, great! But if I use it with the code that disables links and alt text: http://www.studiopress.com/forums/topic/disable-link-and-alt-on-the-icons-post-formats/

    a conflict occurs, the icons doubles:

    screenshot

    The first icon is as I would like, without link and without alt info, but is also seen in Pages.
    The second icon is seen only in Posts, but has links and alt info.

    Thank you so much for the help

    #108456

    rfmeier
    Participant
    Post count: 603

    @macrunner

    I forgot about that already. The logic for can just be adjusted to the code that removed the link. Here is the updated code to the gist that will remove the link. You can disregard the original code I originally gave you in this thread.

    https://gist.github.com/rfmeier/8cbe9895612a9dff5a95


    #108462

    macrunner
    Participant
    Post count: 45

    It works perfectly!
    Thanks for helping me, you’re very kind ;)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.