Forum Replies Created

Viewing 15 replies - 1 through 15 (of 42 total)
  • Thread Starter zer0blok

    (@zer0blok)

    @paulwp

    Worked a treat. Once i knew the right css i was able to play with different gap-widths on the horizontal and vertical and have got it as i wanted, thanks:

    .site-content .gallery .gallery-item { 
    	margin-bottom: -0.6em;
    margin-right: -1.9em;
    }

    Regards
    ??

    Thread Starter zer0blok

    (@zer0blok)

    OK, thanks to you both, i’ll go to the Scrawl help forum from here.
    Regards

    Thread Starter zer0blok

    (@zer0blok)

    @jnashhawkins

    Thanks for the reply. The gallery is the one provided as part of WP -to my understanding- and so should be customisable using css…? Jetpack controls the gallery, i think (i’ve since re-enabled Jetpack). As mentioned, i was able to remove the borders via css, but i haven’t been able to identify the right code for the white-spaces using Inspector.

    Are you saying that the solution is theme relevant, and i should seek help in the Scrawl theme forum?

    Thread Starter zer0blok

    (@zer0blok)

    So, i realised that if i changed the Post-format from Standard to Image, this is no longer an issue. Happy days :

    Thread Starter zer0blok

    (@zer0blok)

    Hi @sacredpath,

    Sorry about the site address, it was the wrong one! -although it’s exactly the same theme, just without menu-bar. The correct site is: https://www.mrathephotographer.com/

    The code has worked. Thanks ??

    > Is it possible to control the hover-behaviour of the icon, in the same way that the site-title behaves? I use this css for the site-title:

    /*****Site Title Color******/
    
    .site-title a {
        color: #8A0808;
        opacity: 1.0;
    }
    
    /* Site Title Hover Color */
    
    .site-title a:hover {
        color: #0489B1;
        opacity: 1;
        transition: .2s opacity ease-in-out;
    }
    

    ??

    Thread Starter zer0blok

    (@zer0blok)

    OK, so i couldn’t achieve the original intention in terms of how the ‘Posted on’-meta functions. I decided in the end to hide the meta in CSS:

    .posted-on {
    display: none;
    }

    With thanks
    ??

    Thread Starter zer0blok

    (@zer0blok)

    I haven’t been able to get the excerpts-&-thumbnails to work as described; i’ve decided to drop the thumbnails, and stick to the plugin, which does display the text as i want. As the site is quite minimal, and i think it might be ok.

    Thanks for your help
    ??

    Thread Starter zer0blok

    (@zer0blok)

    Thanks @zoonini,

    F, Y in Settings does the job ??

    You can override the function scrawl_posted_on() function in your child theme. You’ll find find the original in /inc/template-tags.php

    I’ve found this file and the block of code… but i don’t understand how to “override” the function. Could you identify the code and what needs to be done, please? -where the link is, and where i can change the ‘Posted on’ text (e.g. to ‘Posted in’).

    endif;
    
    if ( ! function_exists( 'scrawl_posted_on' ) ) :
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function scrawl_posted_on() {
    	$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
    	}
    
    	$time_string = sprintf( $time_string,
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_attr( get_the_modified_date( 'c' ) ),
    		esc_html( get_the_modified_date() )
    	);
    
    	if ( is_single() && scrawl_categorized_blog() ) {
    		printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %3$s</span><span class="category-links"> in %2$s</span>', 'scrawl' ),
    			sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
    				esc_url( get_permalink() ),
    				$time_string
    			),
    			get_the_category_list( __( ', ', 'scrawl' ) ),
    			sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
    				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    				esc_html( get_the_author() )
    			)
    		);
    	} else {
    		printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'scrawl' ),
    			sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
    				esc_url( get_permalink() ),
    				$time_string
    			),
    			sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
    				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    				esc_html( get_the_author() )
    			)
    		);
    	}
    }
    
    Thread Starter zer0blok

    (@zer0blok)

    Thanks @sacredpath,
    Yes, “Postcards’ text is what i’m talking about.

    hat text has the same CSS classes as the post titles themselves, which makes this a bit of a challenge.

    I thought so. -Sadly, the code doesn’t quite work: the posts can be seen behind the post-title as u scroll, rather than disappearing uderneath it; i guess because there is no white-space behind the title, like there is in the header (?)

    I tried to make changes to the header-area when i first started with WP /the theme; that was tricky also … in the end i changed the design as different codes i’d been given didn’t quite work.

    I think it’s best i leave this issue for the time being, as i have to have the site ready to go on Friday, and it’s otherwise looking and working well. -Would you tell me though, what’s needed, code-wise, in the theme-files to make this behaviour happen?

    (I appreciate the theme is not designed to do this; i’d like to consider strategies for achieving this in the future, whether that’s identifying a more appropriate theme, or finding a code solutuion).

    With thanks.
    ??

    • This reply was modified 7 years, 4 months ago by zer0blok. Reason: i realise now that's not going to work
    Thread Starter zer0blok

    (@zer0blok)

    @siobhyb

    Ah, just found ur reply. I’m gonna put the code in my little code-file, and try it another time. Thanks ??

    Thread Starter zer0blok

    (@zer0blok)

    Note on above: I’m not currently using the code, or displaying thumbnails in the plug-in, as i have to present the site only with what is working, atm.

    Thread Starter zer0blok

    (@zer0blok)

    Update:

    I found the following code to display the post-image on the posts-page, added to the functions.php file:

    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'preserve_excerpt_format');
    function preserve_excerpt_format($text)
    {
        global $post;
        $raw_excerpt = $text;
        if ('' == $text )
        {
            $text = get_the_content('');
            $text = strip_shortcodes($text);
            $text = apply_filters('the_content', $text);
            $text = str_replace(']]>', ']]>', $text);
    
            $exceptions = '<p>,<a>,<em>,<strong>,<br><img>'; //PRESERVE THESE TAGS, ADD/REMOVE AS NEEDED
            $text = strip_tags($text, $exceptions);
    
            $maxCount = 55; //DEFAULT WP WORD COUNT, INCREASE AS NEEDED
            $excerpt_length = apply_filters('excerpt_length', $maxCount);
    
            $moreText = '.... <a class="blue" href="'.get_permalink($post->ID).'">Read More >></a>'; //CUSTOM MORE TEXT, CHANGE AS NEEDED
            $excerpt_more = apply_filters('excerpt_more', $moreText);
    
            $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length+1, PREG_SPLIT_NO_EMPTY);
            if(count($words) > $excerpt_length)
            {
                array_pop($words);
                $text = implode(' ', $words);
                $text = $text.$excerpt_more;
            }
            else
                $text = implode(' ', $words);
        }
        return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
    }

    The image is displayed, but not at thumbnail-size (which i’ve set as 150px in Settings>Media)… can i add code here to fix the size?

    Thread Starter zer0blok

    (@zer0blok)

    Thanks Kathryn,

    The code doesn’t work, either with the plug-in activated or not. On the Post-page, without the plug-in activated, it doesn’t show the featured-image. With the plug-in activated, a thumbnail appears courtesy of the plug-in (but aligned to the left only). On the single-post, the Title of the post is hidden, with an arrow pointing down to the post itself?

    Atm, the closest i can get to the desired appearance is with the plug-in (using ‘show first image only’ option in settings). -Is there code which will align the image to center, and control the size of the thumbnails.

    Also, for my own understanding: Thumbnail previews on the Post-page, including size and alignment, can be done in WP, but is determined by the theme the site is using… Scrawl itself doesn’t allow this functionality?

    -If so, is it worth looking into editing theme-files (yes, i run a child-theme) to allow this, or, is Scrawl just not designed to function in this way?

    Regards ??

    P.S. Plugin is currently active, and except for alignment & size on the post-page, the Posts are working as they should.

    • This reply was modified 7 years, 4 months ago by zer0blok.
    • This reply was modified 7 years, 4 months ago by zer0blok.
    Thread Starter zer0blok

    (@zer0blok)

    Hi Kathryn,

    Thanks for getting back to me. Yes i did deactivate the thumbnail-option in the plugin -but not the plugin itself.

    The better solution sounds like hiding the featured-image on single-posts… i’d prefer to not use plugins on the site, and stick to css… if that is what you’re saying…? -or does the plugin still have to be active?

    -The reason i’m using the plug-in ATM (without thumbs) is because it centers the excerpt-text (i can’t center it using the Excerpt function in WP) -is this also possible to do with css?

    What do u need me to do to the site re: plugin on /off?

    Thread Starter zer0blok

    (@zer0blok)

    *******

    I’ve used a solution which is basically re-sizing both the Site and Page Titles, and then changing padding /top /margin values in the code i already have to make them work across all devices.

    Although there is a visual change in the spacial-relationship between the site and page Titles, it is acceptable… i’m not designing the site with really tight aesthetics… just trying to make the work appear as it does on a writer’s page.

    I’m gonna stick with this solution. Thanks again for engaging so positively.
    ??

Viewing 15 replies - 1 through 15 (of 42 total)