Forum Replies Created
-
AuthorPosts
-
April 8, 2017 at 4:41 pm in reply to: Changing the og:url tags to http to retrieve social media numbers #204507David BorrinkParticipant
Okay, I tried this in my functions.php file:
echo str_replace("http","https","meta property=“og:url” content=“https://sallieborrink.com” /");
And I got this across the top of my page above the header:
meta property=“og:url” content=“httpss://sallieborrink.com” /
And the source code read"
<meta property=“og:url” content=“https://sallieborrink.com” />
I'm obviously not doing this right.
April 7, 2017 at 8:29 pm in reply to: Changing the og:url tags to http to retrieve social media numbers #204481David BorrinkParticipantThanks for the reference to the W3 PHP pages.
Okay, so I see how they all can work. So if I'm filtering a og tag, how would I syntax that in functions.php? Obviously if I just do https://sallieborrink.com, I'm going to be affecting every instance in the site, content an all, correct? Do I need to put the whole meta tag in the function, then define where to strip it out?
April 7, 2017 at 9:29 am in reply to: Changing the og:url tags to http to retrieve social media numbers #204438David BorrinkParticipantWouldn't that change all instances of my URL, even in the content? I want to be able to change that in the og:url spot in the meta property that goes in the head, not wanting it to change all urls in my content.
Obviously I'd be using this, correct? ...
<?php echo str_replace("https","http","https://sallieborrink.com"); ?>
March 27, 2017 at 12:04 pm in reply to: Putting tags back in excerpts, works in one of three "identical" sites #203901David BorrinkParticipantYes, I'm doing content limited excerpts for this. I had used that code you suggested, and over the weekend I worked with someone to solve the closed tags issue. So that post you linked to now has an update. I have returned to that code again.
I have put it on all three sites, but site #3 is now going down, being merged into #2. So we're now dealing with #1 and #2 only.
The code shows the italics and the links like I want, but the paragraph and break tags are not working. Brad's code doesn't have
<p>
tags, so I added them.I also added a function via another user to put the "read more" back into the situation.
There's a new consequence. The number of characters setting in the Genesis Settings panel is not having an effect.
Here is the complete set of code I added....
add_filter( 'get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags' ); /** * @author Brad Dalton * @example http://wp.me/p1lTu0-a5w */ function get_the_content_limit_custom_allowedtags() { // Add custom tags to this string return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>'; } add_filter( 'the_content_limit', 'force_balance_tags_content_limit' ); function force_balance_tags_content_limit( $content ) { $content = force_balance_tags( html_entity_decode( wp_trim_words( htmlentities( $content ) ) ) ); return $content; } function yourprefix_read_more_for_content_limit( $content ) { return $content . '<p><a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a></p>'; } add_filter( 'the_content_limit', 'yourprefix_read_more_for_content_limit' );
David BorrinkParticipantThere's one more thing now. Suddenly when I hover over the search box, it shifts up to where it was. Move out, and it goes back. I added a hover state to the CSS, and that took care of it.
.nav-primary .search, .nav-primary .search:hover { position: relative; top: 20px; }
David BorrinkParticipantVictor, Thank you for pointing me in the right direction. I had not considered "position: relative". That did it. Thank you!
February 18, 2017 at 4:47 pm in reply to: Trying to restore tags to the excerpt, needing paragraphs to display correctly #201474David BorrinkParticipantI've done some reading on how function wpautop is supposed to add <p> tags around paragraphs that have double line breaks. That explains why there are no <p> tags in the text editor. So it puts those tags in for single posts.
I'd like to get the <p> tags to work in excerpts, but I'm not seeing a way to figure that out. I've read through the formatting.php file and found the wpautop section, but it's extremely cryptic for me with all it's characters that obviously mean certain types of content setups. Too many slashes and brackets to understand.
The WordPress reference at https://codex.wordpress.org/Function_Reference/wpautop says that wpautop filters the_excerpt. Okay, but shouldn't that mean that it makes the excerpt contain <p> tags? It's not doing that. Is this a flaw with the Genesis Sample theme? I'm not sure what to do here.
February 17, 2017 at 1:35 pm in reply to: Trying to restore tags to the excerpt, needing paragraphs to display correctly #201406David BorrinkParticipantI can see that it does strip the tags (the one I was trying).
I understand that I can add the paragraph tags manually, of course, but when I view my posts on a single post, there are separated paragraphs. How does the single post create those visual breaks when there are no <p> tags in the actual post in the text editor?
Also, why does Brad's code not allow for the tags to close automatically at the end of the excerpt, and prevent the same tag from continuing down the page?
February 17, 2017 at 12:24 pm in reply to: Trying to restore tags to the excerpt, needing paragraphs to display correctly #201395David BorrinkParticipantAnyone?
January 26, 2017 at 1:57 pm in reply to: Trying to restore tags to the excerpt, needing paragraphs to display correctly #200086David BorrinkParticipantI don't know if bumping is allowed, so I'm bumping one month later.
David BorrinkParticipantBrad, thanks for posting your 404.php example. I used it and brought the search form coding back in from the default 404.php file. Works great!
Scott, thanks for posting this topic. My situation was to eliminate the pages, authors, and monthly listings, leaving the rest as-is.
December 25, 2016 at 6:38 pm in reply to: My content archives featured image size is not showing up right #198129David BorrinkParticipantActually, I figured it out a few weeks ago. I needed to change my setting to "medium" and my CSS took over. My CSS is height: 350px and width: auto. All is well now.
December 17, 2016 at 7:43 pm in reply to: Trying to restore tags to the excerpt, needing paragraphs to display correctly #197756David BorrinkParticipantOkay, I found that I had an unnecessary function from my old TwentyTwelve based theme that might have been interfering with the new function I listed above. I tried the code example from Brad Dalton above again and I'm still getting the same issue. If my excerpt has an italic tag that doesn't close before the excerpt cut-off, the rest of my page and sidebars are show up in italics. How can I retain the tag formatting without sending the rest of the page into tag chaos?
And I'm not getting paragraph breaks if I add <p> to the string of tags.
November 30, 2016 at 12:53 pm in reply to: Product columns in WooCommerce stays at "1" though I try other settings #196830David BorrinkParticipantOkay, I figured out what was wrong. I had the Genesis Grid Loop installed and the Teaser Columns was set to "1". That forced my product listings into 1 column. By turning off the Grid Loop, my columns became four in the product listings.
So this is one of those "don't do what I did" issues. My mistake can help someone.
November 25, 2016 at 6:09 pm in reply to: Custom Header image not showing up at size I made it #196637David BorrinkParticipantOkay, I discovered via another source that this code needed editing:
.header-image .title-area {
margin: 0 auto;
max-width: 1280px; /* originally: 300px */
padding: 0;
}That takes care of things. I found this in a comment on a site that explained how to do a responsive header using a replacement of codes. I've gone in that direction, now.
November 25, 2016 at 3:24 pm in reply to: Custom Header image not showing up at size I made it #196634David BorrinkParticipantI was able to add "margin-left: -480px" to move the header into place. But the downside is that I get no responsiveness out of the logo, and the image stays 340px tall. This isn't going to work for mobile at all.
November 25, 2016 at 12:26 pm in reply to: Custom Header image not showing up at size I made it #196627David BorrinkParticipantCorrection, I'm using Firebug and I'm not getting a clue why it's positioning off to the left or right.
Ultimately I'm wanting my header to be responsive so it scales down automatically for any media width.
November 25, 2016 at 12:15 pm in reply to: Custom Header image not showing up at size I made it #196624David BorrinkParticipantThanks, Victor. I found that line in style.css and changed it to:
.header-image .site-title > a {
background-position: center !important;
background-size: contain !important;
float: left;
min-height: 340px;
width: 100%;
}But it's still 300px wide. The container is 340px tall, but the graphic is still 80x300 floating in the center of the header area. I change "width: 100%" to "width: 1280px" and I get the full sized graphic at actual size, but it's 1/3 off the page to the right. I try "float: right" and it goes 1/3 off the page to the left. Not sure what to do here. I'm using Firebug and I'm not getting a clue why it's not positioning off to the left or right.
And so you know: I'm using Genesis-Sample for the base of my theme.
David BorrinkParticipantI discovered that I had two errors in the code as my taxonomies array and rewrites had the wrong spelling. I had “news-category” in those two while my taxonomy is called “news-categories”.
But that didn’t help. Still no entry meta display. But entry info is showing at the top of the posts. Why entry meta isn’t showing is odd. I’ve found posts where people are showing how to remove entry metas. I’d just like to know why mine isn’t showing.
My HTML says
<footer class="entry-footer"></footer>
. In a regular blog post there is a<p class="entry-meta">
inside there.July 13, 2016 at 8:24 pm in reply to: Setting up a blogroll with custom post types – sort of right, but… #189433David BorrinkParticipantOkay, I just gave myself an education.
Thanks to your using "archive-project.php" I was able to re-read something I found and was not aware that WP and Genesis had built-in template support via archive-[post-type].php templates. I found Carrie Dils' post on registering a custom post type and she explained the newer system.
I removed my MB Custom Post type plug-in, wrote up a function to register the "project" post type, it picked up on my sample projects posts that were written with the plug-in, and gave me all the support I needed to set up the page simply by using the slug.
Fascinating. And because it used the template hierarchy which I didn't understand until tonight, it fell back to the index.php template to make the display I needed to match my blog page. Perfect.
I'm less of a Genesis rookie tonight. Problem solved.
-
AuthorPosts