Forum Replies Created

Viewing 13 replies - 31 through 43 (of 43 total)
  • Which language? Or is it all non-English (or non-SomeLanguage) translations?

    I looked for a setting for that as well. The “see more” is a nice way of keeping the calendar display symmetrical (and not distorted, top to bottom). However, for a calendar that has limited entries for any one day (e.g. bookings of a single-use-at-a-time facility), it would be a great alternative to have (controlled by a setting/parameter).

    Thread Starter johngoold

    (@johngoold-1)

    I have a solution to this problem, but am not ecstatic about it (it doesn’t use a WP function to obtain the URL of the Featured Image (and, in fact, because of that, I removed the featured image from the posts page).

    I copied the twentyseventeen header.php file to my child theme. In that file, twentyseventeen has the following code:

    <?php
    // If a regular post or page, and not the front page, show the featured image.
    if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
        echo '<div class="single-featured-image-header">';
        the_post_thumbnail( 'twentyseventeen-featured-image' );
        echo '</div><!-- .single-featured-image-header -->';
    endif;
    ?>

    Just after the opening PHP tag, I inserted the following code:

    // 2017-05-15 JRG show featured image on home page
    if ( is_home() && ! is_front_page() ):
        echo '<div class="single-featured-image-header">';
        echo '<img src="https://cornerstonehousingsociety.org/wp-content/uploads/2017/05/news.png" alt="" class="aligncenter" />';
        echo '</div><!-- .single-featured-image-header -->';
    endif;

    The twentyseventeen code uses the function has_post_thumbnail() which fails rather miserably when invoked on the posts page (and it doesn’t work when a single post is being displayed, which it appears intended to do). Note: the function twentyseventeen_is_frontpage() is a test for the “front page”, excluding the “home page”. The test I coded is almost the opposite (the home page unless it is the front page).

    Forgot to mention: The URL in my code is just a test site. Obviously, if you want to use this code yourself, you would need to use an appropriate URL for your img tag “src”.

    • This reply was modified 7 years, 6 months ago by johngoold. Reason: Afterthought
    Thread Starter johngoold

    (@johngoold-1)

    Thanks, well done. I assume that fix will make it into the next release.

    Thread Starter johngoold

    (@johngoold-1)

    Part of why I’m having trouble resolving this issue is because of terminology and the way files are named, which sometimes seems (to me) to be contradictory or conflated.

    Here are my personal definitions of some terms, then I’ll ask my opening post question in different terms:

    Home Page (or just home) — the first page someone sees when surfing to your domain (a.k.a. Landing Page).

    Front Page — same as Home Page — I’m not sure this lines up with the WordPress Team’s definition (if not, what is their definition?).

    Posts Page (or blog page) — a page that displays your blog posts.

    The Home Page can also be the Posts Page, but doesn’t have to be (in my case, it is NOT).

    So, I have a static Front page and a separate page designated as the Posts page.

    Problem: The Posts page does not display its Featured Image. It also appears to strip any HTML tags from the Page Title (although manually browsing the database with phpMyAdmin shows the tags are there).

    [edit] Just found this statement in the template hierarchy document: “home.php
    The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.”

    I’ll see if I can fix the behaviour by creating a home.php template file (though this is totally counter-intuitive to me ?? )

    • This reply was modified 7 years, 6 months ago by johngoold.

    Do you mean: When you navigate to a page, the page title appears in the left column and the content in the right. You want to display an image in the left column?

    I display an image under the page title in the left column. I put the images into Gallery.

    I then edit my page using the text editor and change the page title (example: “Activities”) so it reads:

    Activities<br /><img />

    I get the content for the img tag by using the Media button and temporarily inserting the image at the bottom of the page. I copy-and-paste the resulting image tag into the page title and delete it from the post.

    This works great (except on the posts page, which is another story). If you are using the page in the navigation menu, then go to Appearance–>Menus and change the menu item (i.e. click the button to expand it) by editing the navigation text to remove the <br> and tags — you don’t want the large images munging your menus.

    Using the image as a background for the left column will mean altering the stylesheet (PLEASE, if you do this, do it in a CHILD theme — it’s easier and safer and you won’t have regressions when the theme is updated).

    • This reply was modified 7 years, 6 months ago by johngoold.
    • This reply was modified 7 years, 6 months ago by johngoold.
    Thread Starter johngoold

    (@johngoold-1)

    Great! Thanks for your prompt response.

    Thread Starter johngoold

    (@johngoold-1)

    That was how I set it up originally (funnily enough, I chose 2020 as the year!). The described problem occurred then.

    I later realized that overlay pop-ups and calendar displays were showing the event as repeating UNTIL that date. Since I wanted those events to repeat indefinitely (until canceled), I tried the effect of removing the “Repeat until” date. That worked fine (i.e. open-ended repeat); however, the described problem persisted.

    A number of years ago, I had this problem on a site I was hired to port and upgrade. The original site used an RSS aggregator (Yahoo! Pipes, now defunct) to display posts on the home page.

    The page load times were horrible.

    The way to do this properly is to write some PHP code to query each of the “blog sites” you are hosting, order them (most recent first) and filter them (I set a maximum of 3 posts per site, a maximum of 10 posts to display on the Home page).

    There is also a caching mechanism that can be used, which further speeds things up.

    Lastly, you have full control over how the posts display. If you want to view the site I mentioned above: bridgeblogging.com

    By now there may be pluggins that do this for you.

    Cheers,
    John

    Thread Starter johngoold

    (@johngoold-1)

    Hmmm. What were those back-ticks for? They appear to “escape” the HTML markup.

    The “Put code in between backticks.” injunction could be reworded to be clearer (especially as there is no way to preview one’s post or edit one’s post after submitting it.

    I am having a problem with the custom logo displaying properly. [By the way, instead of marking something as “Resolved”, wouldn’t “Workaround” be more appropriate?]

    I am running WP 3.9.1 (I’ve tried the 4.0 beta, but I cannot stand the site being updated once a day by the nightly builds).

    My logo image is 80px wide by 88px high. Putting “88” as the logo height does not work. The problem is the logo is being scaled and made the same width as the form below it. So, with a height of 88px (or left out), I get an enlarged logo that has the top and bottom cropped. If I set the logo height to 350px (i.e. “350” in the Private Only settings), the whole logo appears, but it is much too large.

    The problem is that the plugin code is inserting CSS styling that gives the “#login h1 a{” a background attribute of 100%. That should be removed (if I do that using the Firefox inspector, it displays properly).

    So I guess there are two workarounds:

    1) I could change my logo to be the width of the form and keep it 88px high.

    2) I could replace the WordPress logo by mine (the WP logo is 80px by 80px).

    I’ll probably use (2) as the WP logo is better positioned.

    johngoold

    (@johngoold-1)

    Ummm… I said “people’s themes”. I should have made it clear I was not referring to themes in the repository or purchased, commercial themes. I really did mean “people’s themes” — those individuals with their own web site who installed WordPress and created their own theme.

    I encountered the problem when working on a site using its own theme. It DOES NOT HAVE THE ADMIN BAR. It did, however, end up with 28px of background colour above the masthead (header, whatever).

    I fixed the problem using a variation of the original suggestion you made (thank you Heartwood, I appreciate your contributions). I’ll try your latest suggestion to see if that solves the problem in a cleaner way.

    johngoold

    (@johngoold-1)

    I agree with what has been said about not altering core code.

    However, I do have an issue with what this thread is all about. Why on earth would someone put into the core code (apparently starting with WP 3.1.0) something that would break people’s themes? I just wasted an hour tracking this problem down and then confirming my diagnosis was correct by searching for and finding this thread.

    So, we use a workaround that is legitimate and doesn’t alter core code. Now, what happens when someone wakes up and either removes that style (which should never have shown in in first place) from the core code (or better yet, figures out how to make it conditional so it only shows up for the admin theme (or wherever it is actually needed)?

    My workaround won’t actually break, but I wouldn’t be surprised if the effect would be that some people lose 28px of the top of their page.

Viewing 13 replies - 31 through 43 (of 43 total)