Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'more' option #10

Open
masuhar opened this issue Oct 30, 2024 · 2 comments
Open

add 'more' option #10

masuhar opened this issue Oct 30, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@masuhar
Copy link
Contributor

masuhar commented Oct 30, 2024

add 'more' option so that the shortcode automatically generates a "read more..." in the summary.

[prg-bib key='kasuya2024aplas-src' more='true']

The above example should work as if the "more" tag is inserted before, i.e.,

<!--more-->
[prg-bib key='kasuya2024aplas-src' more='false']

The default behavior can be "true". (But we need to update all the pages using the shortcode.)

@masuhar masuhar added the enhancement New feature or request label Oct 30, 2024
@masuhar
Copy link
Contributor Author

masuhar commented Oct 30, 2024

Inserting the following code didn't work.

    if($atts['more']!='false'){
        $more_link_text = __( '(more...)' );
        $code .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text );
    }

However, it confirmed

  • the 'more' option is recognized correctly.
  • when 'more="true"', it produces '(more...)' text.
  • it does not stop showing the subsequent frame.
  • it appears even in the page view.

@masuhar
Copy link
Contributor Author

masuhar commented Oct 30, 2024

I need to understand the execution model of generating a post page and generating a list of excerpted posts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant