how to disable the standard content template

Support Area Forums Responsive Visual how to disable the standard content template

This topic contains 6 replies, has 2 voices, and was last updated by  Bill Robbins 2 years, 9 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
URL to the page in question: http://http://
  • Author
    Posts
  • #23295

    Thomas Pientka
    Participant

    hey bill,

    since the page is close to be finished i find out that i don’t need the standard content template anymore – my client uses picture and gallery. so i like to disable the template. somehow if i delete content.php nothing happens.

    also i use the video template for googlemaps (it works perfectly well) – can i change the template name and the videobox description? and if so, can i take the icon from the standard template for the maps template?

    all my best
    thomas

    #23297

    Bill Robbins
    Keymaster

    Good question. Most everything in WordPress can be edited, but the formats can’t be. You can turn support for the different ones on and off, but the labels can’t be changed.

    Also as long as one of the optional formats exists, the default will appear, even if it’s option does nothing.

    In a way I understand the logic behind the choice to keep things semantic across themes, but it makes them less useful. That’s one reason why I no longer use them in our newer themes.

    Take care,
    Bill

    #23307

    Thomas Pientka
    Participant

    hey bill, i solved nearly all of the issues.

    i found out that i can at least hide the standard post (so it’s not available to choose).
    #post-format-0, .post-format-standard { display:none; }

    i even found a way to replace the icons via css:
    .post-format-icon.post-format-video:before, .post-state-format.post-format-video:before, a.post-state-format.format-video:before { content: "\f231"; }
    i choosed the icon from this http://melchoyce.github.io/dashicons/ to get the right font-code.

    to change the labels of post format section, i add this to the functions.php of the theme:

    // change post formats label
    function rename_post_formats( $safe_text ) {
        if ( $safe_text == 'Galerie' )
            return 'Slideshow';
        if ( $safe_text == 'Video' )
            return 'GoogleMaps';
        return $safe_text;
    }
    add_filter( 'esc_html', 'rename_post_formats' );

    in wordpress i choose dashboard > settings > writing and change the default post format to picture – so when creating a new page the standard one is now a picture which works great and is update ready.

    the only thing left is that i have to enter the googlemaps code in a field called “video code” – i did not find a solution for that (is that a wordpress field or from the theme?).

    have a great
    week-end
    thomas

    #23313

    Thomas Pientka
    Participant

    one more annoying thing wass that not displaying the default standard post format, it will keep the tag after that input label, so it will show a white line instead of the label.

    i finished that with the following css:

    #post-formats-select br { display: none; }
    input.post-format { display: block; margin-top: -10px; }
    #post-formats-select input[type="radio"] { visibility: hidden; } 

    it will disable the br tags and hide the radio buttons. in the end it will put all the post format labels underneath (like they have an br tag).

    doesn’ it look great now?
    thomas

    Attachments:
    #23319

    Bill Robbins
    Keymaster

    Good Morning Thomas,

    It looks like you’ve been able to move things around so that it gives you what you were looking for. That’s great.

    You can change the labels on the video box. They are added by the theme. Go to the includes/custom-meta-boxes/visual.php file. You can make those label changes there.

    Have a great weekend,
    Bill

    #23320

    Thomas Pientka
    Participant

    Thanks Bill, now everything is perfect and you can close this topic!

    #23321

    Bill Robbins
    Keymaster

    Fantastic. Take care.

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

The topic ‘how to disable the standard content template’ is closed to new replies.