Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Brandon

    (@glassanemone)

    Thanks DMBarber. I’m figuring all of this out as I go, so the codex is often just as ‘Greek’ as it is helpful to me. I do take my time with it in the effort of learning and figuring things out. From staring at the codex, and the author and author-bio files, I came to the conclusion that they were not where I should be working to solve this problem.

    I will keep working on a more elegant solution but for the time being, the below code from one of Yoast’s articles gets the job done once dropped into my functions.php in my child theme:

    function change_author_link( $link, $author_id, $author ) {
      if ( 'MYAUTHORNAME' == $author )
        return 'https://plus.google.com/MYGOOGLEPLUSPROFILE';
      return $link;
    }
    add_filter( 'author_link', 'change_author_link', 10, 3 );

    Thread Starter Brandon

    (@glassanemone)

    I finally figured this out. I added a few lines to my child theme content.php. The summary is below:

    Replace this block of code:

    <?php if ( is_single() ) : ?>
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    		<?php else : ?>
    		<h1 class="entry-title">
    			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    		</h1>

    with this block of code:

    <?php $title_color = get_post_meta($post->ID, 'title_color', true)?>
    		<?php if ( is_single() ) : ?>
    		<h1 class="entry-title" style="color: <?php echo $title_color ?>"><?php the_title(); ?></h1>
    		<?php else : ?>
    		<h1 class="entry-title">
    			<a href="<?php the_permalink(); ?>" rel="bookmark" style="color: <?php echo $title_color ?>"><?php the_title(); ?></a>
    		</h1>

    Then within the post you want to change the title color of:

    custom field name = title_color
    custom field value = color hex value

    I made similar changes to my page template to allow the same functionality.

    Thread Starter Brandon

    (@glassanemone)

    Yep. My child theme contains my style sheet and various other templates I have made changes to.

    Brandon

    (@glassanemone)

    Once you create a child theme, add the below line to your style sheet within the child theme:

    .single-author .entry-meta .author {
    	display: inline;
    }

    The link below will take you to a nice write up about how to set a specific color for each blog post using custom fields. It works for pages too if you add the code to a page template in your child theme.

    https://ravenwilde.net/how-to-specify-a-custom-background-color-for-each-post-in-twenty-thirteen/

    Thread Starter Brandon

    (@glassanemone)

    Well, just now getting back to updating this. Limiting by IP address breaks my password protected pages as well. I assume because password protected pages rely on wp-login.php.

    In the end, its not a huge deal as my existing setup works, just not as slick as I want it to.

    Thread Starter Brandon

    (@glassanemone)

    Thanks Amado,

    Limiting access to wp-login.php by IP address did the trick.

    Thread Starter Brandon

    (@glassanemone)

    Amado,

    I’d rather not use a plugin for this. I was able to figure out how to lock down wp-login.php so it works just like my wp-admin htaccess protection. However, as expected it broke my password protected pages on my site. So now I need to figure that out. Here is what I added to my htaccess file in my main folder:

    # Protect wp-login
    <Files "wp-login.php">
    authuserfile /home/content/xx/xxxxxxxx/htconfig/.htpassword.ghtpassword
    authname "Secure Area"
    authtype basic
    require user myusername
    </Files>

    I will keep working on this and if I find a working solution I will be sure to post it.

    Thanks.

    Thread Starter Brandon

    (@glassanemone)

    Rod,

    I’m now realizing that, but I think I might still be in good shape. After reading your post, I tried protecting the wp-login.php with godaddy’s tools but was not able to do so. I will try to figure out how to do so manually. Another option is to rename the wp-login.php to something else but it looks like that involves messing with core files which I’m not a fan of.

    Upon further testing here is what I have discovered:

    If I navigate to /wp-login I am first promoted to enter my username/password combo I set up with the wp-admin folder htaccess protection. Then I am prompted to enter my wordpress install username/password combo. If I try to cancel out of the first prompt it returns an error page.

    If I navigate to /wp-login.php I get the same prompts, but if I hit cancel at the first prompt (the htaccess prompt), I am dropped onto an un-formatted version of my wordpress login page. That is how the attacker was able to try logging in and it only showed on my wordfence logs and not my apache logs. But, if he had cracked my wordpress username/password combo before getting locked out by wordfence, he would then have to crack the wp-admin folder htaccess username/password, otherwise it returns an error page.

    Can anyone provide guidance on protecting the wp-long.php with htaccess on a godaddy shared server without using a plugin?

    I’m sorry, like I said I really don’t know much about css/coding, so I can’t help you any further than what I’ve already posted. What I did seems to work for me but I have not extensively tested it.

    If you go to my site: https://brandonmarkwalder.com you can see that the width of the posts has been increased from 604px to 804px. The images in the two most recent posts are thumbnails set to 600×399 (so hard to tell if they scale correctly). But if you look at the page containing the full size images here: https://brandonmarkwalder.com/the-smaller-side-of-snacks-a-photo-series/ you can see the images scale to fill the full width of the page.

    I believe what I have done increases the post/page width and content/media width…but I could be wrong.

    I do not know much about any of this but here is what worked for me.

    I dropped the below code into the style.css of my child theme:

    /*Increase width - original max-width 604 px*/
    .entry-header,
    .entry-content,
    .entry-summary,
    .entry-meta {
    	margin: 0 auto;
    	max-width: 804px;
    	width: 100%;
    }

    Jetpack tiled gallery did not want to play nice so I dropped the below code into my functions.php of my child theme to force tiled galleries to scale up:

    /*set jet pack tiled gallery width*/
    if ( ! isset( $content_width ) )
        $content_width = 804;
Viewing 11 replies - 1 through 11 (of 11 total)