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

Additional shortcode attribute for adding custom CSS class(es) #94

Closed
wants to merge 2 commits into from

Conversation

darrenkearney
Copy link

A quick alteration that simply adds an extra argument 'class' to the shortcode and link manager's generated output. I'm not familiar enough with the codebase to know if it needs additional setup etc. but on testing it works a charm.

Now I can have my own custom classes and use several different styles to display relevant posts in a more customizable way. For example:

...post content...
[rp4wp class="style-1"]
...post content...
[rp4wp class="style-2 aligncenter bold dark-background"]
...post content...

This is something I'll be using myself, so I just thought I'd give a pull request to see if it can be added to the next version.

	modified:   classes/class-post-link-manager.php
	modified:   classes/hooks/class-hook-shortcode.php
	modified:   class-post-link-manager.php
@darrenkearney
Copy link
Author

I've just added an offset argument for the shortcode. Going to combine the two enhancements into one pull request.

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

Successfully merging this pull request may close these issues.

1 participant