Is there any way to force line break (or ) in page/article titles?
Line break in title
|
2015-06-24, 08:31:41
2015-06-24, 08:42:04
non breaking title force a line break is something else.. line breaking<Br/>title however html in titles will be deprecated in 3.4 probably. But for now it kind of works, as a "feature" (2015-06-24, 08:42:04)shawn_a Wrote: Thanks Shawn, I know those two are different things, but one of them would kind of solve my problem. However, it doesn't work for me in page titles. I suppose slashes and brackets (and other special characters) get "escaped".
As an alternative to a component you can use a custom field which you name custom-title for example, place the code
PHP Code: <?php get_custom_field('custom-title'); ?> Although placing <br> (html5) or <br /> in the title without using custom fields is easyer and works fine as well.
2015-06-24, 19:32:27
2015-06-24, 22:05:08
2015-06-25, 20:15:11
to: datiswous, Timbow > Thanks for the tip, guys. Workarounds with components/custom fields could work, but I'd like to stick to the core functionality of page titles mainly for the reason of i18n plugins mutual compatibility. It may get rather messy when trying to hack around stuff, especially on a multilingual website.
Haven't tried, but what about using
\n and setting the heading's CSS to white-space: pre ?
(2015-06-26, 23:16:52)Tyblitz Wrote: Haven't tried, but what about using Good idea, but all such attempts fail, because every special character in the title gets escaped. Including backslashes :/ No matter what character I put into the title, it won't affect its formatting. I suppose one of the reasons is security (data consistency). I think we need a volunteer willing to make a plugin for this
2015-06-27, 00:22:03
Have you replaced <?php get_page_title(); ?> in your template by another function? (e.g. the one in Custom Title plugin, or other)
If you don't, GS currently still supports (uses) html in pages' titles. I've just tested this with a <br> (2015-06-27, 00:22:03)Carlos Wrote: Have you replaced <?php get_page_title(); ?> in your template by another function? (e.g. the one in Custom Title plugin, or other) Ah, so that's why html isn't working for me. Yes, I'm using this: PHP Code: return_i18n_page_data('about-us-box')->title Thanks for pointing that out, Carlos.
2015-06-27, 01:20:35
You could then use htmlspecialchars_decode(...)
2015-07-04, 02:05:13
Code: <?php get_custom_field('custom-title'); ?> this one is not working for me can I use the default HTML code?
I am Web Developer at serverpk
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)