Forum Replies Created

Viewing 15 replies - 16 through 30 (of 40 total)
  • AJ

    (@permaculturetreegeek)

    Use this: https://www.ads-software.com/plugins/wp-subtitle/

    Open: Content.php (This is for posts. Even better is to add it to your child-theme.)

    Find (two occurrences):
    <h1 class="post-title" data-text="<?php the_title(); ?>"><?php the_title(); ?></h1>

    Add after it:
    <h6 class="sub-title"> <?php the_subtitle(); ?> </h6>

    Do the same in: content-page.php (This is for pages. Also add it to your child theme.)

    Now edit your pages and posts and fill in the sub-title box.

    Cheers

    AJ

    (@permaculturetreegeek)

    The following worked great for removing credits and adding my own:

    // remove the Highwind and WordPress Credits from the footer but give them lots of love for amazing work!
    
    function removeHighwindCredit() {
    remove_action( 'highwind_footer', 'highwind_credit', 20 );
    add_action( 'highwind_footer', 'my_footer_content' );
    }
    //add custom credits/text to the footer
    function my_footer_content() {
    echo 'All content ?';
    }
    add_action('after_setup_theme','removeHighwindCredit');

    Highwind is a great theme, thanks!

    AJ

    (@permaculturetreegeek)

    The following code worked better for me:

    // remove the Highwind and WordPress Credits from the footer but give them lots of love for amazing work!
    
    function removeHighwindCredit() {
    remove_action( 'highwind_footer', 'highwind_credit', 20 );
    add_action( 'highwind_footer', 'my_footer_content' );
    }
    //add custom credits/text to the footer
    function my_footer_content() {
    echo 'All content ?';
    }
    add_action('after_setup_theme','removeHighwindCredit');

    ps: Thank you for a really fantastic theme!

    Thread Starter AJ

    (@permaculturetreegeek)

    Awesome thanks!

    Thread Starter AJ

    (@permaculturetreegeek)

    Indeed. Firefox was not finding those for some reason. (Edit: I had Match Case selected. Doh.) When I used a different browser there they were.

    Thanks for the time and a great plugin.

    Thread Starter AJ

    (@permaculturetreegeek)

    I guess I don’t understand how its matching the search terms. Can you clarify? When I visit those two pages in a browser and use ctrl-F to search the page: DRUMS

    The events page has the term one time.
    https://www.embodyingrhythm.com/events-page/

    The percussion and drum lessons page has it 4 times.
    https://www.embodyingrhythm.com/david-alderdice/percussion-and-drum-lessons/

    cheers

    Thread Starter AJ

    (@permaculturetreegeek)

    just to add some detail to the same search:
    ………….
    Events
    …Celebrate the Beat with David on drums – Motown… body=5, title=0, tags=0 ,comments=0 Total hits:5, Search Terms= drums: 5, Score= 115.4
    ………….
    Percussion and Drum Lessons
    Private Percussion and Drum Lessons – David’s teaching studio / house calls / day of concert while traveling Styles offered – Drumset, frame drums, hand drums, and percussion. Logistics – When, where, what skill levels and ages. Teaching Methods and Philosophy – David meets his students… body=4, title=0, tags=0 ,comments=0 Total hits:4, Search Terms= drums: 4, Score= 92.32
    …………..
    What I notice is that the ‘Events’ page has 5 hits, and the ‘Percussion and Drum Lessons’ Page has 4 hits. Am I right in guessing that those hits must be coming from the html source, not from WordPress content?… and if so, is there a way to add weight to content?

    AJ

    (@permaculturetreegeek)

    If you don’t have search.php you can create a copy of your page.php, rename it to search.php and replace the loop with something like this:

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    <?php if (function_exists('relevanssi_the_excerpt')) { relevanssi_the_excerpt(); }; ?>
    <?php endwhile; ?>

    AJ

    (@permaculturetreegeek)

    Ahh thank you! This fixed my issue as well. Relevanssi was not creating custom excerpts & snippets around the search terms. It created the right length of excerpt, identified the matches, and highlighted them, if they were in the visible part of the excerpt, but did not create custom excerpts using the search terms until I implemented your quick fix. I have my template set like this:

    <?php /* Start the Loop */ ?>
       <?php while ( have_posts() ) : the_post(); ?>
       <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
       </h3>
       <?php if (function_exists('relevanssi_the_excerpt')) { relevanssi_the_excerpt(); }; ?>
        <a href="<?php echo get_permalink(); ?>"> View the full page.</a>
        <?php endwhile; ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Great plugin by the way. Thanks for the help.

    AJ

    (@permaculturetreegeek)

    Yeah, seems kinda dead. Anyway I switched to the ‘redirection’ plugin. It works on 3.5.1.

    AJ

    (@permaculturetreegeek)

    On second thought… an easier approach for a Wysija newsletter archive.

    I decided instead to create the post category ‘Newsletter’, then set Wysija to automatically send when a new post is published in that category.

    I then created a custom page template for that category so it shows the full content for the most recent Newsletter post and excerpts for the rest.

    The cool thing is that multiple newsletter categories can be created to match multiple lists and with custom page templates each one can have an archive.

    Sooo much simpler than messing around the code…

    AJ

    (@permaculturetreegeek)

    I’m working on this also…
    So far here’s what I have:
    Using the ‘view the html version’ of the newsletter link you can include a single newsletter in a page template like this:

    <?php
    
    /**
     * Returns the body content of the specified HTML file.
     * Strips everything outside the body tag.
     * @param string $filename
     * @return string
     */
    function getbody($filename) {
      $file = file_get_contents($filename);
    
      $bodypattern = ".*<body>";
      $bodyendpattern = "</body>.*";
      $noheader = eregi_replace($bodypattern, "", $file);
      $noheader = eregi_replace($bodyendpattern, "", $noheader);
      return $noheader;
    }
    ?>
    
    <?PHP  echo getbody("yoursiteure.com/?wysija-page=1&controller=email&action=view&email_id=3&wysijap=subscriptions");
     ?>

    The next step is to create a loop that cycles through the ’email_id=’ checks for something there and returns them consecutively. In my case I would like to return the latest one in full and list links to the rest.

    I’m not great at php, anyone have any suggestions?

    AJ

    (@permaculturetreegeek)

    Same problem as well, so I messed about.
    The :Redirection URL * (a full URL, absolutely required):
    box is where the redirect will go to.

    The permalink created from the ‘enter title here’ box at the top is the redirect ‘from’ page. It looks useless at first because the link is written like this: ‘https://www.mynewsite.com/r/somename&#8217;. But, if you browse to either that or: ‘https://www.mynewsite.com/somename&#8217;, both will redirect to the link you input in the “:Redirection URL* field.

    So the: ‘Additional Redirections From (optional pattern matching):’
    Must be where to put redirections from other urls.

    For example “https://www.myoldsite.com/somename&#8221;.

    I haven’t been able to get this to work yet, and I’m not sure I understand the logic of this method fully, perhaps someone could help to explain it.

    AJ

    (@permaculturetreegeek)

    I am working on a similar issue. It is difficult to get custom fields to work on the blog page.

    I am using a custom field to add a nextgen gallery single image shortcode to each page, and then set it as full page background via css.

    The following function works great inside or outside the loop on every single page in my site except the ‘blog’ posts page. Added to functions.php:

    //page background from custom field function
    function get_my_page_background() {
    global $wp_query;
    $thePostID = $wp_query->post->ID;
    $page_bg = get_post_meta($thePostID, 'page-background-image', true);
    if ($page_bg) {
    echo  "<span class='page-bg'>"; do_shortcode($pagebg); "</span>";}
    }

    I can call the function in page.php inside or outside the loop, (But it must be inside my main content div for the shortcode to work).

    <!---//individual background from custom fields--->
             <?php if (function_exists('get_my_page_background'))
    		             get_my_page_background();?>

    If I directly paste the shortcode and html that the function generates into the home.php template, it works:

    <span class="page-bg">
    		<?php echo do_shortcode('[singlepic id=382]'); ?>
    </span>

    So the shortcode works fine in the home.php template.

    Can anyone tell me why the function would not work in the posts page template – home.php?

    Thread Starter AJ

    (@permaculturetreegeek)

    oops, that added images to all events.
    Here’s the fix:
    `<?php //If it has one, display the thumbnail for first (x) posts.
    if($counter < 3) : if (has_post_thumbnail())
    { ?>
    <a href=
    “<?php the_permalink(); ?>”>
    <?php the_post_thumbnail(‘thumbnail’, array(‘class’=>’img-up-coming’))?>
    </a>
    <?php
    } endif;
    ?> `

Viewing 15 replies - 16 through 30 (of 40 total)