Links Widget – Core file edit?
-
In the older versions, you’d add this to your sidebar.php to get the break between the link and link description:
wp_list_bookmarks(‘show_description=1&between=<br />’)
I’m developing a site and want to use the link widget instead of hard coding like this so that my client can make revisions as needed, but it is not inserting a line break between the link title and description. It is not defined in the core files with a class or anything so I am not seeing a way to style my CSS in a way to separate the description from the link. See large icon links at the bottom of page above the footer: [ redundant link removed ]
Assistance would be appreciated – I imagine there’s something in the core files that would allow me to insert that break?
The page I need help with: [log in to see the link]
-
It appears you’re calling it incorrectly
https://codex.wordpress.org/Function_Reference/wp_list_bookmarks
$args = array('title_before' => '<h2>', 'title_after' => '</h2><br>', ); wp_list_bookmarks($args);
looks like the right way.
You do know that all that links/bookmark stuff is long deprecated now?
https://codex.wordpress.org/Links_Manager
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
I’m not using the old depreciated code – I’m using the links widget, which doesn’t offer the line break. :/
You are using a deprecated feature.
In any case,
ul.xoxo.blogroll li a { display: block; }
breaks the line.
To add CSS: use the “Additional CSS” option in the customizer. https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress
Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.
Do you recommend another method that would be easier for my client to maintain himself when he wants to make revisions to that area?
Thank you for your assistance!!
Also, that did work. Thanks for the refresher course!
- The topic ‘Links Widget – Core file edit?’ is closed to new replies.