Forum Replies Created
-
AuthorPosts
-
Toby39Participant
I appreciate that it has been well over a year sice the last post here, but I decided to post in case this thread might get a response.
I see that @RussCW managed to use the below code to change [Read more...] into [Continue Reading].
//* Modify the Genesis content limit read more link add_filter( 'get_the_content_more_link', 'sp_read_more_link' ); function sp_read_more_link() { return '... <a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>'; }
I have copied the code into my functions.php for the child theme of Genesis Sample, but it doesn't seem to have worked.
However, I have now managed to change the file in
/lib/structure/post.php
in both the Child theme folder and Parent theme folder, but only the changes to the file in the Parent theme seem to have worked.Can anyone tell me please; how can i get the post.php file in the Child theme folder to overide the Parent?
Thanks for reading
Toby39ParticipantActually, I would like to know about this also. I found this post while searching for a solution to putting the post Title up inside the header (or a hook area under the header), so I can put a unique background image behind it.
Like this: https://www.extensis.com/blog/why-the-futura-typeface-never-looks-dated
January 13, 2023 at 10:27 am in reply to: :first-of-type / :last-of-type – not isolating individual element #506573Toby39ParticipantHey, thanks Brad.
.nav-primary .genesis-nav-menu > li:first-of-type
... worked a charm.January 24, 2019 at 4:44 pm in reply to: Warning "Altitude Pro" may be vulnerable to malware hackers #454059Toby39ParticipantThanks victor,
What do you think most likely caused the breach?I first noticed the problem when I navigated to either my home page, or a post. The page would auto redirect to some other website. When this happened, the first URL I saw in the browser address bar was adrequest[dot]xyz/lady[dot]php, and then I saw it change again to the URL of another site which then loads up.
I changed all my passwords to hosting, WP site admin and db, and removed the javascript spam code using PHPMyAdmin in hostgator, but I then noticed a new spam link replace the old one! Many of my sites are now infected, but not the ones protected by Directory Security passwords using hostgator CP.
How the hell did they get in!? - a plugin perhaps?
Toby39ParticipantThis reply has been marked as private.September 14, 2017 at 1:23 pm in reply to: Need to add WP-PostRatings PHP code to appear on Posts only #211475Toby39ParticipantThe only other option I could see is to type the shortcode, in which it looks like I'd have to manually do that on each individual page (not auto.).
Thank you for your code suggestion, I have placed this in G. Hooks genesis_after_loop and it seems to work a charm.
February 9, 2017 at 11:29 am in reply to: Can I keep my "Parent Theme" on a different website to my "Child Theme"? #200859Toby39ParticipantPerfect, many thanks 🙂
February 9, 2017 at 10:53 am in reply to: Can I keep my "Parent Theme" on a different website to my "Child Theme"? #200853Toby39ParticipantHi FG, I host it on my hosting account with HostGator.
I guess I will remove the G framework before I package it up, and give them some basic instructions.
Thank you
TFebruary 9, 2017 at 7:57 am in reply to: Can I keep my "Parent Theme" on a different website to my "Child Theme"? #200839Toby39Participant@VictorFont, @FunkyGrafix, thank you for your replies.
The client wants me to hand the site over to another company, who will host the site on their web hosting account.
They will most likely expect to be the Master Admin of the site - having full control, and the client will most likely want this also.I don't want this other company to have my Genesis unique purchase code / license.
Q: I guess the only option is to remove the Genesis Framework then use a plugin to package the site (& database) into a compressed file, and use WeTransfer to send it to them. Also, letting the company know that they'll need their own licensed copy of Genesis Framework to get it working...
... Or can I remove my unique licence code from the site before I package it up?Thanks again
Toby39ParticipantThanks Brad,
I have this code now, thanks to your suggestion:
<?php /** * * Template Name: Projects * This file handles blog posts with the category Projects within a page. * * SOURCE: http://wpsmith.net/2011/how-to-write-a-genesis-custom-loop-for-specific-categories-in-a-genesis-page-template/ */ remove_action(‘genesis_loop’, ‘genesis_do_loop’); add_action(‘genesis_loop’, ‘custom_do_cat_loop’); function custom_do_cat_loop() { global $query_args; // any wp_query() args echo "testing php"; $args= array('cat' => ’10’); genesis_custom_loop(wp_parse_args($query_args, $args)); } genesis(); ?>
I tried to add HTML or something between the brackets after custom_do_cat_loop but it just caused the page to fail. (not shown above)
I added the above code in the hope that testing php would show up on the page, but it did not.
Ideally I'd like to move the <h1 class="entry-title to the right, so there is more room for the featured image in the left. At the moment in The Loop, the title is above the left aligned featured image and the excerpt body text on the right.Current situation:
Ideal:
Any code suggestions welcome.
Thanks again
Toby39ParticipantThanks Brad,
loops.php seems to have a lot of code in it.Assuming that this is the paragraph I need to edit:
function genesis_custom_loop( $args = array() ) { global $wp_query, $more; $defaults = array(); /** For forward compatibility **/ $args = apply_filters( 'genesis_custom_loop_args', wp_parse_args( $args, $defaults ), $args, $defaults ); $wp_query = new WP_Query( $args ); /** Only set $more to 0 if we're on an archive */ $more = is_singular() ? $more : 0; genesis_standard_loop(); /** Restore original query **/ wp_reset_query(); }
...what part would I edit in order to move the featured image and title, for example?
Sorry, I find I keep asking questions about PHP because I don't really know how to write it, compared to HTML and CSS which I find much easier.
Toby39ParticipantHi Susan,
Thank you for replying, unfortunately I didn't notice I'd received a reply until now.I do still need some guidance with displaying the Loop.
I have just posted a question here: http://www.studiopress.community/topic/need-to-edit-this-modified-loop/If you could offer me any help with it I'd really appreciate it.
Thank you
March 22, 2016 at 11:33 am in reply to: How to put main-menu inside header on left, with logo in center? #182030Toby39ParticipantI have found this plugin "https://wordpress.org/plugins/wp-custom-widget-area/" which should reduce some of the work.
I think I will play with the code and make use of Genesis Simple Hooks to make the new header.March 22, 2016 at 5:41 am in reply to: How to put main-menu inside header on left, with logo in center? #182016Toby39ParticipantThanks Brad,
Yes your example achieves what I'm trying to achieve myself.I notice you have Widget Areas that I assume don't exist by default.
I have found a plugin to help add widget areas more easily.Did you use a plugin, or an all code solution?
Toby39ParticipantHi Victor, thanks for the suggestion.
I tried the plugin but found that when I narrow the width of the browser, the image's width doesn't reduce to match the changing screen size.
It seems to just mask the left and right side, making the image look extremely tall on smartphone widths, and with the left and right part of the image missing.I tried overriding some of the plugin's css using the plugin "Modular Custom CSS", though for some reason it didn't seem to work.
I think I will look for a workaround.Thanks anyway 🙂
November 3, 2015 at 2:20 pm in reply to: How to create a WP Genesis Page template using PHP? #170071Toby39Participant@Xpresso, @braddalton
Thank you for your help.The cobalt plugins look handy, along with this (see bottom of page): http://cobaltapps.com/genesis-custom-php-builder/
Seems to auto-generate the commands that could be pasted into the page template (made from page_landing.php)November 3, 2015 at 11:02 am in reply to: How to create a WP Genesis Page template using PHP? #170012Toby39ParticipantThanks. I have filled a page with the hooks, so they look like this:
<?php genesis_before_content_sidebar_wrap(''): ?> <?php genesis_after_content_sidebar_wrap(''): ?> <?php genesis_before_content(''): ?> <?php genesis_after_content(''): ?>
I added the single quotation marks and this enabled the page to display properly.
However, when I try to add something between the single quotation marks, like this:
<?php genesis_before_content('<h1>Test title</h1>'): ?>
the added HTML doesn't display.I have looked at the files in my child theme, but with my current level of php knowledge, I can't make enough sense out of them.
My guess is, I need to use a different command or add something in a different place.
I might resort to using a plugin to insert PHP snippets.Any help would be appreciated.
Toby39ParticipantOK, thank you
Toby39ParticipantHi Andrea, I removed the opening and closing PHP commands for use in the plugin "Post Snippet".
It works fine.I'll continue to experiment with wp_list_categories to see if I can change the way they're displayed.
Many thanks 🙂
Toby39ParticipantProgress - I have now been able to edit the page listing the Categories, so they show titles only and not the whole content of each page.
However, I was wondering if you might know how to use code to display a List of all the Categories on a single page (instead of a list of Pages within a Category, which I have now been able to do, see above).
I have already found some web pages that seem relevant, and I have tried some code but it doesn't seem to display what I'm trying to achieve, despite using the plugins "Post Snippets" and "Insert PHP". As PHP is not my best area of knowledge I would appreciate any guidance - perhaps in the form of a suitable link.
Thanks for reading
-
AuthorPosts