VIPStephan
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Website down PHP not supportedThe website you posted doesn’t even seem to use WordPress, the HTML source code says it was generated with “Starfield Technologies; Website Builder 7.0.190”. So how would this forum be the right place to ask your question?
Forum: Developing with WordPress
In reply to: How to properly add Google analytics to header.phpHow about using the wp_head action hook to add the script? The documentation has an example for pretty much this purpose at the bottom.
Forum: Plugins
In reply to: [Bulk remove posts from category] Stopped workingIt stopped working for me, too (used to be working before). I’m on WP 5.6 now (and PHP 7.4). This was a really useful plugin and I really need this functionality. I’d be forever grateful if this could be fixed.
Thanks, I feared that would be the case. Messing with the database directly is too hot for me, I’m going to live with the limitation, I guess.
Forum: Fixing WordPress
In reply to: Links to posts with multiple categoriesBy the way: I ended up with this:
In category.php I have
$current_category = get_query_var('cat'); $cat_link = get_category_link($current_category); if(have_posts()): while(have_posts()): the_post(); set_query_var('custom_post_URL', $cat_link.basename( get_permalink())); get_template_part('entry'); endwhile; endif;
and in entry.php, which contains the actual link to the single post:
<?php $post_url = get_query_var('custom_post_URL',get_the_permalink()); ?> <a href="<?php echo($post_url); ?>"> … …
Forum: Plugins
In reply to: [ACF OpenStreetMap Field] Many PHP Warnings on my settings pageI can confirm, I’m getting the same. But only on my local server which runs PHP 7.3.3 and MySQL 8.0.19.
Forum: Fixing WordPress
In reply to: Links to posts with multiple categoriesSorry about that; I just didn’t want to expose the plain URL so that it doesn’t get picked up by search engines.
Forum: Developing with WordPress
In reply to: Loop IssueYou should probably do this inside the loop, i. e.:
<?php if ( have_posts() ) { while ( have_posts() ) : the_post(); $link = get_post_meta(get_the_ID(), 'link', TRUE); ?> <p><a href="<?php echo $link; ?>"><?php the_title(); ?></a></p> … …
Forum: Fixing WordPress
In reply to: Building New Design in BackgroundI’m not too familiar with wordpress.com-hosted sites but shouldn’t it be possible to export and import content there, too? So, you could install a self-hosted version of WordPress on a local development server, export the content from WordPress.com, import in your local dev environment, do the work you need to do, and then export and import it back to the live site?
Forum: Fixing WordPress
In reply to: Links to posts with multiple categoriesIf you change the permalink setting to “/%category%/%postname%/” you can most definitely access a single post on different URLs, as demonstrated here:
https://neu.maike-lindemann.de/gedanken/euphorische-worte-fuer-plebeian-love/
https://neu.maike-lindemann.de/neuigkeiten/euphorische-worte-fuer-plebeian-love/I would like the link to/URL of single posts reflect the category archive in which they appear.
- This reply was modified 4 years, 9 months ago by Jan Dembowski.
Hmmm, sorry, I’m kind of stuck with this, and I have a feeling that I’ve hit a dead end. Perhaps I’m overcomplicating things but I’m out of ideas.
So, to recapitulate: Basically I have four top-level links, let’s call them
- blue - red - green - yellow
for the background color each should have for the purpose of this example. Each of these top-level links can and will have second and third-level children:
- blue -- blue child A -- blue child B --- blue sub child 1b --- blue sub child 2b --- blue sub child 3b -- blue child C - red -- red child A --- red sub child 1a -- red child B --- red sub child 1b --- red sub child 2b - green -- green child A -- green child B - yellow -- yellow child A --- yellow sub child 1a --- yellow sub child 2a -- yellow child B -- yellow child C
If any of the top-level links or any of their children are clicked, the pages should change color accordingly. The first issue with this is that sub items aren’t necessarily just pages, they could as well be category/post type archives.
I know that the change of color could be done with a body class but how does the system know which item is the active one if a category archive link is clicked? This is the first issue. The second issue is to bring the active top-level item to the front of the list, i. e. if, for instance, “red sub child 1b” is clicked, the entire red section should become the first in the list of links.
Would anyone please help me get on the right track? I’ll be forever grateful.
Forum: Fixing WordPress
In reply to: Scripts being loaded on font endIf you create a completely new theme from scratch there should be no JS except perhaps jQuery, some WP emoji script and wp-embed.js (at least that’s what I see in the custom theme I’m currently working on where I basically started from scratch). So, the JS you see there is either being included by the theme itself (set up in functions.php) or by some plugin.
Forum: Fixing WordPress
In reply to: SVG inline code in Pages – Good or Bad idea?Personally, I prefer separation of XML (of which SVG is a subset) and HTML, so I prefer SVG in separate files. Did you know that SVG code itself can contain JS and CSS? So you could create your interactive map completely inside the SVG file (I’m assuming, without knowing any specifics about your project) and then put it wherever you want. That way you could even use it independently, i. e. as a single file.
Thanks bcworkz, but I’m not quite sure what you’re suggesting me right now.
So, to reiterate: my global parent menu is created from post categories, the sub menus are actual
wp_nav_menu()
s managed by the user. What I want is the parent menu items to be reordered depending on the currently active sub menu item. Is this possible at all? And if yes, how (with my current setup, or a different approach)?Edit: What makes this even harder, I suppose, is the fact that menu items aren’t necessarily associated with pages but can be post archives etc. How is the “current menu item” situation handled there?
Thanks for your reply. Yeah, I’ve thought about a multisite set-up but even though it might look like it to the visitor, it’s not actually multiple sites. The thing is that the same types of content could be present in multiple areas. I don’t think multiple separate sites are appropriate here.